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.
NEW: The code now supports dynamically plugging your own Pages and block position
identifiers into Moodle without messing with the main libraries at all.
UPDATE: Many functions in blocklib now use pass-by-reference for speed.
UPDATE: Class MoodlePage has been made more presentable and robust.
--------------
Brand-new pagelib.php at your disposal! It slices, it dices, it makes your coffee.
It still doesn't understand women... Read the comments in pagelib.php for a first
impression. Feedback highly encouraged!
Blocks code has undergone significant changes to work with Pages. Flexibility is its
middle name, since I think (without having tried it) that adding e.g. a third
placeholder for "center" blocks in courses, with full support for moving around etc,
will now take about 15 lines of new or edited code. If you are not impressed yet, I
suggest watching a documentary on solar physics. :P
MINOR CHANGES:
--------------
Added instance_allow_config() in the blocks class hierarchy to supplement per-instance
configuration options. You can override it to return true and thus get configuration
amenities without allowing multiple instances.
Minor polishing to comments and documentation (whatever caught my eye was game).
Tightened up some code here and there by utilizing all the new features.
BUGFIXES:
---------
A bug in restore_execute.html caused hidden blocks to not be restored at all.
Microsoft must surely be jealous (do more with less).
Fixed a bug: if somehow the block weights in a page become discontinuous,
moving things up and down will slowly improve the situation until it's back
to normal again. It would just fail without notice before.
Fixed a bug: you could add multiple instances from a block that didn't
allow it if, after adding the first, you just hit Refresh in your browser.
Fixed a typo: missing / inside filepath
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.
(for CPU issues) and upcoming_events is now shown on the right between
news and recent activity
The default blocks can be overridden by a setting in config.php
$CFG->defaultblocks
See: http://moodle.org/mod/forum/discuss.php?d=7784&parent=39296
block db upgrade scripts. We 're getting to a point where you can really
have a directory with just a single 20-line file for your block and Moodle
will do all the rest. Much like Nuke does now. That is A Good Thing! :-)
Integrated with Moodle:
- Install automatically.
- Update course->blockinfo for each course at installation time.
- Modified course creation to insert into blockinfo field.
- Modified restore to insert into blockinfo field.
- Admin options (hide, show, delete, config) from admin page.
- Lang strings inserted (en only).
- Database support to mysql and postgresql (not tested!!).
Moodle, backup and block versions updated to 2004041800.
Tested with mysql: Install fresh and upgrade from previous.
section_activities block renamed to social_activities and created
its own lang file to support name "Social Activities". This can
be changed at any time.
TODO:
=====
Support it really in backup/restore.
????
Enjoy!! Ciao :-)