- Check if (category_id, category_name) exists.
- Check if (category_name) exists.
- Check if category_id = 1 exists.
- Create a new, initially invisible category withe the info in backup-file.
This solves a issue when restoring to a new course and category_id 1
had been removed !!
- Restoring to courses without section 0 (manually deleted).
- Restoring to sections without mods and null values in its sequence field.
Thanks to Janne Mikkonen...
"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)
that tells us how far to indent the activity when it is displayed.
This gives us some more flexibility on the course outline to
arrange things as we might like them, into subtopics etc
Backup/restore is updated as well.
There is also a bit more robustness in course/mod.php
If it exists in backup-file used, else, old search-by-name is used.
When inserting new categories, stamp is filled it it doesn't exist.
Updated version to 1.1 Beta +++ !!
field is set to yes. Else, a new "local" category is created.
Added some lines of code to mantain old compatibility when detecting
existing questions (do it by name if the stamp is not found) and insert
the stamp too !!
Please, test.
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!
The process look for category, stamp and version to calculate
when to create a question or use a existing one.
This avoid duplicates in RANDOM and RANDOMSAMATCH qtypes.
question types.
And modified some of the quiz_answers restore system to
allow remapping answers with existing questions.
//Detected by scott dot elliott at mchsi dot com in Bug 84