MoodleScript: ADD COURSE

MoodleScript Script Engine

Effect

Creates an empty course, taking the global course creation settings into account.

Syntax

  ADD COURSE <coursefullname> AS <shortname> TO <coursecategoryidentifier> HAVING
  idnumber: <idnumber>
  visible: 0|1

Examples

  ADD COURSE Macroeconomics Level 2 AS MACECO2 TO idnumber:DIVERS HAVING
  idnumber: C_0345

Specific attributes

Default values

Impact on the execution stack context

The current course identifier is set to the id of the created course. The current course category identifier is set to the category where the created course is placed.

Back to the language index - Back to the component index