local:moodlescript:language:addblock
MoodleScript: ADD BLOCK
MoodleScript Script Engine
Effect
Adds a block to a course.
Syntax
ADD BLOCK <blockname> TO <courseidentifier> HAVING location: <location> position: <position>
Minimal instruction:
ADD BLOCK <blockname> TO <courseidentifier>
Examples
ADD BLOCK course_recycle TO idnumber:COURSTEST HAVING location: side-pre position: last
Specific attributes
- blockname: must be an unprefixed block name: 'course_recycle' or 'dashboard' or 'configurable_report' for example.
- 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.
- showinsubcontext : 0
- pagetypepattern : course-view-*
local/moodlescript/language/addblock.txt · Dernière modification : de 127.0.0.1
