Calculated question and wildcards

Calculated question and wildcards

edel chadwick -
回帖数:2

I would really appreciate any help with this as I am quite bewildered, I assume I am doing something wrong but haven't the foggiest and this problem has arisen with some questions i have generated, but not others. 

I am using this string (0.15*{plateV}*0.005)/{thickness}

Defining {plateV} as between 3 and 9 (to one decimal place)

{thickness} between 0.002 and 0.004 

The problem I am having is making the {thickness} range stick. I use 'same existing private dataset as before' and 'do not synchronise'

then I define my wildcards, it calculates correctly, but then when I try to add a new one, I get something like this


(0.15*{plateV}...
(0.15*6.2*0.005)/3.5 = 0.00    <--Number in bold is the problem
ERROR Correct answer : 0.00 outside limits of true value
Min: 0.0012887142857143 --- Max: 0.0013684285714286

I have clicked 'update dataset parameters' and I get the correct calculation, but every time I try and add new ones, the second wild card is defaulting to a number between 1-10. 

I have tried every combination of forcing regeneration and still the same issue. 

This issue has appeared in a number of other questions I have tried, and it always seems to be an issue when I try and divide by 1000 or use very small numbers 


moodle docs for the page has 39 in the URL, So I believe I am using the current version. 


回复edel chadwick

Re: Calculated question and wildcards

Dominique Bauer -
Documentation writers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像
Hello Edel,

The Calculated question does work. You will get the hang of using it. Just be persistent. Perhaps (0.15*{plateV}*0.005)/(0.001*{thickness}), where {thickness} is set between 2 and 4, would work better. If you're stuck with this question, you can always drop the XML file here and maybe someone can take a look.

If you have multiple problems like this one, with various random variables, maybe over ranges with non-uniform steps, I suggest you consider using the Formulas question type, which is powerful and easy to use.
回复Dominique Bauer

Re: Calculated question and wildcards

edel chadwick -
It does work, because I can see moodle give the correct answer, any time I click the update parameters. And I have done many other of a similar type, it is just that occasionally I can't get the defined range of the wildcard to stick!

I will try 'rephrasing' the question and see if that makes a difference


Thank you for your response