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

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

av Mike Churchward -
Antal svar: 7
Bild på Core developers Bild på Plugin developers Bild på 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

Genomsnitt av betyg: -
Som svar till Mike Churchward

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

av Eloy Lafuente (stronk7) -
Bild på Core developers Bild på Documentation writers Bild på Moodle HQ Bild på Peer reviewers Bild på Plugin developers Bild på 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 leende

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

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

av 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

Som svar till Hideto Harashima

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

av Pablo Morey -
Hi Hideto:

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

Pablo Morey
Som svar till Pablo Morey

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

av 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

 

Som svar till Eloy Lafuente (stronk7)

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

av 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

Som svar till Matt Molloy

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

av 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
Som svar till Mike Churchward

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

av 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?