MoodleScript: REMOVE BLOCK
MoodleScript Script Engine
Effect
Removes blocks from a course.
Syntax
REMOVE BLOCK <blockname> FROM <courseidentifier>
REMOVE BLOCK <blockidentifier> (todo)
REMOVE BLOCK <blockname> FROM <courseidentifier> HAVING
location: <location>
position: <position>
Examples
REMOVE BLOCK course_recycle FROM current HAVING
REMOVE BLOCK html FROM idnumber:"C203" HAVING
location: side-pre
position: last
Specific attributes
blockname: must be an unprefixed block name: 'course_recycle' or 'dashboard' or 'configurable_report' for example.
blockidentifier: a block identifier. (*)
courseidentifier: a “course” object identifier. For example: idnumber:<courseidnum>
location: a block region identifier, for example: side-pre or side-post. This may depend on the theme. The default value should add the block to the default block region (where the add-block widget is located in the interface).
position: a position (numeric integer) or the keywords first or last.
Default values
location : side-post
position : 0
Other defaults
These default values cannot be altered by the MoodleScript syntax in the current version.
Notes