Quiz questions conditional on previous answers

Quiz questions conditional on previous answers

Duncan Bremner -
Кількість відповідей: 5

Hi there, My question is similar to a question raised by Markus on 28 June and partially answered by Tim and Rick (good demo video Rick).

Objective:  I want to have student to enter a lab measurement (a resistor value) as a number. After checking the value is correct and within a tolerance (this is easy); I then want to use THAT number to calculate the answer for the following question(s).

Looking at the shared datasets example; what it looks like I want to do is to effectively use the student entry to 'create' a wildcard set of only one value (or a set of values).  By then synchronising across a number of following questions  (as per Rick's video) I would have subsequent questions calculated on the values. Example below:-

Question 1:  (Numerical) measure R1 and enter the value [answer = 27.3 +/- 0.1]

Question 2: (Numerical) Measure R2 and enter the value [answer = 60.2 +/- 0.1]

Question 3: (Numerical Calculate gain of amplifier using R1 and R2 values from above [answer = {(({R1}+{R2})/{R2})}  +/- 0.2]

I do not want to use the 'RAND' function for R1 and R2 to generate the wild cards; I want to use the values provided from the student (or could be part of their student number) ; I want to 'force' the question to use the numbers provided and then calculate the correct answer based on these.  

How can I achieve this?

I guess my underlying question is how does Moodle quiz treat answer variables in questions?  If I can store the entry from the previous question(s)  (if necessary hacking HTML)  then  I 'should' be able to call that later to calculate the dependent answers for later questions?


У відповідь на Duncan Bremner

Re: Quiz questions conditional on previous answers

Dominique Bauer -
Фото Documentation writers Фото Particularly helpful Moodlers Фото Plugin developers
Hello Duncan,

By the way, please give a standard link to the discussion. similar to a question raised by Markus on 28 June does not allow the discussion to be located.

I am not sure I understand your question. Are the values 27.3 and 60.2 the same for all students? If so, dependency is not required for the third question.

On the other hand, if you want to use the exact values of R1 and R2 entered by the students, then the tolerance for the value of the gain is not +/- 0.2 but rather a value corresponding to the error made by the computer in calculating (R1+R2) /R2, which is quite smaller.


У відповідь на Dominique Bauer

Re: Quiz questions conditional on previous answers

Dominique Bauer -
Фото Documentation writers Фото Particularly helpful Moodlers Фото Plugin developers
Hello Duncan,

If my second guess is correct about what you want to do, you can easily do it with the Formulas question.

Simply define a criterion for each answer as follows:

cR1 = _0 >= 27.2 && _0 <= 27.4;
cR2 = _1 >= 60.1 && _1 <= 60.3;
cGain = _2 >= 0.999*(_0+_1)/(_1) && _2 <= 1.001*(_0+_1)/(_1);

and a criterion for grading the question say as follows:

0.2*cR1 + 0.2*cR2 + 0.6*cGain

Here's a screenshot of the example you can find here ↗ (Example 2):

Formulas_20200729_1427.png

У відповідь на Dominique Bauer

Re: Quiz questions conditional on previous answers

Duncan Bremner -
Dominique, thank you for your prompt reply and sorry about not linking to original question; here it is : https://moodle.org/mod/forum/discuss.php?d=406125#p1639207

Your second interpretation is correct; i.e. each student will measure a different value from their individual circuit and the example you show is exactly right; I want then to calculate the gain for THEIR circuit; not the 'perfect' number without errors (I also need to tweak the error bands relative to their answer to prevent the same problem as you have correctly shown). It also means I can use a unique identifier (extract of student number) to algorithmically modify a question for each student so I can see any cases of copying/cheating.

Formula Questions: Hmmm... I've just checked our Moodle site and it looks like we do not have the 'Formula Question Add-in' included (at least that choice is not an option for question type when I try and create a new question) we are presently running Moodle 3.7 and (in a week or so) move to Moodle 3.8. I did wonder if 'Formula Question Type' that was the correct approach but it is not available to me to test.

Am I correct in thinking that the 'key' difference in Formula questions is that the formulas question calculations are computed at run-time whereas shared datasets / synchronised datasets is calculated at 'compile' so cannot deal with the student input values?

If we don't have the formulas Add-in, is there a work around for what I am trying to do? I've been advised that to get additional packages added is a fairly lengthy process...
У відповідь на Duncan Bremner

Re: Quiz questions conditional on previous answers

Dominique Bauer -
Фото Documentation writers Фото Particularly helpful Moodlers Фото Plugin developers
Hello Duncan,

Thank you for the link.

Why not go straight to Moodle 3.9 which is the most recent version with long-term support?

I don't think there is a 'key' difference as you describe it. All of these types of questions are written in PHP which allows for real-time interaction between server and client. It is simply that the Calculated question was not designed for this function of checking an answer whose value depends on a previous one given by the student.

Your university is ranked among the 20 best in Europe and the 100 best in the world, and you don't have the Formulas plugin! This is a situation that must be corrected without delay. smile

The Formulas plugin is one of the best for preparing quizzes in STEM (science, technology, engineering, mathematics). The plugin is up to date with the current version of Moodle. It has been maintained very well since its initial release 10 years ago and will continue to be so for many years to come. To date, it is installed on 829 sites around the world, and everyone who uses it is satisfied, often very enthusiastic.

Note that the STACK question, another plugin that you absolutely must install if you haven't already done so, this one being quite elaborate and particularly suitable for mathematics, has response trees where the outcomes depend on the student's response.
У відповідь на Dominique Bauer

Re: Quiz questions conditional on previous answers

Duncan Bremner -
Dear Dominique,
Thank you for your response, I will try to respond in a politically correct manner усміхаюсь
Re installing Moodle 3.9; That is not my decision and we have only (~last week) upgraded to Moodle 3.8 {By the way, we only moved on from Candles and quill pens last year підморгую ). you might want to canvas one of our IT staff who is a moderator on Authentication forum?? Seriously, while there are small pockets of staff that utilise some of the advanced features the majority of courses use it as a notes/documentation repository.

Re install on formulas; much of the problem is if 'we (teachers)' don't know about it we cannot complain; this underpins one of my gripes about Moodle /open source; no-one really owns it so new features are introduced in a low key manner. I absolutely agree that Formulas seems a really good for STEM and I only came across it while trying to solve my own problem. I have raised a request for the Formulas plug-in but been advised it is a slow path to get it installed as it needs to be approved by committee.

I've not come across STACK before but having now read a little it looks potentially very interesting. It does address the CAA problem directly which is an area I see as essential to reduce marking load; I do slightly worry about how it deals with 'silly' errors such as '+' instead of '-' in the middle of large calculations but that is another discussion. I also worry about the ease of equation entry / graphical entry; Electronic paper has not quite got there yet.

Back to my specific problem; it sounds like without 'Formulas' it is going to be difficult. While I 'could ' hack HTML it will land up with a problem down stream; better to do it properly using Formulas.