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

Gap-fill parts with a custom JS marking script should cope with `waiting_for_pre_submit` in the original result #1095

Closed christianp closed 3 months ago

christianp commented 3 months ago

In this question I have a gap-fill part with a custom JS script which runs after the built-in marking algorithm.

The wrapper around the JS script expects the original_result dictionary to contain a states property, but it doesn't when the marking script is first run, waiting for pre-submit tasks in the gaps to finish.

It should check for original_result.waiting_for_pre_submit, and just return if it's true.