===== MoodleScript: ADD ENROL METHOD ===== ===== MoodleScript Script Engine ===== === Effect === Adds an enrolment method instance to a course. === Syntax === ADD ENROL METHOD TO HAVING role: customint1: customint2: ADD ENROL METHOD meta TO HAVING role: course: === Examples === ADD ENROL METHOD self TO idnumber:MONCOURS HAVING role: student ADD ENROL METHOD meta TO idnumber:SUPERCOURS HAVING role: student course: idnumber:METACOURS === Specific attributes === * **method**: The name of the enrolment plugin, such as 'self' or 'meta' for example * **courseidentifier**: a unique course identifier. 'current' can be used here. * **rolename**: a role short name. * **customint, customchar, customdec<1|2>, customtext**: the values of the specific attributes of the enrolment method. m: 1 to 8 n: 1 to 3 o: 1 to 4 === Default values === * **role** : student * **visible** : 1 === Impact on the execution stack context === None [[:local:moodlescript:languagespecification|Back to the language index]] - [[:local:moodlescript|Back to the component index]]