]> git.mjollnir.org Git - moodle.git/commit
Changing the way that applicable formats for each block are defined:
authordefacer <defacer>
Tue, 8 Feb 2005 02:59:44 +0000 (02:59 +0000)
committerdefacer <defacer>
Tue, 8 Feb 2005 02:59:44 +0000 (02:59 +0000)
commit8a47e075b367a45ac904af84b10c0aa291d899df
tree4d756a1cae33fb764f139fc076b081de92128095
parentbb64b51aa335b2d085f36b33ffa0dc5a7c603d0e
Changing the way that applicable formats for each block are defined:

The format for each page is now the same as the id attribute of the
BODY tag, which in turn is a simple function of the script's relative path:

The format for e.g. a quiz view page is "mod-quiz-view". The format for the
site index is "site-index". Exception: the format for courses is not just
"course-view", but "course-view-weeks" etc.

Obviously the applicable_formats() override for each block should now take
this into account. The matching rules now are:

* You can specify the full format, e.g. "mod-quiz-view" => true
  will allow the block to be added in quizzes
* Prefixes match the full page format, e.g. "mod" matches ALL activities
* You can use "*" as a wildcard, e.g. "mod-*-view" matches just the view.php
  page of all activities
* These rules interoperate, thus "mod-*" is the same as "mod"
* "all" remains as a catch-all situation
blocks/moodleblock.class.php
blocks/section_links/block_section_links.php
blocks/social_activities/block_social_activities.php
lib/blocklib.php
lib/pagelib.php