Multiple Instances

Re: Multiple Instances

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

This is not possible, sadly. It would be a good feature to add, but some aspects of how the data for quizzes is stored in the database makes it difficult. In the past there were lots of aspects of how the data was stored that made this difficult. We are getting there, but have not got all the way to implementing this yet.

So, for now, the ony option is to duplicate the question as Jeremy expained.

In reply to Tim Hunt

Re: Multiple Instances

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Tim, I know you see this kind of request that Mark made often.  I thought that I would add some perspectives to this based upon my own experience.  I am sure that you have thought about this issue much more than I.

First, I really like that Moodle does not allow one to add multiple copies of the same question to an exam.  I personally believe that if Moodle did, the probability of making a mistake on an exam's design would go up.  I came to Moodle initially with Mark's request, but as I have used Moodle for nearly five years, I like this "feature" that you cannot add a duplicate of a question by mistake.

Duplicating quiz questions is really not that time consuming.  Furthermore, it provides a natural opportunity to at least slightly modify each form of a question so the students sees different questions.  The key to doing this is to make sure that your initial question (depending upon question type), is good (e.g., a calculated mulitchoice, which can be a bit complex in its configuation and equations).  Yes, there will always be someone who really wants identical questions, but of course, this is the quickest form of a duplicated question.

I wonder, however, about the Moodle database and its growth with certain types of questions, in particular, calculated questions.  If someone were to create a "calculated" question, let's say with 10 variables, and with 50 values for each variable, this would produce 500 values in the database (if my thinking is correct).  Then, if you duplicate this question, let's say 50 times, you are now up to 25,000 values in the database.  What is this doing to the size of the database?  So one worry about it?  Might it slow Moodle down?  Is it adding, maybe 50MB of storage for this one type of question?  Or is this issue insignificant relative to mySQL in the over scope of what the database is storing? 

What do you think?

In reply to Rick Jerz

Re: Multiple Instances

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

Well, we could make it so you can only add mulitple instances of qtype like calculated, where the one question has multiple variants. Then, we also need to insure that each instance of the question in each attempt uses a different variant.

However, even when a question has one variant, you might want to add multiple copies. For example and essay question that asks "Write a reflective note on how you approached the questions in this section."

However, I take your point, so if we do implement this, we should find ways to build a UI that lets people do all the things they might reasonably want to do, while making it difficult for them to make accidental mistakes.

In reply to Tim Hunt

Re: Multiple Instances

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Tim, thanks for your reply.  I am just trying to provide some ideas as you, and others, think about ways to improve the quiz engine.

As another possibility, if Moodle were to allow multiple instances, maybe there could be a warning message, such as "This question already exists in this quiz, are you sure that you want to add another copy?"

In reply to Rick Jerz

Re: Multiple Instances

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

Yes. It is really good to have these disucssions before any code is written. It is one of the things that makes working on Moodle so great, that there is a whole forum full of people with whom to discuss design questions like this.

In reply to Rick Jerz

Re: Multiple Instances

by Avi Nathan -


I realize this is an old thread but the topic is still very relevant


I'm a math teacher and use Moodle quiz as a tool for student's practicing as much as I use it for evaluation.

Formulas type question with random variables enables the creation of many different questions and hence saving the effort to create manually copies with slight changes.

As an example, I create a simple equation "a x + b = c" where a, b and c are generated by the system. Now if I want to have a quiz with 10 instances of this question I still need to copy the question 10 times. If for some reason I need to modify the question, correct or improve it I'll need to delete all copies and go through this process again.

I believe there's a great value in adding a feature to the quiz to include N instances of a question in a quiz.

Such a solution addresses the concern that a user may erroneously include multiple copies of the same question.