duplicating the quiz does not duplicate the questions in the category!

duplicating the quiz does not duplicate the questions in the category!

- Ahmad Amer の投稿
返信数: 14

Salam Alykom,

I need to creat one template - one quiz to be dupicated and filled in with new items. However, when I do this the number of questions in the category does not change. 


Doesn't this cause ovveriding the original questions!!!?

Ahmad Amer への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Dominique Bauer の投稿
画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Plugin developers

Hello Ahmad,

When you add questions to a quiz, you are not actually adding questions, but rather links or pointers to questions in the question bank.

When you copy a quiz, two things can happen depending on where the questions are:

  • If the questions are in the question category for the quiz, i.e. the default category for questions shared in the quiz context, the quiz is copied as well as the questions which are placed in a new question category for the new quiz.
  • If the questions are not in the question category for the quiz, the quiz is copied but not the questions. Only the links to the original questions are copied. Yes, "this actually cause overriding the original questions". Be careful!

Since this is a tricky and frequently asked question, I added Copying a quiz on the "Quiz FAQ" page of MoodleDocs.

Dominique Bauer への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Ahmad Amer の投稿

Thank you Dominique for your ongoing support.

What is the “default category for question shared in the quiz context”?


The way I create quizzes is the following:

First I create a category - I give it the title of the text

Then I create the quiz - I give the quiz the same title 

Then I edit the quiz and add the question from the category that has the same title as the quiz.


Are such categories “default category for question shared in the quiz context”?!


Ahmad Amer への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Dominique Bauer の投稿
画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Plugin developers

Hello Ahmad,

The way I create quizzes is the following:


  • First I create a category - I give it the title of the text
  • Then I create the quiz - I give the quiz the same title
  • Then I edit the quiz and add the question from the category that has the same title as the quiz.

Are such categories “default category for question shared in the quiz context”?!

No. To place questions in the default category for questions shared in the quiz context, follow these steps:

  • Create a quiz called "Quiz_1" / Edit quiz / Add / + a new question / Choose a question type to add / Multiple choice (for example) / Add.
  • On the "Adding a Multiple choice question" page and under General, select the category "Default for Quiz_1" (which appears first in the drop-down menu).
  • Always select the "Default for Quiz 1" category for each question you add to Quiz_1.

That's it!

Dominique Bauer への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Ahmad Amer の投稿

This is how my category screen look likes:

添付 Category.png
Ahmad Amer への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Beatriz Rojo の投稿
Hello Ahmad,
the categories are subcategories of the "Default for LITERATURE" category. You can see it in the bullet points. If you want to make one of them a "main" category, you can click the <- arrow.
Beatriz Rojo への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Ahmad Amer の投稿
Thanks Beatriz

I tried this but still when I make a copy of the quiz there is no copy for the category!!!
Ahmad Amer への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- John Provasnik の投稿
画像 Particularly helpful Moodlers 画像 Testers

Yes , this is the default behavior. so to fix that, go to your "template quiz" and edit each question. Change each question's category (the very first option) - You want to ensure the question is saved into the "Quiz's" default category and not the "course's" default category. 

Once all questions are saved directly into the quiz's default category, then when you duplicate this quiz all duplicates will have unique copies of the questions, and those questions will be saved in each of the respective quiz's question banks. 

John Provasnik への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Ahmad Amer の投稿
John 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)!!!
Ahmad Amer への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Dominique Bauer の投稿
画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Plugin developers

Hello Ahmad,

However, no category was copied/generated for the new quiz (Quiz-1 Copy)!!!

A quiz category must have been created for the new quiz (Quiz-1 Copy). Please, double check. See: How to access the Quiz activity context (quiz level category).

Dominique Bauer への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Ahmad Amer の投稿

Salam Dominique 

Is it the case in every Moodle version?

Does it work in the free version of MoodleCloud?

Does it work for only admins or teachers too?

Ahmad Amer への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Dominique Bauer の投稿
画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Plugin developers

Salam Ahmad,

Assuming you're talking about accessing the Quiz activity context:

Is it the case in every Moodle version?
Most likely.

Does it work in the free version of MoodleCloud?
Most likely.

Does it work for only admins or teachers too?
It works for administrators and teachers.


Why do you ask?

Dominique Bauer への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Ahmad Amer の投稿

Salam Dominique 

I understand now what is meant by quiz activity context. I created some quizzes saving the question in the quiz context category (default ...). I succeeded to duplicate quizzes and the original questions were not overridden.


So far so good.

However, I don’t see any new categories for the new duplicated quizzes. I only see the original quiz default category with the original number of questions. Namely, I see neither the categories (of the duplicated quizzes) neither the new questions of the new duplicated quizzes!!

John Provasnik への返信

Re: duplicating the quiz does not duplicate the questions in the category!

- Ahmad Amer の投稿
Hi John

I tried the following: " to fix that, go to your "template quiz" and edit each question. Change each question's category (the very first option) - You want to ensure the question is saved into the "Quiz's" default category and not the "course's" default category. "

There is no "Quiz's" default category!!! I do not find it!!!