Numbas Error: Error loading question 4: Variable s is not defined.

12 views
Skip to first unread message

Ben Brawn

unread,
May 21, 2026, 7:46:46 PM (12 days ago) May 21
to Numbas Users

Ben Brawn

unread,
May 21, 2026, 8:05:00 PM (12 days ago) May 21
to Numbas Users

Ben Brawn

unread,
May 21, 2026, 8:37:48 PM (12 days ago) May 21
to Numbas Users

Ben Brawn

unread,
May 21, 2026, 9:03:13 PM (12 days ago) May 21
to Numbas Users
Removing question 4 from a copy of the exam results in the error message indicating question 3 is the issue. 

Ben Brawn

unread,
May 21, 2026, 9:51:17 PM (12 days ago) May 21
to Numbas Users
ok so obviously question 5 was the actual issue. This question has a bunch of javascript stuff for jsxgraph so that's probably it. We will replicate it using GeoGebra, I guess. I'll leave a copy of the original problem question in case it helps identify an actual numbas issue or in case it's my own script that's an issue and it's an easy fix. https://numbas.mathcentre.ac.uk/question/share/view/fd7b5668-11f4-4692-9235-af9417eefaff 

Ben Brawn

unread,
May 25, 2026, 9:37:39 PM (8 days ago) May 25
to Numbas Users
After replacing it with ggb and removing all JavaScript functions, we are still having issues with the exam breaking in Canvas in the same way (after closing the exam and resuming it a few times).

Christian Lawson-Perfect

unread,
May 26, 2026, 3:40:52 AM (7 days ago) May 26
to numbas...@googlegroups.com
The problem is nothing to do with your javascript or with geogebra - there was a bug in the code that serialises variable values. You have a list of LaTeX expressions, defined in the form `latex(safe("..."))`. Only the `latex` wrapper was saved to the suspend data, omitting the `safe` wrapper.
I've fixed that bug, so this error shouldn't come up any more with new attempts.

--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/numbas-users/2e0d14f6-8450-4110-af35-cb806552e479n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages