1.9 --> 2.3 upgrad; links to hotpot files broken

1.9 --> 2.3 upgrad; links to hotpot files broken

by Claude Eilers -
Number of replies: 7

I'm moving a course from 1.9 to 2.3 that has a lot of hotpots.  I'm backing up 1.9 with the files, but when the course gets restored the hotpot exercises suffer from broken links. Clicking on them gets this message:

Source file not found (or empty): /03_new_03/03.0b.verb_parsing_2.html

More information about this error

Debug info: 

Error code: sourcefilenotfound

Stack trace:

  • line 1130 of /mod/hotpot/locallib.php: moodle_exception thrown
  • line 992 of /mod/hotpot/locallib.php: call to hotpot->get_sourcefile()
  • line 1142 of /mod/hotpot/locallib.php: call to hotpot->get_source()
  • line 1304 of /mod/hotpot/locallib.php: call to hotpot->get_outputformat()
  • line 72 of /mod/hotpot/attempt.php: call to hotpot->get_attempt_renderer_subtype()

Editing the hotpot leaves this:

Average of ratings: -
In reply to Claude Eilers

Re: 1.9 --> 2.3 upgrad; links to hotpot files broken

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

Claude,
what do you mean by "moving"? Are you (a) upgrading an entire 1.9 site directly to 2.3, or (b) backing up a complete course from a 1.9 site and hoping to restore it to a 2.3 site?

If (b), then did you include the course files when you backed up? If not, please do the backup again and be sure to include course files.

The message tells you that Moodle is searching for a particular file: "/03_new_03/03.0b.verb_parsing_2.html". Can you see that file anywhere? Is it in the "course_files" folder shown in your screen shot? If you have a "Legacy course files" folder in your 2.3 course, can you see the file there.

Gordon

In reply to Gordon Bateson

Re: 1.9 --> 2.3 upgrad; links to hotpot files broken

by Claude Eilers -

I'm backing up a course from 1.9 and restoring it to 2.3.  The backup was with course files.  The file is there within the directory, and setting it as the 'main file' will make it all work.  But shouldn't it be linking directly?

In reply to Claude Eilers

Re: 1.9 --> 2.3 upgrad; links to hotpot files broken

by Claude Eilers -

Another piece of salient info:

  • the links are all broken when merging into an existing course
  • the links are all OK when opting for the backup-to-a-new-course

I will do the latter (so my problem is solved), but there may be a bug to be chased down here.

In reply to Claude Eilers

Re: 1.9 --> 2.3 upgrad; links to hotpot files broken

by Claude Eilers -

Still more potentially (?) useful info.  When it goes successfully, the files for each hotpot look like this:

In reply to Claude Eilers

Re: 1.9 --> 2.3 upgrad; links to hotpot files broken

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

> When it goes successfully ...

And do I understand correctly from what you said earlier that the restore "goes successfully" when you restore to a new course, but it does not go successfully when you restore to a course that already exists?

In reply to Gordon Bateson

Re: 1.9 --> 2.3 upgrad; links to hotpot files broken

by Claude Eilers -

Yes, that's right.  If I restore by merging into an existing course:

  • the links are all dead
  • the hotpot file appears in its directory in the edit window, but is not set as the 'main file'

By contrast, if I restore by creating a new course, all works as expected but

  • in the edit window, the hotpot file appears in two places, one of which is set as the 'main file'
In reply to Claude Eilers

Re: 1.9 --> 2.3 upgrad; links to hotpot files broken

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

Thanks for the confirmation Claude.

I think I have found the cause of the problem with the paths when restoring a HotPot activity from a Moodle 1.x backup to Moodle 2.x.

Please could you update your HotPot module when you have a chance and et me know if the restore works better for you now.

thanks
Gordon