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

Maths sample (+ others) runtime errors #158

Closed anthonyyoud closed 12 years ago

anthonyyoud commented 12 years ago

On running Maths sample (actually this happens with MAS1041 Test 2 as well) I get

TypeError: Cannot call method 'apply' of undefined
at file:///data/najy2/iassess/numbas/output/mathssample/scripts/schedule.js:42:7
at file:///data/najy2/iassess/numbas/output/mathssample/scripts/schedule.js:63:4

On first loading Maths sample from Moodle in Chrome (not in other browsers though) I get

Error: INVALID_STATE_ERR: DOM Exception 11

On subsequent loads I get

TypeError: Cannot call method 'replace' of undefined
at Object.tokenise (https://moodle.mas.ncl.ac.uk/pluginfile.php/32/mod_scorm/content/1/scripts/jme.js:129:15)
at Object.compile (https://moodle.mas.ncl.ac.uk/pluginfile.php/32/mod_scorm/content/1/scripts/jme.js:477:20)
at Object.evaluate (https://moodle.mas.ncl.ac.uk/pluginfile.php/32/mod_scorm/content/1/scripts/jme.js:425:15)
at Object.loadQuestion (https://moodle.mas.ncl.ac.uk/pluginfile.php/32/mod_scorm/content/1/scripts/scorm-storage.js:378:33)
at https://moodle.mas.ncl.ac.uk/pluginfile.php/32/mod_scorm/content/1/scripts/question.js:86:28
at https://moodle.mas.ncl.ac.uk/pluginfile.php/32/mod_scorm/content/1/scripts/schedule.js:42:7
at https://moodle.mas.ncl.ac.uk/pluginfile.php/32/mod_scorm/content/1/scripts/schedule.js:63:4
christianp commented 12 years ago

Whoooops.

christianp commented 12 years ago

That just fixes the first problem. The second one seems to be an AJAX error, and I'm going to change that code in Moodle anyway.

The last one is worrying. Try clearing your cache, and tell me if it still happens.

anthonyyoud commented 12 years ago

After the latest fix I can't reproduce the third problem above, so I suspect it was a consequence of something else. I still see the second problem, but it now appears when submitting an answer, not when immediately loading the exam.

christianp commented 12 years ago

Ah! I gave up on making the AJAX requests asynchronous yesterday because I didn't have time, but forgot to change the flag back to false. Should be ok now.