===== MoodleScript: REMOVE BLOCK ===== ===== MoodleScript Script Engine ===== === Effect === Removes blocks from a course. === Syntax === REMOVE BLOCK FROM REMOVE BLOCK (todo) REMOVE BLOCK FROM HAVING location: 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: * **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. * **showinsubcontext** : 0 * **pagetypepattern** : course-view-* === Notes === (*) This assumes the block identifiers provided by the installation of certain third-party plugins are in place. [[:local:moodlescript:languagespecification|Back to the language index]] - [[:local:moodlescript|Back to the component index]]