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

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

by Ahmad Amer -
Number of replies: 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!!!?

Average of ratings: -
In reply to Ahmad Amer

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

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of 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.

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

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

by 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”?!


In reply to Ahmad Amer

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

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of 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!

In reply to Dominique Bauer

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

by Ahmad Amer -

This is how my category screen look likes:

Attachment Category.png
In reply to Ahmad Amer

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

by 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.
In reply to Beatriz Rojo

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

by Ahmad Amer -
Thanks Beatriz

I tried this but still when I make a copy of the quiz there is no copy for the category!!!
In reply to Ahmad Amer

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

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of 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. 

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

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

by 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)!!!
In reply to Ahmad Amer

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

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of 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).

In reply to Dominique Bauer

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

by 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?

In reply to Ahmad Amer

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

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of 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?

In reply to Dominique Bauer

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

by 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!!

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

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

by 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!!!