Importing a course - Question bank issue

Importing a course - Question bank issue

Justin Hunter -
回帖数:5

Hello, I have 3.6.1 installed.  Only extra plugin is the Custom Certificate.


Here's the issue:


Class A, B, C, & D were all originally identical.  Users were enrolled in classes C & D.  During their class, I updated several questions in the master question bank.

Now, I want create class E.  So, I create Class E and then attempt to import the entire class from C or D.  It starts to import and eventuially gets a browser error that says "file compression format not supported."

If I try to import the course WITHOUT the question bank, it will successfully import the course but it will NOT allow me to also import my quizzes and exams.

If I try to import courses A or B, it will do so successfully but those courses are now outdated and this would be futile work.

If I import from C or D I lose all my quizzes which would also be futile.

Any thoughts on why I cannot complete a course import from courses C or D?  Thanks in advance

回复Justin Hunter

Re: Importing a course - Question bank issue

Rick Jerz -
Particularly helpful Moodlers的头像 Testers的头像

I have found that it can take a lot of time to import a course with the question bank, just like you.  And yes, if you import a course without questions, the quizzes are missing.  I think that this problem has already been recognized in the Moodle Tracker system, and the work to fix it might be "in progress."  I don't recall the MDL number.

Are you giving the import enough time to finish?  Don't interrupt it.  Does it end with an apparent "finished" web page?  If it doesn't end with this (I forget the exact wording) "finished" web page, you might need to adjust some of your php timeout settings.

回复Rick Jerz

Re: Importing a course - Question bank issue

Justin Hunter -

Hi Rick.  Thank you.  It’s not a size issue.  I have tried to do this by backing up and restoring as well.  The course is only 20mb.  It does not time out.  I do not interrupt it and it is not a php timeout setting.  Any other thoughts?


回复Justin Hunter

Re: Importing a course - Question bank issue

ben reynolds -

I think I ran into a variation on this problem when I tried to backup & download one quiz and ended up taking the whole question bank. My solution (I think I remember) was to export the quiz questions. Then export the quiz without any questions. Then import both into the target course.

In your situation, although it is tedious, you might try exporting the whole question bank (as an .mbz backup) and then each quiz individually. Restore each quiz into Class E. Then import the question bank (separate from the course). So 1) import the course to E without quiz and questions. 2) Tediously restore the questionless quizzes. 3) Import the question bank.

However, I'm troubled by the browser message about unsupported format. Since the browser is merely watching what the server & Moodle are doing, the root problem is with the server or Moodle. I'm guessing Moodle is giving you that generic message because it doesn't like unzipping a particular question.

You can test my guess by backing up only the question bank and trying to restore it to an empty course shell.


回复Justin Hunter

Re: Importing a course - Question bank issue

Ken Task -
Particularly helpful Moodlers的头像

Have you tried making a no user backup of 'C' and restoring to new course (E)?

The size of a backup file (.mbz) can be deceiving sometimes ... it's not really the size of that file, but what's contained there in that is 'heavy processing'.   Quiz is one of those 'heavy processes'.

Check your web service error logs for errors ... if one is using MySQL and sees something like 'Server has gone away' it is referring to the DB server.

Fix for that is increasing `max_allowed_packet` size in `my.cnf` ,,, config for DB server then restarting the DB service.

The other possible maybe ... max_input_vars ... a PHP setting ... default is 1000 ... might need to bump it upwards.

You can see settings for PHP in Site Admin -> Server -> PHP info.

Without more detail info - type of hosting (shared or dedicated), etc. etc. and checking of what one might see in logs of your server, we are all guessing from previous experiences addressing something similar.

... case in point ... was helping someone the other day ... 17.1M backup file (the course was mostly quizzes [moodle and hotpot]) would sporadically restore un-successfully ... error 404 and 500's.   Turned out to be mod_secure rule sometimes kicking in and stopping the restore.

Have looked around for the compression error your browser is reporting via Google ... nothing for other Moodle users reported  that I can find.

What browser are you using?

'spirit of sharing', Ken




回复Justin Hunter

Re: Importing a course - Question bank issue

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
Hi

I'm also trying to understand how exactly the quizzes [1] and question banks [2] behave across course boundaries [3] and course backup [4] / restore [5], import from other courses [6] and import/export of question banks. The complication is that unlike a simple resource, say File, or a simple activity, say Book, the questions are not bound to a course but to a context [7]. There are simply too many possible combinations so that simple trial-and-error will lead to "unexpected" results. I don't claim to understand it all, in need rather.

To put it another way, you need to formulate your work-flow of question banks and quizzes and plan ahead. Which means answers to questions like: Are you (the administrator?) the only question creator, the individual teachers just inherit them? Or, do the teachers create questions too? Will there share questions? Are all the teachers equal or divided in to separate departments - one department not supposed to see the question banks of the other depts.?

My guess is that, only the documentation is missing (or I have missed the documentation).

[1] https://docs.moodle.org/en/Quiz_quick_guide
[2] https://docs.moodle.org/en/Question_bank
[3] https://docs.moodle.org/en/Courses
[4] https://docs.moodle.org/en/Course_backup
[5] https://docs.moodle.org/en/Course_restore
[6] https://docs.moodle.org/en/Import_course_data
[7] https://docs.moodle.org/en/Question_contexts