Hotpot backup restore doesn't work

Hotpot backup restore doesn't work

by Robin de Vries -
Number of replies: 13

Hi,

We have a moodle 2.1 enviroment for testing our courses and in september, we want to migrate it to the live server.

Problem is, when i backup a course, the hotpot sourcefiles aren't backed up, and when I restore on a other site, the hotpots can't find the files.

Can someone help me?

With kind regards,

Robin de Vries

Average of ratings: -
In reply to Robin de Vries

Re: Hotpot backup restore doesn't work

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

Dear Robin,
I am a little busy for the next week or so, but after that I will have time to investigate this issue and report back.

regards
Gordon

In reply to Gordon Bateson

Re: Hotpot backup restore doesn't work

by Robin de Vries -

Hi Gordon,

Can you give me the date that you expect it is fixed. We are preparing a Moodle for 1300 users. It must go live on 29 august.

I'am writing a 1.9 -> 2.1 restore script for hotpot, but it doesn't work, the same error as a 2.1 to 2.1 backup-restore.  If the moodle1 converter script works, you can have it smile

With kind regards,

Robin

In reply to Robin de Vries

Re: Hotpot backup restore doesn't work

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

Hi Robin,
I had a quick look today at the issue and confirmed that HotPot restore does not restore any files. I tried a couple of simple modifications to the code, but they had no effect, so I will have to delve deeper.

For the next week, I am busy moving around and will not have quality programming time, so I cannot promise to look again at this issue until Sunday Aug 28th. Hopefully I can fix it, but maybe I can't. Backup in Moodle 2 is horribly complicated and file handling is a nightmare. I can guarantee I will do my best.

regards
Gordon

In reply to Gordon Bateson

Re: Hotpot backup restore doesn't work

by Robin de Vries -

Hi Gordon,

See attachement, hope it's helping..

With kind regards,
Robin de Vries

Average of ratings: Useful (1)
In reply to Robin de Vries

Re: Hotpot backup restore doesn't work

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

Wow - thanks Robin. I have modified the backup/restore scripts in the way you suggest and BINGO - it works !

YOu can get the latest HotPot scripts from here:

best regards
Gordon

In reply to Gordon Bateson

Re: Hotpot backup restore doesn't work

by Robin de Vries -

Hi Gordon,

In the attachement you'll find the backup/moodle1/lib.php

It works for 50%, if you converted a backup, open the hotpot-instance-settingspage, press 'save changes' and it will fix the sourcetype and sourceitemid.

You have to finish the script, when you have time. I hope you can use my startup.

With kind regards,

Robin

In reply to Robin de Vries

Re: Hotpot backup restore doesn't work

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

Dear Robin,
thank you so much for the Moodle 1.x -> 2.x conversion script !

In the latest version of the HotPot module (for Moodle 2.x) I have removed the "sourceitemid" field, so we don't need to worry about that field any more. I have some good ideas about how to set the "sourcetype", because the "hotpot/db/update.php" script also does that.

I am not sure yet what we need to do about the source file itself. As you know in Moodle 1.x the file is a seperate file on the server's file system, but in Moodle 2.x it needs to be imported into the Moodle database. Therefore, we will have to find a way to check if the file is included in the Moodle 1.9 backup file, and if it is we need to extract it and convert it to the Moodle 2.x format. Once that is done we should be good to go.

I will investigate further in September after I get back to Japan from my current trip to EuroCALL in Nottingham, UK.

best regards
Gordon

In reply to Gordon Bateson

Re: Hotpot backup restore doesn't work

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hello Gordon,

I am hijacking this discussion to ask you to give all my best to all those EUROCALL people whom I have met in the past 20 years.

Do enjoy the rest of your tour of Europe, have a safe return home and keep up the good work!

Joseph

In reply to Gordon Bateson

Re: Hotpot backup restore doesn't work

by Gerard Mac -

Where is this currently at? We are using this with over 2000+ hotpots and currently having the issue restoring them from a backup. Has the fixes been pushed back to the maintainer of the module so we can help out others that are facing this issue.

Using moodle 2.2.1

In reply to Gerard Mac

Re: Hotpot backup restore doesn't work

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

The 1.9 -> 2.x restore functionality is not implemented yet in HotPot for Moodle 2.x. We have the suggestions kindly offered by Robin earlier in this thread. I hope I can find time to include them in the module at some point, but I am very busy right now, and I have several large tasks waiting in the wings.

In reply to Gordon Bateson

Re: Hotpot backup restore doesn't work

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

Just to be clear, the 1.9 -> 2.x *update* functionality is working on HotPot for Moodle 2.x, so one workaround for your situation is to update a copy of your your entire 1.9 site to Moodle 2.2, and then backup individual courses from there and restore them to your new site. That'll work.

FYI, the sticking point on the 1.9 -> 2.x *restore* for HotPot is converting the the Hot Potatoes files. It is not a trivial problem to overcome, but I think it can be done, as long as the files are included in the 1.9 backup.

Also, are you aware that a 1.9 -> 2.x *restore* does not restore any user data for any type of activity? None at all. I understand that this restoring 1.9 user data to a Moodle 2.x site may become available in Moodle 2.3.

In reply to Gordon Bateson

Re: Hotpot backup restore doesn't work

by Debbie McDonald -

Hi Gordon,

It's been a while! smile We are trying to move some well used HotPot lessons from one site to another but do not see to have a restore feature in the new site.

  • Old site: Moodle 2.0.2+ (Build: 20110413), HotPot: 2010080328
  • New site: Moodle 2.2.7 (Build: 20130114), HotPot: 2010080343

Basically, I tried to do a back-up and restore with a .mbz file and got the following error: Error: HotPot record is missing sourcetype

I can't figure out where to locate the files on my server, I do have access to just go grab the files if I knew where to look.

Help! 

 

In reply to Debbie McDonald

Re: Hotpot backup restore doesn't work

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

Hi Debbie,
hope you're well smile

Both those HotPot version numbers are quite old. I suggest you update to the latest version of the HotPot module (2010080362) on both the old and the new site, then try the backup -> restore again, and let us know how you get on.

best regards
Gordon