Problems (again!) restoring multianswer questions (Cloze)

Problems (again!) restoring multianswer questions (Cloze)

by Susana L. -
Number of replies: 2

Hi!

We are having problems restoring multianswer questions on Moodle 3.1. Teachers complain that after restoring their courses, question categories get disorganised and multianswer (cloze) question's code gets messy. When trying to reproduce the problem we could confirm that the course restore is throwing an error (attached). (NOTE: The courses were backed up on Moodle 2.7 and restored on Moodle 3.1).

We had this same problem on the previous academic year when using Moodle 2.7:
https://tracker.moodle.org/browse/MDL-35987

At that time I did post the problem on this forum:
https://moodle.org/mod/forum/discuss.php?d=341285
We manually fixed most of the questions (ufff) and we made a small change on moodle2.7 and apparently we were able to fix future restores on Moodle 2.7.

Now, using Moodle 3.1 the multianswer questions mess is back again!!

I could find a tracker issue that may be related to our problem but it is not solved and has priority "Minor"???:
https://tracker.moodle.org/browse/MDL-54724

This is a major issue for us. We have teachers with hundreds of cloze questions and getting frustrated because they are experiencing the same problem again.

I find kind of weird not having more people complaining about this issue... Do know about any similar problem?

Thank you for your attention!
susana

--------
Moodle 3.1
PostgreSQL

Average of ratings: -
In reply to Susana L.

Re: Problems (again!) restoring multianswer questions (Cloze)

by Susana L. -
When trying to manually delete questions and categories on question bank we noticed we have several categories that although they show 0 questions it is asked the user to move X questions to other category. When trying to do so we get the following error:


moodle_database::get_in_or_equal() does not accept empty arrays

Debug info:
Error code: codingerror
×Stack trace:
line 750 of /lib/dml/moodle_database.php: coding_exception thrown
line 555 of /lib/questionlib.php: call to moodle_database->get_in_or_equal()
line 387 of /question/category_class.php: call to question_move_questions_to_category()
line 370 of /question/category_class.php: call to question_category_object->move_questions()
line 101 of /question/category.php: call to question_category_object->move_questions_and_delete_category()

In reply to Susana L.

Re: Problems (again!) restoring multianswer questions (Cloze)

by Susana L. -

As a workaround for the "get_in_or_equal() does not accept empty arrays" problem described above, we create a dummy question in the category we want to delete and then when trying to delete the category it does not show the error anymore because we have a "real" question, so the array is not empty...

Average of ratings: Useful (1)