Cloning the quiz activity

Cloning the quiz activity

by Csaba Gloner -
Number of replies: 5

Hi,

I am not a developer, so sorry for the basic question, tried to look for this info but could not find it.

I want to have two different quiz activities on a site. The first one is the default one, the second one will be slightly modified, only some wording,  not much. So then teachers can choose "quiz1" or quiz2" from the activity list when creating a new activity.
Can you please tell me what do I have to do to create a copy of the quiz module and modify the copied one?

I assume it is a similar process then described here for cloning a theme: https://docs.moodle.org/dev/Cloning_a_theme ?

Can you please point me in the right direction? Is there a manual for this somewhere? 

Or If you think that a task like this is too difficult and only a developer can do it, than fell free to tell me that so I won't waste my time smile

Thanks
Csaba

Average of ratings: -
In reply to Csaba Gloner

Re: Cloning the quiz activity

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

This would be a total maintenance headache. Don't do it.

What end result are you actually trying to achieve?

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Cloning the quiz activity

by Tania Paul -

How do I clone it??

Please let me know.I am in deep trouble.

In reply to Tania Paul

Re: Cloning the quiz activity

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Copy the folder containing the quiz. Rename all the relevant files with 'quiz' in the title. Rename all the places where 'quiz' appears in the code. Fix all the problems caused by renaming the wrong bits of the code or by missing  a bit of the code you should have renamed.

Don't do it. The quiz is complex - if you're asking the question, then I'd be very surprised if you've got enough Moodle development experience to do this successfully and keep it maintained during future upgrades. There is almost certainly a better way to achieve whatever it was you were hoping to do by cloning the quiz activity.

Average of ratings: Useful (1)