The Numbas Blog

Development update: March 2024

Here’s a development update, covering everything that’s changed since November.

Most of my work has been on adding LTI 1.3 support to the Numbas LTI provider. We hope to have that ready to use by the summer, in time for the next academic year.

The rest of the development work has been mainly bug fixes, with a couple of new features in the Numbas runtime.

Numbas runtime

I’ve tagged v7.3 of the Numbas runtime on GitHub.

  • Laura added a new JME function jme_string to get a string representing any value as JME code. (issue, documentation)
  • Fixed a bug when automatically converting complex number values to decimal. (code)
  • Utility functions in the default theme have moved to a new file, display-util.js, to reduce duplication of code in the worksheet theme. (code, issue)
  • The task to build the JME unit tests from the documentation now forces the content to be decoded as utf8, to avoid a bug on Windows. (code)
  • On the results page, empty cells are filled in when question scores aren’t shown. (code, issue)
  • Fixed a bug in the worksheet theme to restore page breaks. (code)
  • The entire sidebar scrolls on short viewports (code)
  • When viewing the introduction during the exam, its entry in the sidebar list is marked as “current” to assistive technology. (code)
  • The worksheet theme no longer overrides the styling of checkboxes. (code, issue)
  • JavaScript: Numbas is put in the globalThis namespace if window is undefined. (code)
  • Worksheet theme: exam intro text uses the full width. (code)
  • In printed exams, dropdowns are rendered as a box showing all options. (code, issue)
  • In the worksheet theme, the “page break between questions” option applies to answer sheets. (code)
  • Improved the implementation of the question CSS preamble so it only applies to that question. (code, issue)
  • Values returned by the diagnostic algorithm are automatically cast to the expected types. (code, issue)
  • Extension parts have a base marking script, so they can be used to provide parts with marks available but no answer input in worksheet exams. (code)
  • Adaptive marking: the warning “part must be answered” is shown in the warnings box. (code, issue)
  • There’s new syntax for list comprehensions: a shorthand for map() and filter(), inspired by Python: expr for: name of: range where: condition (code, documentation)
  • List items have a maximum width, to help readability. (code)
  • Questions and info pages scroll independently. (code)
  • When rewriting unknown function names to multiplication, the system remembers that the “argument” was bracketed. (code, issue)
  • The nav bar at the bottom of questions is now inside the question element, so it’s inside the same scrolling context. (code)
  • siground rounds to 0 when within 1e-15. (code)
  • The question preamble can return a promise, which will be awaited. (code, example question)
  • There’s a new JavaScript function, Numbas.jme.makeFast, which “compiles” a JME expression to a faster plain JavaScript function. The motivation for this was to use it in JSXGraph’s function plotter, which needs to evaluate the function several thousand times per frame. (code)
  • The routine for remaking variables adaptively, used in adaptive marking and explore mode, deals with destructured variable definitions. (code, issue)
  • Stu Wilmur added options to toggle whether questions and advice are shown when printing a finished exam. (code, issue, documentation)
  • Fixed a layout bug which made the front page have a horizontal scroll bar. (code)
  • Explore mode: when moving back to a part, the view scrolls back to the top. (code, issue)
  • The sidebar has a “close” button on narrow screens. (code, issue)
  • In order to save space, the suspend data doesn’t wrap numbers in with_precision() when they don’t have any precision information. (code)
  • There’s a new JME function imprecise(n) for marking numbers with no precision information. (code)
  • Fixed a bug in resuming diagnostic mode exams. (code)
  • When a part produces no feedback messages, any feedback from previous submissions is removed. (code, issue)
  • When “show score feedback icon” is off, only neutral feedback messages are shown. (code, issue)
  • I’ve rejigged how warnings are positioned, trying to ensure they appear in the right place without obscuring too much other content. (code)
  • The “match choices with answers” grid has striped rows and dashes between columns to improve readability. (code)
  • The “mathematical expression” part gives a better error message when the expression can’t be parsed. (code, issue)
  • I’ve added a SECURITY file to the repository, describing how to report security vulnerabilities. Thanks to Matheus Alexandre for suggesting this.

GeoGebra extension

  • Fixed a typo in an example in the documentation. (code)

JSXGraph extension

  • I’ve updated JSXGraph to version 1.7.0 (code, announcement)
  • The function plotter uses the new Numbas.jme.makeFast function, which is hugely faster. (code)

Polynomials extension

  • When rendering a polynomial as LaTeX, the standard routine for representing numbers is used for coefficients and exponents. (code)

Programming extension

  • I’ve updated to use WebR version 0.2.1. (code, announcement for 0.2.0, announcement for 0.2.1)
  • There’s a new function Numbas.extensions.programming.preload to start loading a code runner as soon as the question is generated, instead of waiting for the student to submit an answer. (code, documentation)
  • The JME value nothing is represented in Python as None. (code)

Spreadsheets extension

  • The spreadsheet is now compiled in production mode, so will be faster and produce no debug information in the console. (code)
  • Fixed a bug where parts are incorrectly marked as changed. (code)
  • Cells have the inputmode attribute set, so mobile devices will use an appropriate keyboard for numeric cells. To make use of this, there’s a new JME function cell_type to set the type of cells. (code, documentation)
  • Number cells with invalid numbers are encoded as "" instead of "ERR". (code)
  • All cell styles are correctly encoded, so you can display a spreadsheet in part feedback correctly. (code)

Numbas editor

I’ve tagged v7.3 of the Numbas editor on GitHub.

  • Only items that the user can view are shown in the “other versions” tab. (code, issue)
  • Fixed a bug in the auto-saver, so it only saves 1000ms after the last change. (code, issue)
  • In the question editor: if generating variables didn’t finish last time the page was open, they’re not automatically generated. This can help you get back in to fix a question where variable generation hangs. (code, issue)
  • Documentation: I’ve added some new items in the “how do I…” page, and documented the spreadsheets extension. (code)
  • The question editor now copes with bad variable replacement definitions when loading. (code)
  • The code editor highlights JME operator keywords. (code)
  • Fixed a security vulnerability in editable packages (themes and extensions): the editor only allows reading or editing files inside the package’s directory. Thanks to Matheus Alexandre for reporting this. (code)

Numbas LTI provider

I’ve tagged v3.5 of the Numbas LTI provider on GitHub.

  • The SCORM API sends back times with timezone info. (code, issue)
  • An AttemptLaunch is correctly created when the user is anonymous. (code)
  • SCORM data is loaded through a background request by the client instead of embedding it in the page. This fixes a problem where the student’s browser would reload the page from its cache, seemingly starting the attempt again from scratch. (code, issue)
  • When force-sending SCORM data to the fallback due to the resource becoming unavailable, the attempt is only marked as complete if it really was complete. (code, issue)
  • Access changes can override the lockdown app setting. (code, issue, documentation)
  • Added a helpful error message which is shown when launching an invalid Safe Exam Browser link. This can happen when re-opening Safe Exam Browser independently after launching it from an LTI link. (code)

I’ve been working on adding support for LTI 1.3 to the Numbas LTI provider. It’s at the point where we’re just about to start testing it in our Canvas environment. We aim to have it in production use by this summer, ready for the next academic year.

If you’d like to test the new version with your learning environment, please email us.

Unicode math normalization project

  • Added mappings for LIGHT LEFT/RIGHT TORTOISE SHELL BRACKET ORNAMENT, to normal parentheses. Thanks to Chris Sangwin for suggesting this. (code, issue)

Development update: November 2023

Here’s a development update, covering everything that’s changed since July.

I spent a lot of time on the Summer working on our other project, Chirun. I wrote a new LTI 1.3-compliant tool, to make it easier to embed Chirun material in our virtual learning environment. That’s now in use at Newcastle, and I’m looking for other institutions to test it with virtual learning environments other than Canvas or Moodle. Our intention is to make our server available to everyone, since it won’t handle any personally identifying information.

So it’s been a while since I had time to do a Numbas development update. There have been quite a few bug fixes and an encouraging number of contributions from other people. The main news is that the Numbas runtime is now WCAG 2.1 AAA compliant.

Read the rest

Development update: July 2023

Here’s a development update, covering everything since the release of Numbas v7 last December.

Progress on Numbas has continued fairly quietly, while I’ve had to split my attention between this, Chirun, and other stuff at Newcastle.

I gave a talk at EAMS 2023 with an update on developments over the last year:

Read the rest

Important bug notice: broken suspend data when variable names are capitalised

A bug was introduced in v7.0 of the Numbas runtime which led to variables whose names contain an uppercase letter not being correctly saved to the attempt suspend data. Exam packages downloaded from numbas.mathcentre.ac.uk between the 4th and 12th of December 2022 are affected. The values of these variables were not saved, so any attempts at affected packages can not be recovered correctly.

This would affect any students who left an in-progress attempt and later resumed it: they would potentially see different variable values to those they saw on the first launch.

Please check any packages that you downloaded between these dates and used with a SCORM player or the Numbas LTI tool. The bug is now fixed, so you should download a new copy of the exam package to replace the broken one.

We apologise for the inconvenience. Tests have been added to the automatic test suite to ensure this kind of problem doesn’t happen again.

Numbas v7 and our own lockdown app

Collage of screenshots showing new Numbas features

It’s been a while since our last development update. The reason for that is that we’ve been working on some big changes to every bit of the Numbas software. We’ve released v7 of the Numbas app and editor, and a new lockdown app to integrate with the LTI provider which ensures that students can only access assessments in a restricted environment. There’s also a Safe Exam Browser integration, for in-person invigilated exams.

Laura Midgley has joined the team, replacing George Stagg, who left for an exciting job with RStudio.

Four people stood in a line, facing the camera
The e-learning unit now: from left to right, Chris Graham, Christian Lawson-Perfect, Laura Midgley and Aamir Khan.
Read the rest

Development update: August 2022

Sorry for the long gap since the last development update: the user meeting, EAMS, and work at Newcastle have consumed all of my time. Now it’s the summer, and I can take a moment to reflect on what I’ve done since March.

We had two student interns working for us for a couple of weeks in July: Will McNestry and Aleksas Bagdonas. They each contributed a few new features to the Numbas runtime, tackling some things that had been on the to-do list for a while.

I’ve mainly spent my time trudging through the ever-growing list of issues on GitHub, adding features and fixing long-standing bugs.

George Stagg left us at the end of June to work at RStudio. We’re interviewing his replacement in a couple of weeks – the new role will have a lot more time dedicated to Numbas development.

Read the rest

Numbas training – July 2022

We’re running another of our semi-regular public training sessions, on Monday 18th July 2022.

The training will this time take place on gather.town, since it worked so well for the Numbas user meeting in May.

The session will go as follows (all times in British Summer Time, UTC+1):

  • 10:00 – 12:00: Introduction to Numbas – a short demo of Numbas, followed by a guided tutorial to write your first question.
  • 12:00 – 12:30: Lunch break – bring your own!
  • 12:30 – 14:00: Advanced Numbas training – we’ll show how to use some of the more complicated features of Numbas.

If you can’t attend this session, you might like to watch the recordings of the previous sessions.

To attend, please fill in the registration form.

Talks from the Numbas user meeting, Spring 2022

The first Numbas user meeting was a big success: over 50 Numbas users from around the world gathered to share their experiences and work together on plans for the future.

The recordings of the talks are now available to view on the Numbas user meeting Spring 2022 programme page. My intention was to record every session, but I had some technical problems which meant that the training sessions and a couple of the talks weren’t recorded properly. There’s still plenty of good stuff to watch, though!

As a taster, here’s my development update:

Development update: March 2022

Here’s an update on Numbas development, covering December 2021 to March 2022. Sorry about the long gap between posts – holidays, strikes, exams and finally catching covid didn’t leave me much time for blogging!

In February, I wrote about our new extension for assessing programming. In order to implement this, I added a framework for running asynchronous tasks before marking a question part, and for defining new kinds of input method. These should both open up all sorts of possibilities beyond the programming extension.

In the editor, I’ve been working on adding a “queues” feature to projects. The main motivation is to support the Open Resource Library, but I’ve already thought of a few other use cases for it.

Read the rest