16 Commits

Author SHA1 Message Date
jpuntd
e8fce230f4 fixed bug2847 2005-04-05 21:03:15 +00:00
defacer
3ef642d96a Implemented discussion from bug 2547:
* Block authors no longer need to set $this->content_type
* If you want to make a "list" block, just derive from block_list
  instead of block_base
* All switch() statements gone from library code
* Overloaded method is_empty() added to block classes for convenience
2005-03-02 19:22:26 +00:00
defacer
8a47e075b3 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
2005-02-08 02:59:44 +00:00
defacer
e89d741af3 New naming conventions for class names to bring them in line with the
rest of Moodle. The convention for blocks is now:

class block_something extends block_base { ... }

HOWTO updated accordingly, plus some more minor polishing. More to come.
2004-11-23 18:53:34 +00:00
defacer
9b4b78fd6a Da monster-commit of blocks version 2!
Code based on the work of Daryl Hawes for the blog module. Thanks, Daryl!

Please test the hell out of it as it's sure to have issues that need to be
ironed out.
2004-10-19 21:04:28 +00:00
gustav_delius
839f2456bb XHTML compliance
- fixed (hopefully) all <img> tags
- global replace on <br> to <br />
- &amp; in URLs
- got the forum module XHTML compliant
Julian Sedding
2004-09-16 17:13:57 +00:00
gustav_delius
a43bbd9a15 fixed quoting of attribute values 2004-09-12 20:30:43 +00:00
defacer
2b0d60ec78 Fix for bug 1662:
Changed the way applicable formats for blocks are handled. The changes are
short codewise, but to grasp all the implications read the forum discussion
at the relevant URL.
2004-08-22 16:54:48 +00:00
moodler
675dbdd9f5 FIxed some notices when installing Moodle fresh 2004-08-11 09:00:53 +00:00
moodler
1b04b36bff Fixed a notice on PHP 5 2004-08-08 05:28:26 +00:00
moodler
63b1bd7cfc Fixed a notice when $USER->id not defined 2004-08-04 02:44:25 +00:00
gustav_delius
e44497f329 Fixed bug 1531, section links to invisible sections now greyed out or hidden 2004-06-05 12:04:02 +00:00
gustav_delius
319225a714 Fixed bug 1531, section links to invisible sections now greyed out or hidden 2004-06-05 11:57:11 +00:00
gustav_delius
f1020d0dd2 section links now preserve focused view, see http://moodle.org/mod/forum/discuss.php?d=7648#37555 2004-05-29 10:40:07 +00:00
defacer
89adb17442 Merging the changes from 1.4 dev branch (site index blocks + various bugfixes) 2004-05-28 10:53:54 +00:00
moodler
d208d07b7f Renamed "weeks_topics" to "section_links" 2004-05-07 02:27:56 +00:00