When I import one quiz from course to course, all categories all imported too! Why?

When I import one quiz from course to course, all categories all imported too! Why?

by Ahmad Amer -
Number of replies: 15

Hi

I have a course with hundreds of quizzes and categories. When I import one quiz to another course, all categories are imported too. This causes a lot of mess! Is there a way to overcome this?


Thanks

Average of ratings: -
In reply to Ahmad Amer

Re: When I import one quiz from course to course, all categories all imported too! Why?

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

No...quizzes always import the question bank too..they have to so that they can work...

In reply to Emma Richardson

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Ahmad Amer -
but it imports all other (about a hundred) quizzes categories
In reply to Ahmad Amer

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Yes, because any time you import a quiz it imports all the categories that it has access to...
In reply to Emma Richardson

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Ahmad Amer -
It imports all other categories that the quiz has nothing to do with !!!
In reply to Ahmad Amer

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Ahmad Amer -
Is there a way to only import the categories of the quizzes I am importing without importing the other categories?
In reply to Ahmad Amer

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Ahmad,

Here are a few ways to do it.

Backup and restore course

You can backup the first course selecting only a quiz, then restore the course into the second one. This way is efficient.

Moving questions

Since most of the work is done for the questions, you can export only the questions and then quite easily rebuild the quiz.

The administrator can move questions from one course to another by transferring them via the System context of the question bank.

Teachers can use the Question sharer role if it is created by the administrator, or use the Sharing Cart if the plugin is installed.

Exporting and importing questions

To export all the questions in a category, a teacher can use the question bank / Export. The XML Moodle format is the most effective.

To export a single question, a teacher can use Modify the quiz / Preview a question (magnifying glass) and click on "Download this question in Moodle XML format".

Then the teacher can import the XML file into the other course.

Average of ratings:Useful (1)
In reply to Ahmad Amer

Re: When I import one quiz from course to course, all categories all imported too! Why?

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers

Hi Ahmad,

I spent the entire last school year dealing with this. I had thousands of math questions in my Spanish course. 

You have to go into each quiz in that course. One quiz at a time, move all of the related quiz questions out of the course level category and into the quiz level category. 

When you've done this for all quizzes in the course, you can then move the quiz to another course without copying over all other unrelated question banks 

It takes a lot of up front investment but makes less of a mess in other courses down the road. 

Average of ratings:Useful (3)
In reply to John Provasnik

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Ahmad Amer -

thanks John


What do you mean by "the quiz level category"?

Attachment Category.png
In reply to Ahmad Amer

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Ahmad,

The "quiz level category" is the quiz context that Moodle automatically creates when you create a quiz. You can only see it by going through the quiz, i.e by clicking on the name of the quiz / Actions menu (gear icon) / Question bank / Categories. The first contex, at the top of the page, entitled "Question categories for 'Quiz: name of the quiz', is the quiz context. In this context, a category is also created automatically called "Default for Name of the quiz ()" and this is where you want to place the questions as John suggested.

Average of ratings:Useful (1)
In reply to Dominique Bauer

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Ahmad Amer -
Hello Dominique,

I tried it. It worked partially. When I copied the quiz (Quiz-1 for example) I got Quiz-1 Copy. However, no category was copied/generated for the new quiz (Quiz-1 Copy)!!!
In reply to John Provasnik

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello John,

Thank you for bringing this important clarification, that it is often more practical to place questions in the quiz context.

In reply to Dominique Bauer

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Ahmad Amer -
Thanks indeed Dominique

I need to work hard now on the hundreds of quizzes I have built in the last few years ! To change them from course context to quiz context
In reply to Ahmad Amer

Re: When I import one quiz from course to course, all categories all imported too! Why?

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers
Ahmah, in case you find it helpful, I'll share the Job Aid I created when I went through this process: https://docs.google.com/document/d/1uyU2K15wI7scew6lzmevkj0zBUFvgl8k_9OUr6uG6tc/edit?usp=sharing
Average of ratings:Useful (3)
In reply to John Provasnik

Re: When I import one quiz from course to course, all categories all imported too! Why?

by Ahmad Amer -
Thank you very much John

Is step 3 no. 3 “Paste the quiz title in front of each Question Name followed by a dash: ” necessary ?
In reply to Ahmad Amer

Re: When I import one quiz from course to course, all categories all imported too! Why?

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers
No, it is not necessary. It was a step I had put in place to help me identify where a question was originally located if it got moved instead of copied.