===== MoodleScript: ADD CATEGORY ===== ===== MoodleScript Script Engine ===== === Effect === Adds a category to the course categories. === Syntax === ADD CATEGORY [IN [HAVING description: idnumber: visible: ] Minimal instruction: ADD CATEGORY === Examples === ADD CATEGORY Language courses HAVING idnumber: LANGUES visible: 1 ADD CATEGORY English IN idnumber:LANGUES HAVING description: Category of English courses idnumber: ANG visible: 1 === Specific attributes === * **categoryname**: a category label. * **parentidentifier**: identifier of the parent category. * **description**: a description. * **idnumber**: a category identification. * **visible**: 0 or 1. === Default values === * **visible** : 1 === Impact on the execution stack context === Sets the current category identifier to the created category. [[:local:moodlescript:languagespecification|Back to the language index]] - [[:local:moodlescript|Back to the component index]]