Duplicating the Quiz activity

Duplicating the Quiz activity

by Mario Gharib -
Number of replies: 12

Dear Moodlers,

Is there a method to duplicate the plugin quiz ?

Best regards. 

Average of ratings: -
In reply to Mario Gharib

Re: Duplicating the Quiz activity

by Mario Gharib -
Any body knows how ?
In reply to Mario Gharib

Re: Duplicating the Quiz activity

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I don't know what you mean by "plugin quiz." Providing more information, or even a screenshot would be helpful.
In reply to Rick Jerz

Re: Duplicating the Quiz activity

by Mario Gharib -
Hello @RIck, thanks for the replyl

By plugin quiz I mean the default activity quiz; when you enter your course on Moodle and turn the editing on, you click on add activity and you choose Quiz;

So I need to know if I can duplicate the quiz activity; by that I mean when clicking on add activity, to have two choice of quiz activity. (See attached photo)
Attachment test.png
In reply to Mario Gharib

Re: Duplicating the Quiz activity

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
So, Mario, you want to create a new Moodle activity/plugin based on the existing standard Quiz plugin/activity? That is a tall order! What is it that you are missing in the standard Quiz that you want to implement in your own version?
In reply to Joseph Rézeau

Re: Duplicating the Quiz activity

by Mario Gharib -

Hello @Joseph, Yes that is exactly what I want to know.

The purpose simply is to set default values for each activity quiz.

For example, 

  • If a teacher wants to create a take-home quiz evaluation he should choose activity QUIZ-HOME (for example, when he first choose this activity, by default it is not restricted by IP address), and
  • if a teacher wants to create an official quiz, he should choose the activity QUIZ-OFFICIAL (for example, when he first choose this activity, by default it is restricted by IP address).

I know teachers must configure their quiz (for example, to allow or restrict access by IP address), BUT we are trying to see if it is possible to have two activity quiz that each one has its default values.

In reply to Mario Gharib

Re: Duplicating the Quiz activity

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Have you considered creating two quizzes, one with the HOME configuration and one with the OFFICIAL configuration, no questions, just serving as templates? Hide these at the top of your Moodle. When a teacher wants a HOME quiz, they duplicate the HOME quiz template and then add questions.

As Joseph said, I think it would be a lot more work to create another Activity.
Average of ratings: Useful (3)
In reply to Rick Jerz

Re: Duplicating the Quiz activity

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I forgot to mention that at last November's GlobalMoot, during the last session where Martin seeks to identify the most important improvement to Moodle, the audience's first choice (as I recall) was to have instructor "templates" for all activities. These templates would contain a set of options. There is no promise from Martin, but we hope that this feature might someday show up in Moodle. Perhaps Moodle 4.0?
Average of ratings: Useful (3)
In reply to Rick Jerz

Re: Duplicating the Quiz activity

by Mario Gharib -
Hello @Rick, thanks for the reply
Thanks for the two suggestions, I do like the second one (having an instructor templates for all activities, since the first one there is a risk of a certain teacher might by mistake change the configuration of the quiz or even delete the quiz as well.

So as an answer there is no possible way to create to new Moodle activity/plugin based on the existing standard Quiz plugin/activity
In reply to Mario Gharib

Re: Duplicating the Quiz activity

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
"is no possible way..."

Yes, there is always a way with Moodle. But you might need to be a very skilled programmer and understand what you are getting into. By the way, I am not a skilled programmer, so what I am saying is not based upon personal experience, just based upon observation of what you seek.

Some things, like text size, are easy to change in Moodle. Some things are less easy.
In reply to Rick Jerz

Re: Duplicating the Quiz activity

by Mario Gharib -
Btw, the idea of template is great,
Since I am the administrator of the platform, I tried to create a template in order to use this template when creating new courses. below are the steps:

1. Created course that contains two quiz activities,
2. I backup the course and save the file template.mbz that contains the two quiz activities.
3. I created a new course,
4. I restored the template "template.mbz" in this new course

As a result it is not allowing me to use this template. it is saying that the "questions category 'top' cannot be created by restore'

Any idea how can I overcome this issue ?
Attachment Untitled.png
In reply to Mario Gharib

Re: Duplicating the Quiz activity

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

Hello Mario,

You do not need to backup and restore. Instead, follow these simple steps:

  1. In the template course, place the questions in the quiz category or in the course category of the question bank, because it is where teachers generally have access.
  2. Create a new blank course: Site administration / Courses / Add a new course.
  3. Edit the new course: Actions menu (Gear in Boost theme) / Import / select the Template course.

The new course will then include a copy of the questions.