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
- Teachers can backup/restore their courses.
- New option "restore to existing, deleting old".
- backupdata dirname harcoded.
- backup and restore buttons in main course page.
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. :-)
The database checks/upgrades are now done on the main
admin page like the other modules.
The database files are now standard format .sql and .php files
PostgreSQL support was added - BUT HAS NOT BEEN TESTED YET!!