Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Robin Georg
Number of replies: 14

My problem:

There is a particular quiz I am working on which involves a scenario and using some pretty basic mathematics to answer various questions about this scenario. The way I would like to have this set out is a description of the scenario, giving all the relevant variables, followed by the questions. Now comes the interesting bit - I want to have different variables each time a person attempts the quiz and I want these variables to be the same for all of the questions. This means that "travelled 100m in 36s" in the description is related to the answer of "10kmph" in question 3, with random variations instead of the values I have given.

My crude attempt at solving this problem:

I set up my questions as calculated questions, putting the scenario description in the first question so it could make use of the wildcards. For each question I checked 'use shared dataset' and synchronised the shared datasets from the first question (containing the description and thus also all of the variables). I thought this would do the trick but it would seem that, although each question uses the same pool of datasets, they each randomly select a different dataset from said pool.

Questions:

Probably most importantly - is this even possible? It seems that I (at first) grossly misunderstood how wildcards in calculated questions actually work and what terms like 'shared dataset' mean. This took me a long time to figure out (if I have done such a thing at all). Unless I'm missing something it looks like calculated questions in their current form won't help me.

What about Cloze questions? I don't really understand these very well at the moment, but they seem to be very versitile, including the important feature of being able to have multiple questions in the same question. However from what I've seen I can't have any randomness and I can't base one part of a question upon another.

Bonus round:

How about questions based upon previous answers? For example:

Description:

A ball is dropped with zero velocity and falls for 2 seconds before hitting the ground.

Assume that the acceleration due to gravity is 9.8m/s/s and that air resistance is negligible.

Question 1:

What is the ball's speed after 1 second?

[ 9.8*1 = 9.8 m/s ]

Question 2:

How far has the ball travelled after 1 second?

[ 1*(9.8+0)/2 = 4.9 m ]

But what if the student had answered question 1 wrongly? Perhaps she answered "3 m/s". Then, even if she did everything in question 2 correctly, she would get an answer of "1.5 m" and get no credit for her work. To be fair, the answer of Question 2 should really be specified by [ 1*( [Answer to Question 1] +0)/2 ] .

At the moment it seems that the best way to deal with this is to mark each answer as the student progresses, so that mistakes are caught early before they propogate through the rest of the questions. This is good but definitely not ideal.


Well that's my essay over. If you've gotten this far I thank you for sticking through with it. I would really appreciate any help you can offer with these problems - particular the first problem as this is really holding me back at the moment. I would also like to know if other Moodlers are having the same problem. I imagine it would be a major source of frustration in the sciences.

Thanks,

Robin Georg

평균 등급 : -
In reply to Robin Georg

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Tim Hunt
Core developers 사진 Documentation writers 사진 Particularly helpful Moodlers 사진 Peer reviewers 사진 Plugin developers 사진

This should work. If you are using 2.1, and not 2.1.5, then it might be worth upgrading. There may have been bugs in this functionality that have now been fixed.

In reply to Tim Hunt

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Robin Georg

I'm not on 2.1.5, my build is 20110726.
I assume you're talking about my main question about shared variables, not the sidenote about dependant questions. So I should be able to set this up in 2.1.5 with calculated questions? Would you mind running me through how I would go about this?

In reply to Robin Georg

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Tim Hunt
Core developers 사진 Documentation writers 사진 Particularly helpful Moodlers 사진 Peer reviewers 사진 Plugin developers 사진

Acutally, I just found the relevant bug report: MDL-28444. So, it is fixed in Moodle 2.1.2 and later.

Upgrading explains how you upgrade from one version of Moodle to another. Generally, you should update to the latest version of whatever stable branch you are on from time-to time (So from 2.1 ot 2.1.5 in your case) to get the latest bug fixes.

In reply to Tim Hunt

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Robin Georg

I decided to go all the way to the latest build of 2.2. The questions now work as expected.

Thanks for the help Tim.

In reply to Robin Georg

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Katharina Herich

Hi Rubin,

Did you ever figure out how to use wildcards across questions. I have the same problem and I cannot find any answer to it.

Could you send me a short reply.

 

Thanks, Kat

In reply to Katharina Herich

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Tim Hunt
Core developers 사진 Documentation writers 사진 Particularly helpful Moodlers 사진 Peer reviewers 사진 Plugin developers 사진

The answer is given above. Put the questions in the same category, and use shared datasets.

In reply to Tim Hunt

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Katharina Herich

Got it, worked. Thanks for the help.

In reply to Tim Hunt

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Raquel Perez-Castillejos

It does not seem to work for me. I have my questions in the same category, and they have the shared wild cards. All the questions pull numbers from the same data set BUT the numbers are different for each one of the questions. Any way to force that the same set of random numbers appear in all the questions for one student? Thanks!

In reply to Tim Hunt

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

James Roberts

Thanks (once again) for your precision, Tim.  You saved me time searching further.

If I understand correctly, the calculated questions have to be in the same category for shared wild cards to work between questions. IOW, if you want to create a new question category (say, to have random questions within a quiz using wild cards) , the existing shared wild cards of questions in the quiz will not be shared with this new/sub category.

Indeed, you should be careful.  I made a copy of a calculated question (containing a wild card) and then changed the category of the copied question. When editing the copied calculated question in the new category, Moodle informed/warned me that I was about to create a new wild card.


In reply to James Roberts

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Tim Hunt
Core developers 사진 Documentation writers 사진 Particularly helpful Moodlers 사진 Peer reviewers 사진 Plugin developers 사진

Yes, that is how it works.

(I am not saying that is necessarily a good design. It has always worked like that.)

In reply to Tim Hunt

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

James Roberts

Tim (or anyone else who understands this), I have a curious (to me) situation where a calculated quiz question is in one category but the wildcards of the question are in another category. (I am working under Moodle 2.9)

In effect, I created a calculated question in a category and then, in an effort to clean up my question bank, I moved the question to a new category. In the question bank, the calculated question appears in its new category. But if I edit the question, all of its wildcards are in the old category.

I suppose what I am asking is if there is a way to move wildcards from one category to another.

In case it matters, I keep an Excel file of the names of all my wildcards, their ranges (or even specific values) so that if I have to recreate them, I can "easily" do this.

In reply to James Roberts

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Tim Hunt
Core developers 사진 Documentation writers 사진 Particularly helpful Moodlers 사진 Peer reviewers 사진 Plugin developers 사진

This is a bug. MDL-14767 to be precise. Ouch, bit bad that it has still not been fixed.

In reply to Tim Hunt

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Pierre Pichet

Tim

Relooking to MDL-14767

"In think in case 3. we should automatically create a copy of the dataset in the new category."
As long as it does not already exist for other unrelated questions.


 I think we should explore a new way to handle shared datasets between questions.
The sharing should be useable in the category where the questions are located.
The questions that share at least one dataset could be considered as being in a "family" which can be identified by a "random number" created when the first share dataset of the family is created
(we could use the actual category id of the datasets to store it or better create a new parameter)

Sharing could be done if

  1. the questions are in the same category (which is a question parameter)
  2. have datasets with the same family id.

To create a new question in a given family we just need to copy an actual question in the same category .

If a given question is moved to another category, it will migrate with the copy of the dataset and but will loose any link to the other questions that remained in the initial category.

Using a random family number eliminates any bad duplicate and the question category id give us control to the users that can modify or create new questions.

Should we explore this concept ?

Pierre


In reply to Pierre Pichet

Re: Using the same wildcards/variables across different questions in a quiz [Moodle 2.1]

Tim Hunt
Core developers 사진 Documentation writers 사진 Particularly helpful Moodlers 사진 Peer reviewers 사진 Plugin developers 사진

That seems like an idea worth pursuing.

It is somewhat similar to how variable numeric questions work, where if you want questions to use the same randomisation, you need to set the same "String to act as seed for randomisation". That is explained on http://www.open.edu/openlearnworks/mod/oucontent/view.php?id=52747&section=2.1.3.