Wildcard Parameter in Calculated Question

Wildcard Parameter in Calculated Question

by Ajay Deo -
Number of replies: 2

Hi,

I am using Moodle3.9.

I could successfully create a "Calculated Question" in the question bank. The question contains {angle}, {distance}, and {mass} as wildcard parameters. Now I want to restrict the wildcard parameters as follows:

(1) {angle} in the range 10 - 60 degree in steps of 5. I am NOT able to do this!

(2) {distance} in the range 2 - 15 in steps of 1. This works by setting range 2 -15 and decimal places to 0

(3) {mass} should vary from 0.1 to 10 in steps of 0.1. Also, works by setting range 0.1 - 10 and decimal places to 1.

My question is: is it possible to increase values of some wildcard parameters in some specific steps (because, in some cases it makes sense)? Or, alternatively, can I alter the values of wildcard parameters in the data sets generated using "Add items" and then recalculating the correct answer?

Thank you.

With best regards,

Ajay


Average of ratings: -
In reply to Ajay Deo

Re: Wildcard Parameter in Calculated Question

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

Hello Ajay,

Something like this? Details are in the attached XML file which contains the Calculated question.

ForumQuiz_20210125_2218.png

You can also take a look at the Formulas question type which deals with this kind of problem very well.

Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Wildcard Parameter in Calculated Question

by Ajay Deo -
Dear Dominique,

Thank you very much for your response. I think it should work, I will check.

Regards,

Ajay