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.
All the conversion to some pseudo-codes are done at backup time.
In the restore process, every link is decoded to new ids.
For now, this is supported:
- In backup:
-all links to forums are encoded.
- In restore:
- all links to forums are decoded.
- from forums (post->message).
- from resources (resource->alltext).
The process requires a backup made with the same version (because it
has to be properly encoded at backup time). Old backups will work
without conversions at all.
Only tested with some little courses.
It would be perfect to have some "big" course to test it.
Please, test and feedback, ciao :-)
- Now course events are supported in backup & restore.
- in manual backups
- in scheduled backups
- Fixed important bug when restoring groups.
- Added support to the "user change password" action
(with some changes done in login/change_password.php)
Please, test it !!!!
"course users" are selected. This uses the xxxx_get_participants()
function in every module.
This solves an issue about info in modules belonging to
unenrolled users (Bug #692 closed).
Mantain compatibility with old backups (1.1 and 1.1.1).
Updated version to "1.2 development".
Included support to "label" module (by Martin)
because it flags errors when in debug mode).
Also, when specifying array values by name use quotes around the name
eg $array['value'] instead of $array[value]
Finally, I changed the way user restoring works (slightly). Before, if a
restored user was found to be a course creator or an admin, then this
status was restored. I don't think this is a good idea - it could lead
to security problems when copying a backup from one site to another,
or if that person's status has changed since the backup was made.
I think it's best to only restore what is actually part of the course,
ie teacher or student.
If this broke anything else let me know!
Allow restore into new course (only admins),
restore into existing course deleting old and
restore into existing course adding to old
Teachers are limited to "current course" while admins ca
select any course. :-)