Unable to restore course data and imports

Unable to restore course data and imports

by Ross Quinnell -
Number of replies: 19
Hello,

For some reason, I am not able to restore or import any data from any course, I have a suspicion it is something to do with collapsible topics.

Here is a screenshot of the message I am getting.

N/A
Any help would be much appreciated.
Average of ratings: -
In reply to Ross Quinnell

Re: Unable to restore course data and imports

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok,

What version of Moodle and why do you think it is to do with Collapsed Topics?

BTW the missing string definition is:

$string['restoremultipletopcats'] = 'The backup file contains more than one top-level question categories for context {$a}.';

thus could be something to do with the problem?

In reply to Gareth J Barnard

Re: Unable to restore course data and imports

by Ross Quinnell -

Thanks for the quick response,


The only reason why I have this suspicion is, I am only getting this error on courses that are using the collapsible topics.


Were currently running Moodle 3.5.1 (Build: 20180709)
In reply to Ross Quinnell

Re: Unable to restore course data and imports

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

If on one of those courses with the problem you change to the topics format then try again, does the error still happen?  You can change back again.

What version of CT please?

In reply to Gareth J Barnard

Re: Unable to restore course data and imports

by Ross Quinnell -

I can confirm that error still occurs. So it would be something to do with the course, not the Collapsedtopics format.


I am running 3.5.0.2 of collapsedtopics 

In reply to Ross Quinnell

Re: Unable to restore course data and imports

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

So, now take a look at the actual error which is complaining about your question bank...try restoring without quizzes and then try importing the quizzes.  It looks like you have a question bank category that is causing issues...

In reply to Emma Richardson

Re: Unable to restore course data and imports

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Are there any errors in the PHP log file?  If you take the MBZ file to a test server with developer level debugging on, do you see any error messages when restoring it?  If you backup the course with no users and restore that, then does the error occur?  And if so with the no-user backup, would you be willing to share the file for others to investigate?

In reply to Emma Richardson

Re: Unable to restore course data and imports

by Ross Quinnell -

I am able to restore the course without the quiz but unable to import them after restoring the course.

In reply to Ross Quinnell

Re: Unable to restore course data and imports

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Turn debugging on when you try to import the quiz.  Take a look at the quiz categories for that course...something has gone awry somewhere - you might need to look at the database...

In reply to Emma Richardson

Re: Unable to restore course data and imports

by Ross Quinnell -

Ok, thanks


I have tried debugging option on, and I did not see any errors on the page, even though that option is enabled.  Nor could I find the server log file, maybe perhaps it is because we're using a sherd hosting account that uses Linux.


The only thing I have picked up on is that one of the categories under the actual quiz activity was as the others are assigned to the course itself. Also in the database, I see a lot of unknown host under the stamp column.  

In reply to Emma Richardson

Re: Unable to restore course data and imports

by Ross Quinnell -

Thanks for your help.


I am now able to import and restore the course properly now after deleting the unknown host entries.

In reply to Ross Quinnell

Re: Unable to restore course data and imports

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

Ross, could you please explain in detail what you did as a work around?

For me it's not clear what you did to solve this. And since I (and probably others) might run into this problem, it would be nice to have a clear explanation of how to get rid of it.

In reply to Ross Quinnell

Re: Unable to restore course data and imports

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

Having exactly the same error. It has to do with multiple top categories in your question bank. There's a tracker here: MDL-62897 and it say's it's fixed...

However, I can't get past this error.

I'm trying to restore a course from a backup system. I only have the back upped course and I need to restore this. I have tested several versions of Moodle. Backup was made on Moodle 3.5 and I can't get it to restore anywhere, not even in a Moodle 3.5.2

I went inside the Moodle backup file and deleted questions.xml. That still didn't help. I don't even need the question bank to be restored, I just need the content of the course.

Any suggestions are welcome!

In reply to Richard van Iwaarden

Re: Unable to restore course data and imports

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

If you don't need the question bank, just unselect that when you restore.

In reply to Emma Richardson

Re: Unable to restore course data and imports

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

I wish! It's not an option!

(didn't that used to be an option though?)



In reply to Richard van Iwaarden

Re: Unable to restore course data and imports

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Yes - how strange - I see on the backup from screen, question bank is mentioned but not then in the restore screen.  It seems to presume that if you backed up the question bank, then you must want to restore it...?

We really need to move this over to the quiz forum.  Let me ping the moderator.

In reply to Emma Richardson

Re: Unable to restore course data and imports

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

I think (moderators hat) that this post should stay here as it relates to the course backup and restore mechanism, but as quiz is involved, the site policy states "If you really feel your topic falls in two forums (e.g. a major development in the Quiz module that may impact other parts of Moodle), pick the most specific (e.g. Quiz forum) and post a small pointer to the other discussion in the second forum (e.g. General developer forum).", so a 'linking' post would be appropriate.

In reply to Gareth J Barnard

Re: Unable to restore course data and imports

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Actually, you are probably right Gareth -so let's put it in the back up and restore forum and then I will split out the question bank piece and send to quiz forum.  It really isn't a course format issue at all though...

In reply to Emma Richardson

Re: Unable to restore course data and imports

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

I agree, this seems to be a restore issue...

In reply to Richard van Iwaarden

Re: Unable to restore course data and imports

by Bohumil Havel -
Picture of Particularly helpful Moodlers Picture of Translators
We met the same problem (restoremultipletopcats) and solved by upgade Moodle (3.5.6).