numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
200 stars 117 forks source link

Marking matrix in MCQ questions #115

Closed BillFoster closed 12 years ago

BillFoster commented 12 years ago

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.

christianp commented 12 years ago

This should already be possible. Have you tried it? Remember you need curly braces for variables.

BillFoster commented 12 years ago

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.

christianp commented 12 years ago

Try it without the curly braces. I may not have been consistent with requiring them.

BillFoster commented 12 years ago

Yes that works - but it should be consistent.

BillFoster commented 12 years ago

In order to make sense of using variable marks then the maxanswers and minanswers attributes should also be capable of taking variable values.

BillFoster commented 12 years ago

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)