Advanced automated grading in Essay

I used Essay to create a task where students have to provide a random nonnegative integer n that is divisible by 5. In the keyword, I can manually add some keywords n=0, n=5, n=10, ... but in case the student intentionally provides a big number like n=5000, then this method is unefficient. Are we able to modify the automated grading in Essay content? Or do we have a better solution other than using Essay content?

Content types: 
otacke's picture

Hi!

Essay supports regular expressions which are probably your best bet (cmp. https://en.m.wikipedia.org/wiki/Regular_expression). In your case, this could be something along the lines of (probably not perfect, just a sketch):

/(^|\s)([05]|[1-9]+[0-9]*[05]+)($|\s)/

That approach also has limits though.

Best,

Oliver