Here’s a round-up of development on the Numbas project over the last couple of months.
The most notable change is the addition of a “due date” field for resources in the Numbas LTI provider, so that late work policies can be accurately applied.
Numbas runtime
Notable changes
I’ve tagged v8.2 of the Numbas runtime on GitHub.
There is a new JME function seedrandom(seed,expr)
which makes random functions deterministic: given the same seed, the same expression will always produce the same output.
We want to use this in combination with the new exam-level variables initial_seed
and student_id
for two situations: to coordinate randomised data across separate questions in an exam, and to ensure that a particular student always gets the same set of variables, which is still unique to them.
Enhancements
- There’s a new JME function
groups_of(list, n)
which splits a list into groups of equal sizes.(documentation) - There is a new JME function
merge
which merges dictionaries into one. (documentation) - The
table
function can now take a list of row headers. (documentation) - There’s now a
debug_log
JME function which logs a value to the browser’s console. (documentation) - When finding unbound variables in a JME expression, names of unknown functions are included. (code)
- Note scripts can have an empty line inside a note if the next line starts with a space. (code)
- In the question theme the content is always as wide as it can be, instead of tightly fitting the content. (code)
- The ‘mastery’ diagnostic algorithm has been rewritten to be easier to read and modify. (code)
- The menu mode now has an “End Exam” button, thanks to mthakurt. (code, issue)
Bug fixes
- Fixed a bug which could lead to race conditions when resuming parts with pre-submit tasks. (code)
- When making an anonymous function, named arguments are removed from the scope before substituting in variables. (code)
- MathJax uses the CommonHTML renderer by default, for more accurate rendering. (code)
- The timer counts down in every navigation mode. (code)
- Fixed a bug where constants with the same name as question variables were undefined while marking mathematical expressions. (code, issue)
- When resuming a question, pre-submit promises for gaps are resolved once the parent has been submitted. (code)
- In matrix entry parts, the precision settings are applied to numbers in pre-filled cells. (code, issue)
- Fixed a bug where SVG images created with the
image
function didn’t have variables substituted in. (code)
Extensions
- Programming:
WebRRunner.run_code_blocks
runs the blocks one at a time. (code) - Programming: webR: the filesystem for loading question resources isn’t set up if there are no files. (code)
- Spreadsheets: The
spreadsheet
function can now be called with no arguments to create an empty spreadsheet. (code) - Spreadsheets: Fixed a bug in the
download_sheet
function. (code) - Spreadsheets: Fixed the saving and loading code for the “spreadsheet” custom part type. (code)
- Spreadsheets: All JME functions provided by the extension are deterministic, so their output doesn’t need to be saved in the suspend data. (code)
Numbas editor
I’ve tagged v8.2 of the Numbas editor on GitHub.
There are just a couple of bug fixes to the editor.
- Data types that cast to HTML are correctly checked for interactivity. (code)
- The custom part type editor uses the marking scope when finding dependencies. (code)
Numbas LTI provider
I’ve tagged v4.2 of the Numbas LTI provider on GitHub.
Due dates
Resources now have a “due date” field. When this time passes, any incomplete attempts are automatically ended. You can optionally allow students to re-open their attempts and continue them until the “available until” time.
The motivation for this feature was to support our late work policy: students are allowed to submit work up to a week after the deadline, for a score penalty proportional to how late the submission is. In order to do this, we need to accurately determine a submission time for each attempt. When the student explicitly ends the exam, it’s straightforward. When a student leaves their attempt incomplete, they are considered to have automatically submitted at the due date. Attempts re-opened after the due date use the time of the student’s last activity as the submission time.
In order to make this consistent, the LTI provider now schedules tasks to report all scores for a resource when the due date passes or the availability changes. This ensures that automatically ended attempts are marked as submitted on the consumer platform.
We’ve tested this feature at Newcastle throughout the winter term and it worked smoothly.
Other changes
- Changed availability times are sent to clients when access changes are saved or deleted. (code)
- The LTI provider now keeps a record of each time a score for a student at a resource is reported back to the consumer. This can be useful when troubleshooting any inconsistencies between the LTI provider and the consumer.
- Grades reported via LTI 1.3 have the attempt start and submission time attached, as well as the time that the grade was produced. Attempts which are incomplete when the due date passes or when the resource becomes unavailable use that time as the submission time.
- The hierarchy of questions and parts used in the manual re-marking and discounting pages uses the exam definition instead of just data from the first attempt. (code, issue)
- Fixed a bug where times of grades reported across the daylight savings time change weren’t compared correctly. (code)
- The student search on the re-mark page is now case-insensitive. (code)
- Schedule tasks to report scores when the due date passes (code, issue)
- Fixed a timing bug in the automatic re-marking process. (code)
- Access changes can now specify the initial seed for the random number generator, so you know in advance which set of variables affected students will get. We intend to use this to match online exams with paper backups. (code, issue)
- The “Review this attempt” button isn’t shown when review is not allowed, and the “run attempt” view shows a “permission denied” error when review is not allowed. (code)
Numbas LTI provider Docker
- Fixed a bug with cookie security when debug mode is turned on. (code)