From Gustav Delius (gwd2 at york.ac.uk) Sunday, 8 May 2005, 10:41 PM:
I have now updated backuplib.php except for two outstanding issues:
1) Julian has to put in his changes to the question type tables
2) I did not know what to do with the quiz_rqp_type table. Here I need Eloy's advice. This table is a state-level table which holds information about the remote web services that can render the rqp questions. Its id field is a foreign key for the quiz_rqp table. How is this to be backed up?
From Gustav Delius (gwd2 at york.ac.uk) Monday, 9 May 2005, 07:26 PM:
I had a chat with Eloy. We agreed that Julian and I would in the first instance concentrate on writing the restore code for the current backups only, so that our pair of backuplib.php and restorelib.php work together flawlessly to allow backup and restore of the current database structure. Eloy will then look at the updating code necessary to restore old backups.
Eloy has created a new file restorelibpre15.php in CVS in which he will work. Julian and I will be working in the existing restorelib.php
I will start working on restorelib.php this night. Julian, could you make sure the question type specific bits of backuplib.php are done first, then when I am done with the generic bit of restorelib.php you can make the question type specific changes there as well.
From Gustav Delius (gwd2 at york.ac.uk) Monday, 16 May 2005, 02:47 AM:
Julian, as soon as you come online tomorrow can you please chat to Eloy and me? Eloy has questions to ask.
From Eloy Lafuente (stronk7 at moodle.org) Thursday, 26 May 2005, 02:30 AM:
pre15 restore code is finished.
Should we close this or, perhaps, do you prefer to leave it open until 1.5 <==> 1.5 was finished?
From Gustav Delius (gwd2 at york.ac.uk) Wednesday, 1 June 2005, 02:33 PM:
I'll leave this open to remind myself that the 1.5 backup and restore needs more testing.
From Gustav Delius (gwd2 at york.ac.uk) Sunday, 5 June 2005, 09:51 PM:
The Moodle 1.5 restore code now skips the restoring of user attempts (and prints a message to that effect) because there are still the following outstanding issues:
1) The answer field in states for random questions is not recoded.
2) The state field in the quiz_rqp_states field is not recoded.
Possibly there are more issues, the whole thing needs to be gone over carefully. Will have to wait for Moodle 1.5.1
From Julian Sedding (jps502 at york.ac.uk) Tuesday, 20 September 2005, 06:29 PM:
I have found the following issues so far:
PRE 1.5 works alright, however, there are some issues that are indirectly relevant:
- in the questiontext field of the quetsions table HTML linebreaks (i.e.<br />) became br /, I presume that this is not limited to this field, but has its roots somewhere in the XML processing.
- calculated questions in 1.4 don't store sufficient information for restoring the responses, which can lead to quiz reviews being corrupt. I suggest setting state->answer for calculated questions to the empty string.
1.5 -> 1.5 restore
- multichoice restore doesn't take into account that the answer field may now contain two comma separated lists, which are themselves separated by a colon. The first list is the order of the choices (answer ids) and the second parts the selected answer(s).
- multianswer doesn't is still a comma separated list of hyphen separated pairs, but the first element in the pair is now the sequence number (i.e. 1,2,3,4,...) and not the multianswer id any more. The sequence number can be used to identify the correct question id in the sequence field of quiz_multianswer table. The questions are needed to identify the questiontype, so we can leave shortanswer and numerical subquestions alone, while fixing the answer ids for multichoice subquestions.
So far that's all I could find.
Julian
From Julian Sedding (jps502 at york.ac.uk) Thursday, 29 September 2005, 06:44 AM:
I propose the attached file as a fix for this bug. I would welcome any help in testing, since I don't have a database with many questions and attempts.
The lack of testing is also the reason why I din't commit the file yet.
Julian
From oen roggemans (koen at roggemans.net) Sunday, 30 October 2005, 03:57 PM:
A Belgian user ( willy.vansteendam AT cvo-aalst.be ) found another bug in the quiz restore function wich AFAICS not yet listed here: the path (course ID number etc) for the images used in a question is not modified, causing the image not to show up. The image itself however is copied.
I have tested this in 1.5.2+ build 17/10 and 1.6 build 30/10
From Petr Skoda (skodak at centrum.cz) Tuesday, 1 November 2005, 05:04 PM:
Quiz image links are constructed on the fly from relative paths. Users must not link to quizfile.php directly. Backup/restore of links to file.php should work just fine I hope, right?
From Joseph R?zeau (joseph.rezeau at uhb.fr) Friday, 13 January 2006, 08:39 PM:
It's a pity that complete reliable restoration of quizzes with user data is still not available in moodle 1.5.3 stable.
From Gustav Delius (gwd2 at york.ac.uk) Wednesday, 12 April 2006, 06:33 AM:
Of course this needs more testing with real data. But problems should be reported in new bug reports.
From Gustav Delius (gwd2 at york.ac.uk) Sunday, 8 May 2005, 10:41 PM:
I have now updated backuplib.php except for two outstanding issues:
1) Julian has to put in his changes to the question type tables
2) I did not know what to do with the quiz_rqp_type table. Here I need Eloy's advice. This table is a state-level table which holds information about the remote web services that can render the rqp questions. Its id field is a foreign key for the quiz_rqp table. How is this to be backed up?
From Gustav Delius (gwd2 at york.ac.uk) Monday, 9 May 2005, 07:26 PM:
I had a chat with Eloy. We agreed that Julian and I would in the first instance concentrate on writing the restore code for the current backups only, so that our pair of backuplib.php and restorelib.php work together flawlessly to allow backup and restore of the current database structure. Eloy will then look at the updating code necessary to restore old backups.
Eloy has created a new file restorelibpre15.php in CVS in which he will work. Julian and I will be working in the existing restorelib.php
I will start working on restorelib.php this night. Julian, could you make sure the question type specific bits of backuplib.php are done first, then when I am done with the generic bit of restorelib.php you can make the question type specific changes there as well.
From Gustav Delius (gwd2 at york.ac.uk) Monday, 16 May 2005, 02:47 AM:
Julian, as soon as you come online tomorrow can you please chat to Eloy and me? Eloy has questions to ask.
From Eloy Lafuente (stronk7 at moodle.org) Thursday, 26 May 2005, 02:30 AM:
pre15 restore code is finished.
Should we close this or, perhaps, do you prefer to leave it open until 1.5 <==> 1.5 was finished?
From Gustav Delius (gwd2 at york.ac.uk) Wednesday, 1 June 2005, 02:33 PM:
I'll leave this open to remind myself that the 1.5 backup and restore needs more testing.
From Gustav Delius (gwd2 at york.ac.uk) Sunday, 5 June 2005, 09:51 PM:
The Moodle 1.5 restore code now skips the restoring of user attempts (and prints a message to that effect) because there are still the following outstanding issues:
1) The answer field in states for random questions is not recoded.
2) The state field in the quiz_rqp_states field is not recoded.
Possibly there are more issues, the whole thing needs to be gone over carefully. Will have to wait for Moodle 1.5.1
From Julian Sedding (jps502 at york.ac.uk) Tuesday, 20 September 2005, 06:29 PM:
I have found the following issues so far:
PRE 1.5 works alright, however, there are some issues that are indirectly relevant:
1.5 -> 1.5 restore
So far that's all I could find.
Julian
From Julian Sedding (jps502 at york.ac.uk) Thursday, 29 September 2005, 06:44 AM:
I propose the attached file as a fix for this bug. I would welcome any help in testing, since I don't have a database with many questions and attempts.
The lack of testing is also the reason why I din't commit the file yet.
Julian
From oen roggemans (koen at roggemans.net) Sunday, 30 October 2005, 03:57 PM:
A Belgian user ( willy.vansteendam AT cvo-aalst.be ) found another bug in the quiz restore function wich AFAICS not yet listed here: the path (course ID number etc) for the images used in a question is not modified, causing the image not to show up. The image itself however is copied.
I have tested this in 1.5.2+ build 17/10 and 1.6 build 30/10
From Petr Skoda (skodak at centrum.cz) Tuesday, 1 November 2005, 05:04 PM:
Quiz image links are constructed on the fly from relative paths. Users must not link to quizfile.php directly. Backup/restore of links to file.php should work just fine I hope, right?
From Joseph R?zeau (joseph.rezeau at uhb.fr) Friday, 13 January 2006, 08:39 PM:
It's a pity that complete reliable restoration of quizzes with user data is still not available in moodle 1.5.3 stable.
From Gustav Delius (gwd2 at york.ac.uk) Wednesday, 12 April 2006, 06:33 AM:
Of course this needs more testing with real data. But problems should be reported in new bug reports.
- calculated questions in 1.4 don't store sufficient information for restoring the responses, which can lead to quiz reviews being corrupt. I suggest setting state->answer for calculated questions to the empty string.
1.5 -> 1.5 restore- multianswer doesn't is still a comma separated list of hyphen separated pairs, but the first element in the pair is now the sequence number (i.e. 1,2,3,4,...) and not the multianswer id any more. The sequence number can be used to identify the correct question id in the sequence field of quiz_multianswer table. The questions are needed to identify the questiontype, so we can leave shortanswer and numerical subquestions alone, while fixing the answer ids for multichoice subquestions.
So far that's all I could find. Julian From Julian Sedding (jps502 at york.ac.uk) Thursday, 29 September 2005, 06:44 AM: I propose the attached file as a fix for this bug. I would welcome any help in testing, since I don't have a database with many questions and attempts. The lack of testing is also the reason why I din't commit the file yet. Julian From oen roggemans (koen at roggemans.net) Sunday, 30 October 2005, 03:57 PM: A Belgian user ( willy.vansteendam AT cvo-aalst.be ) found another bug in the quiz restore function wich AFAICS not yet listed here: the path (course ID number etc) for the images used in a question is not modified, causing the image not to show up. The image itself however is copied. I have tested this in 1.5.2+ build 17/10 and 1.6 build 30/10 From Petr Skoda (skodak at centrum.cz) Tuesday, 1 November 2005, 05:04 PM: Quiz image links are constructed on the fly from relative paths. Users must not link to quizfile.php directly. Backup/restore of links to file.php should work just fine I hope, right? From Joseph R?zeau (joseph.rezeau at uhb.fr) Friday, 13 January 2006, 08:39 PM: It's a pity that complete reliable restoration of quizzes with user data is still not available in moodle 1.5.3 stable. From Gustav Delius (gwd2 at york.ac.uk) Wednesday, 12 April 2006, 06:33 AM: Of course this needs more testing with real data. But problems should be reported in new bug reports.