The original part of the webpage:
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2" />
<title>: Editing questionnaire</title>
<input type="text" size="60" name="choice_content_1"
value="uitočnosť">
<input type="text" size="60" name="choice_content_2"
value="rozsah-náročnosť">
The same for the restored webpage:
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2" />
<title>: Editing questionnaire</title>
<input type="text" size="60" name="choice_content_1"
value="uÂitoènosÂť">
<input type="text" size="60" name="choice_content_2"
value="rozsah-nåroènos">
I have just updated the backup/restore code with a fix that should solve your problem. Get the latest version from CVS or from the downloads page.
mike
Well, for some reason, I cannot restore my questionnaire anymore. At first, I thought, it is the new restorelib.php. But it does not work neither with the restorelib with version (1.4 2005/12/02 01:02:39 mchurch) nor with the newer one. The restore process chokes on questionnaire; if I exclude it from restore, everything goes ok. I will try to debug it to find out, what happens.
Miro
Hi Miroslav/Mike, Here at Warwickshire College we are currently evaluating Moodle against WebCT CE6. We like the Questionnaire module very much in Moodle but we have a problem with it when moving servers that might prevent us from moving to Moodle. We're having the same problem that Miroslav has described. We have found that we cannot move questionnaires from a moodle installation on one server to a moodle installation on another server.
The way we moved servers was by moving our moodle/ and moodledata/ folders over (with all necessary permissions) from the old server to the new server. We then backed up the Moodle MySql database on our old server and restored it in MySQL to the new server. We run IIS6 on Windows 2003 Server. We have also tried backing up the questionnaires individually from within moodle and then try restoring them to Moodle on the new server - however this restore always fails (with a very brief and unhelpful error message).
When we try browse to the qustionnaire on the new server the questionnaire does not display and we get an error message in a pink rectangular box which reads "The module is incorrect". If we go to warkscol » Administration » Configuration » Modules on the new server the number of activities listed for Questionnaires reads 0 when it should read 7.
We have tried upgrading our Questionnaire module to the very latest version (as of 13/02/2006) and the problem stil exists. Do you know why this is and how we can get arround this problem. Your help would be much appreciated.
Thanks, Graham.
However, afterwards I found that if the user data are ommited, the restore process finishes successfully. And I did not need to restore the user data - only the questionnaire structure, so that I did not pursue the issue any more.
But of course, if I copy the whole site using sqldump, the questionnaire is OK (this is the exact copy procedure). Only the user way : Teacher (backup/restore) did not work.
Best,
Miro
So, what youy've found is that the problem exists in the user data restore part, is that correct? I will dig into this.
mike
yes, it was the return of the function questionnaire_attempts_restore_mods at line 127 (version 1.4, file restorelib.php). So if I omitted user data, everything went smoothly. I do not remember it exactly, but it was either response_single or _multiple that was somehow uncomplete.
I did not try it with the newest version of the module as it appeared buggy from the responses.
Miro
There are some bugs being ironed out, but you can still use the latest 'restorelib.php'. It would be great if you could try again and let me know if the problem still exists.
mike
Miro
It would be great if you could send me the backup.
mike
Hi Miro,
Ideally, we need to restore the data (i.e. the questionnaire responses) AND the questionnaire itself - however, I have tried just restoring the questionnaire (without the data) and this failed in the same way - with the following error message when you try to access the questionnaire...
You will see from the attached screenshot that the questionnaire itself appears with two strange boxes adjacent to it (see below).
Miro, I am very interested in your comments about 'copying the whole site using sqldump (the exact copy procedure)' - I have never heard of this before, what is this method? what do I need to do it and how do I do it?
The method I've been using up until now - to back up and restore our entire Moodle database - is by using the MySQL Administrator tools backup and restore features. This method is perfect at backing up and restoring to the same machine - however, when you backup from one machine and restore to a different machine, the questionnaire module fails with the above errors.
We tend to move servers an awful lot here - therefore I need a reliable method for moving our entire Moodle installation intact. Any further suggestions...?
Thanks,
Graham.
- rsync /moodle and /moodledata directories and overwrite /moodle/config.php on Windows to reflect different paths
- mysqldump > file.sql (on Linux, with some options to select the databases,...)
- mysql.exe < file.sql (on Windows)
In this way, I am also able to restore the questionnaire with data.
Hope it helps,
Miro
Miro, how are you running your sqldump...? is it run directly from the MySQL command line interface...? I don't usually use the Command Line Interface I usually use the MySQL Administrator GUI tool. I'm not sure what you mean by 'links can be incorrect in the destination'... - please give an example. Not sure what you mean by 'frozen server' either.
Mike/Miro - I'm also quite concerned about those small characters that look like small boxes (squares) that appear alongside my questionnaires - please take a look at the upper of the two screenshots in my image attachment in my earlier post above - you will see two small boxes on the far right hand side. I see strange boxes appear throughout Moodle (not just the questionnaire section. They are also hyperlinked - when you click them it takes you to the smae page that you're currently viewing.
Your thoughts...?
mike
However, it should be synchronised with the content of /moodledata directory - you should consider to block web access between sqldump and backup of /moodledata so that nothing happens. That was what I called in my poor English "frozen server".
About the possible links in the mirror server: for example this can happen if there are absolute links (written by users manually) on the source server pointing to some other part of the course. If these are stored in the database in text/blob entry, they will not be translated to a correct location on the mirror server - instead they will still point to the source server. Therefore, it might be necessary to search/replace the sqldump file for such occurences.
I hope it helps.
Miro