Just tried to restore a course to a new course, and I received the error message:
Could not adjust instances in course_modules!
What does this mean, and how can I fix it?
mike
Hi Eloy,
I found this old posting of yours as I was looking for answers to this very problem of "Could not adjust instances ....." error message as I tried to resore courses. I looked through moodle docs and B&R forum but didn't hit anything related to this problem there. I wonder if you have found the answer to this error by now. If you did, would you please tell me? I use Moodle 1.5.2 + (2005060222), FedoraCore3 Linux by the way. Thanks in advance.
Hideto
Hi Pablo,
Yes, I somehow managed to restore the courses.
The advice I got from my friend Mits Yoshida was really helpful, which I copy below.
1. Empty MySQL table mdl_backup_ids
2. Erase the temp directory in dataroot
3. Rewrite the line 415 of moodle/backup/lib.php as follows:
[after]
// $status = insert_record ("backup_ids", $rec,
false,"backup_code");
[before]
$status = insert_record ("backup_ids", $rec, false,"backup_code");
4. Restore the courses using the backup data
5. Reset the moodle/backup/lib.php to the original.
[after]
$status = insert_record ("backup_ids", $rec, false,"backup_code");
[before]
// $status = insert_record ("backup_ids", $rec,
false,"backup_code");
Hope this works for you, too.
cheers,
Hideto
Hello Eloy,
Did you ever get to the bottom of this problem? I was moving from 1.5 to 1.6 and from easyphp to xampp, so went the route of backing up my courses, getting the new installation up and running, then restoring my backups. This worked fine for the bulk of my courses, but for the last 2 or 3, in IE the backup just seemed to lockup. Suspecting an IE issue, I attempted the restore in FireFox, and that was more informative. The restore crawled (compared to earlier restores) and eventually firefox showed
Could not adjust instances in course_modules!
and finally "An error has occurred and the restore could not be completed!"
Any ideas or suggestions?
Regards,
Matt