Outils pour utilisateurs

Outils du site


local:moodlescript:language:removeblock

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.

  • showinsubcontext : 0
  • pagetypepattern : course-view-*

Notes

(*) This assumes the block identifiers provided by the installation of certain third-party plugins are in place.

Back to the language index - Back to the component index

local/moodlescript/language/removeblock.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki