Moodle 2.1 Hotpot backup restore doesn't work

Moodle 2.1 Hotpot backup restore doesn't work

by Alan Cherwinski -
Number of replies: 6

Unable to import or restore courses with HotPot activities. I upgraded 1.9 to 2.1 and the course and HotPot activites were fine. Now when I try to copy (backup and restore) the 2.1 course to either the same 2.1 or a different 2.1 server the HotPot files don't transfer. The import will work, but mixes up all the content. The restore just fails with Database Error.

Is this an issue of the HotPot activities being in the Legacy Course Files?

With the new file picker there does not appear to an easy method of downloading all the 100's of files and rebuilding the course outside the Legacy Course Files structure.

I upgrade the Hot Pot mod to 2.2. and that made no difference.

Average of ratings: -
In reply to Alan Cherwinski

Re: Moodle 2.1 Hotpot backup restore doesn't work

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Please copy and paste the "Database error".

For HotPots that were upgraded from Moodle 1.9, the files should be migrated into the database. At the moment, I don't see how they could have been left in Legacy Course Files.

So perhaps you are reporting a situation where NEW HotPots created in Moodle 2.1 whose source files are in the Legcay Course Files cannot be backed up and then restored?

In reply to Gordon Bateson

Re: Moodle 2.1 Hotpot backup restore doesn't work

by Alan Cherwinski -

Hello Gordon,

Sorry for the delay in responding.

The database error is simply an error message.

Is there a way of getting more details on the restore error. I've looked at the restore log and there is nothing there. I believe all the HotPot activities were created in 1.9 . If they were created in 2.X why would all the related files be located in the Legacy Files area?

In reply to Alan Cherwinski

Re: Moodle 2.1 Hotpot backup restore doesn't work

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

> The import will work, but mixes up all the content.
> The restore just fails with Database Error.

What do you mean by "The import" here?

I understand that you backed up a Moodle 2.x course that contained HotPot activities, and when you tried to restore it you got this error saying "Error reading from database". Is that right?

  • Were you trying to backup to the same Moodle site, or a different Moodle site
  • Could you give me Moodle version of both the source and target Moodle sites

Here are some things you could try ...

  • try backing up the course without HotPots and confirming that the restore works
  • try backing up the course with HotPots, and when restoring,  restore everything *except* the HotPots
  • try backing up and restoring a simple course with just one HotPot

If you get an error, you must try to find a better error message ...

  • try enabling Moodle debugging
  • make sure PHP debugging is switched on and allowed to print messages to the screen (you may have to alter php.ini and restart Apache for that to take effect)

> I believe all the HotPot activities were created in 1.9

Oh, does this mean you are trying to restore and backup from Moodle 1.9 onto a Moodle 2.x site? The HotPot activities won't be restored in that case. They won't cause they error you got - they will simply be omitted from the restored course. Unfortunately though, I am confused about what you are trying to do, and what actions you took, so I don't think I can be much help.

Gordon

In reply to Gordon Bateson

Re: Moodle 2.1 Hotpot backup restore doesn't work

by Alan Cherwinski -

thank you for the quick response.

The Moodle version is Moodle 2.1+ (Build: 20110719)

The restore I am trying is on the same server as the backup file was made on . The Soruce and Target are the same server. Eventually I want to restore the course to a different server of a the same or higher versions.

By Import I mean import an activity or data from another course on the same server from within a new course. The import will work, but the results are a mess.

 

I will try the steps you suggest thank you.

In reply to Gordon Bateson

Re: Moodle 2.1 Hotpot backup restore doesn't work

by Alan Cherwinski -

Restoring without any HotPots works fine. There are only labels and hotpot activities in the course.

Restoring a single HotPot worked fine. The activity appear to be in the correct location and works.

I cannot run the restore of the full backup file and deselect the Hotpot because the database error occurs as soon as I select restore. I never get to the addtional options.

I turned on the debugger and got the attached information when clicking on restore of the full backup file.

The activities were created on a 1.9 server and the entire server was upgraded (with courses) to 2.1.

Thank you,

(Edited by Gordon Bateson - original submission Saturday, 10 March 2012, 02:43 AM) changed attachment from rtf to txt file

In reply to Alan Cherwinski

Re: Moodle 2.1 Hotpot backup restore doesn't work

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

> ... the database error occurs as soon as I select restore

Then I think the problem is that either your Apache or your MySQL server runs out of memory.

You can check this is the case or not by restoring a decent size course that has no HotPots (but has more than just labels !) If that restore works then you can concetrate on the HotPot module, but if the restore doesn't work, then we know the problem is either that the Apache/MySQL servers need more memory, or there is a problem in the restore code of the version of Moodle you are using.

In any event, I recommend you do a MySQL backup of your database, and then update your Moodle to the latest stable version (2.2) and for good measure, update your HotPot module too.

Gordon