Added new function, import_backup_file_silently
Changed everything that prints stuff to check for a constant first.
Backup_flush checks a different constant, this is so that output can still
get flushed to the browser when necessary but not print <li>s everywhere.
Please test this!
This patch allows the much requested selection of individual instances of modules within a course to backup and restore.
It needs A LOT of testing and probably some prettyifying too.
quizzes, instances, versions, attempts, states and grades for pre15
are now restored. Not fully tested, so I'm sure it will need some
adjustments but, basically, it's done.
CVS: ----------------------------------------------------------------------
Remap of multianswers isn't necessary because, under Moodle 1.5, it seems
to be always a 1..n collection of pairs and responses pairs are always
ordered from {#1} to {#n}.
If this isn't true we should look for an alternatice method of restore
attempts... :-(
For more info, bug 3252 has more info
(http://moodle.org/bugs/bug.php?op=show&bugid=3252)
I doesn't work at all but near every question type has been checked and
changed if needed. Tomorrow I'll start with the quiz->attempts... part
Anyway I've some IMPORTANT doubts about how this questions are currently
implemented:
- NUMERICAL: Can the answer field have more than one answer?
- MULTIANSWER: What are the differences. Why, in the upgrade process,
all of them are deleted and recreated? Why some fields have been
deleted? Why the questiontext for this type is set to '' in the
upgrade processs
- CALCULATED: Why the quiz_question_datasets table is now simply "s" in
the restore process? A typo, I hope.
I've written this here to avoid forgetting it and, if someone in the
quiz's team can answer me...
Now, just zzzZZZzzzZZZ. Ciao :-)
in both 1.5 and pre 1.5 restore code.
Gustav's team is goingo to handle 1.5 whereas
I'm going to handle old backups.
I'll try to change every function name to be able
to merge both libs again at the end of the process.