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
198 stars 118 forks source link

Error when marking a gap-fill part with parts of different types and "sort answers" turned on #992

Closed msgj603 closed 1 year ago

msgj603 commented 1 year ago

Steps to reproduce: write a gapfill question with 2 or more numerical answers. Select the "sort students' answers before marking" option. Now add another gap with a different type (e.g. choose one from a list). The option to deselect "sort students' answers before marking" disappears but it can't now sort the answers.

The error message is "Error evaluating variable mark: variable numTicks is not defined". No feedback from the new gap appears either. image

christianp commented 1 year ago

Thanks for reporting this. I've made it so that "sort students' answers" is automatically turned off when the gaps aren't all the same type.