Restore Problem: "Could not adjust instances in course_modules!"

Restore Problem: "Could not adjust instances in course_modules!"

by Mike Churchward -
Number of replies: 7
Picture of Core developers Picture of Plugin developers Picture of Testers

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

Average of ratings: -
In reply to Mike Churchward

Re: Restore Problem: "Could not adjust instances in course_modules!"

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Mike,

after some test with the restore process I've seen that, mainly, the possible causes of that error can be some inconsistency in the sections and/or modules in your course.

Anyway, to be able to determine it exactly, can you send me (privately) your backup file. Then I'll test it in my server and, if I find something wrong, I'll inform you...

TIA and ciao smile

Note: I've moved this discussion to the "Backup&Restore" forum.
In reply to Eloy Lafuente (stronk7)

Re: Restore Problem: "Could not adjust instances in course_modules!"

by Hideto Harashima -

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

In reply to Hideto Harashima

Re: Restore Problem: "Could not adjust instances in course_modules!"

by Pablo Morey -
Hi Hideto:

I have the same problem. Did you find any solution?

Pablo Morey
In reply to Pablo Morey

Re: Restore Problem: "Could not adjust instances in course_modules!"

by Hideto Harashima -

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

 

In reply to Eloy Lafuente (stronk7)

Re: Restore Problem: "Could not adjust instances in course_modules!"

by Matt Molloy -

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

  • Checking instances

 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

In reply to Matt Molloy

Re: Restore Problem: "Could not adjust instances in course_modules!"

by Jesus Angeles -
Hi:

I have he himself problem with Moodle, moving from 1.5 to 1.6, when recovering some courses, appears the message:

"Could not adjust instances in course_modules!"

and finally

"An error has occurred and the restore could not be completed!".

You Solved that problem?

I hope that they help me

Greetings,

Jesus
In reply to Mike Churchward

Re: Restore Problem: "Could not adjust instances in course_modules!"

by Chad Bergeron -
I'm getting this error with Moodle 1.9.5+. I'm attempting to restore a Blackboard 6 export into a new Moodle course. Does anyone have some hints as to what is the root cause of this?