Closed BillFoster closed 12 years ago
This should already be possible. Have you tried it? Remember you need curly braces for variables.
Does not work
For example using
matrix: ["{1-u}",0,"{1-t}","{1-v}"]
where t,u, v are defined variables results in the following error message.
Numbas Error: Invalid expression: {1-u}
I can see a problem in the system working out the marks if variables are allowed in this way unless marks are worked out post variable value setting.
Try it without the curly braces. I may not have been consistent with requiring them.
Yes that works - but it should be consistent.
In order to make sense of using variable marks then the maxanswers and minanswers attributes should also be capable of taking variable values.
See the marking matrix in git://gist.github.com/1903943.git
Took some time to work out how to include the values of the list chkm in the marking matrix using quotes as shown. Need a clear policy on how to include such marks. Also it would be a useful addition if a list could be the value of the matrix attribute so I could have written
matrix: chkm
(with some quotes or whatever is decided)
A potentially powerful addition would be the ability to assign numeric variables to the marks given in the marking matrix of an MCQ. This would allow for a variable number of correct answers to be set - those with a positive mark (>0) are correct. Anything with 0 or negative mark is incorrect.