Fix for bug 2925:
When editing is turned on, the Main Menu should always display and give
the option of adding resources/activities in section 0 of the site.
Bad optimization code caused the drop downs to not be shown if there
was no section 0 (i.e., the site never had a news forum or an activity
in the Main Menu block).
FINALLY! :)
PS: Version bump, so that we know if people have the latest version of
the block. I 'm going to bump versions from now on when bugs are fixed.
* 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
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.
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.
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.