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
207 stars 122 forks source link

String restrictions #262

Closed BillFoster closed 11 years ago

BillFoster commented 11 years ago

See http://numbas.mas.ncl.ac.uk/question/219/bills-copy-of-addition-whole-number-place-value-decomposition/ For answer to Part 1 I have a length restriction of minimum 8 characters and require also that + must be included. However if the correct answer is say 300+30+4 then if I input 300+34 then this is marked as correct even though there are only 6 characters.

christianp commented 11 years ago

You've forgotten that the marking algorithm puts spaces around + and - in the student's answer, so 300+42 goes to 300 + 42, which is 8 characters long.