Completely untested by me but it LOOKS like it should work. It's quite
standalone, and is basically a single function call during the restore
precheck which looks in the backup to see if it's a BB file, then
converts it using XSLT.
Apart from a little tidyup and renaming, I added a check so that it
should just silently fail if XSLT functions aren't available
Many thanks to Ziba Scott <ziba@linuxbox.com> who wrote it!
The new constant is PAGE_COURSE_VIEW, and it's more streamlined with the
new CSS-related ids for 1.5. There are great possibilities for the future
here, so we 're getting ready.
On the other hand, this has to be the ugliest hack I 've ever inflicted
on any program (look at pagelib.php). Thankfully it will only stay for just
a little while.
But I've spent sometime trying to simulate one exercise and
I haven't been able to do it. Probably my own stupidity, but
things didn't work as I expected! :-(
- user->policyagreed:
if the destination server is different, reset it
- user_students->enrol and user_teachers->enrol
if not set or the destination server is different, set it to $CFG->enrol
somethings should be modified in the rest of moodle:
- update all the 'manual' entries to 'internal'
- modify the enrol_teacher() to use $CFG->enrol by default
- make every enrol method set this field properly.
- perhaps, mark metadata users with a new value too.
I hope this time I got everything changed to the new Page interface! I 'm
really sorry for messing up and breaking new installations... :(
Also moved the only two functions of the API outside the page_base class.
--------------
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.
Backward compatibility is maintained, i.e. you can restore ANY version
backups without problems in 1.5. When "adding backup data to an existing
course", no blocks are added. I 'm not sure what the correct behavior
would be in this case.
When restoring a backup from Moodle <= 1.2, the new course SHOULD be given
default blocks when it is restored. I have not actually tested this, my
tests were with version 1.3 and 1.4 backup format.