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.

Accessibility improvements and VPAT

Over the Summer a few people asked us for a formal statement that Numbas is compliant with the Web Content Accessibility Guidelines (WCAG).

I spent a week or two working through all the WCAG 2.1 criteria. Happily, most of them were already satisfied, but I identified a few that needed some work.

We’ve put together a VPATĀ® report, a standard declaration of conformance with the guidelines. The Numbas exam interface supports all of the criteria that apply to it, at level AAA. That’s great!

In the report we’ve put “partially supports” for a couple of criteria to do with reading level and terminology: they’re written with informational content in mind, and the assessment context necessarily means that it isn’t always safe to explain what a word means – it might be being assessed!

Anyway, I’m very proud that we’ve reached this level of accessibility. There’s always more work to do, so if you’ve got any thoughts around the accessibility of Numbas exams I’d be happy to hear them: email numbas@ncl.ac.uk.

Numbas runtime

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

  • Laura wrote some unit tests for custom part types, so it should be harder for me to break them now! (pull request)
  • The printed worksheet theme doesn’t show the marks for a part when it’s the only part in the question, since the question total is also displayed. (issue)
  • When serialising variable values for SCORM, integer and rational values aren’t wrapped in with_precision, so they’re restored as the same type. (issue)
  • The student’s name is shown on the exam front page, if it’s known. (issue)
  • Fixed two bugs where decimal values substituted into the expected answer for a mathematical expression part would have scientific notation evaluated incorrectly. (issue 1, issue 2)
  • Numbas.jme.display.simplify returns an empty string if the input expression is undefined, instead of throwing an error. (issue)
  • There’s a link to the student-facing accessibility statement in the “display options” modal. (issue)
  • If the answer to a mathematical expression part is a formula, equals signs are replaced with the isclose function, to allow some room for floating-point error. (issue)
  • “Invalid input” warnings for custom part types aren’t removed when you submit the answer. (issue)
  • Each input element now has a unique ID, which allows them to be referred to by other elements, to help accessibility. The mathematical expression part’s preview rendering is contained in an <output> tag, so it’s more semantically linked. (issue)
  • Ioulia Lallou made it so that pressing the Esc key hides warnings associated with the active answer input field. (pull request)
  • The default theme uses CSS custom properties --line-height and --spacing to control the line-height of text and general spacing, so they can be more easily changed. (code)
  • The page now uses grid layout, fixing a few problems that arose on very small screens and improving scrolling. (issue)
  • The default theme automatically replaces <img> tags loading SVG files with an <object> tag, so that the structure of the SVG figure can be navigated by assistive technology. If the <img> tag has alt text, it’s used as the accessible label for the <object> tag, so it’s not lost. (issue)
  • The browser’s prefer-reduced-motion preference is respected, so animations don’t happen when preferred. (code)
  • In the default theme, the text of info pages such as the “pause” screen is centred in the viewport. (code)
  • The question list and breadcrumbs for explore mode questions mark the active item for assistive technology. (code)
  • An error is thrown if an explore mode question has no parts defined. (code)
  • There’s some more space between items in an explore mode question’s part breadcrumbs, so they’re more obviously separate and easier to click on. (code)
  • Times displayed in the default theme are also given in machine-readable form, which assistive technology can use. (code)
  • Kalanithi J P added definitions of the min and max functions for ranges. (pull request)
  • The box of controls at the bottom of the question content has a label that will be read by assistive technology. (code)
  • The whole part feedback box isn’t read out automatically when you submit a part any more. This led to an unintelligible stream of screen reader announcements when revealing the answers to a question. (issue)
  • Custom functions written in JavaScript don’t look for variable references inside their definitions any more, only in their arguments. (issue)
  • Laura made a small fix to the Makefile used during development so it works on a standard Windows installation. (code)
  • Christian Arteaga contributed some more Spanish translations. (pull request)
  • Fixed a bug where the “number” answer input type for custom part types would appear changed when it shouldn’t. (code)
  • The default theme shows a progress bar above the list of questions, showing the number of answered questions. (issue)
  • The check for whether an expression is deterministic always returns true for safe strings, without looking at any variable substitutions inside. (issue)
  • The default theme uses autocomplete="off" on text answer inputs, to ensure the browser doesn’t suggest any answers. (issue)
  • The Numbas LTI provider can now disable the time limit entirely for an individual attempt. (issue)
  • The number of times to check the variable testing condition is always at least 1. (issue)
  • The default theme’s sidebar layout has been rejigged. It now always fills the available height, and doesn’t scroll with the question content. The list of questions scrolls independently. (issue)
  • The JME functions ln, exp and arg have definitions for decimal values, and the logarithm of a negative number always produces a complex value. (issue)
  • Fixed a bug in the default theme where not all parts in an explore mode question were visible in review mode. (code)
  • Stu Murray added an option to require the student to write something before they can end the exam, so they don’t mistakenly end an attempt. (issue, documentation)
  • The exam accessibility statement now links to an up-to-date table of browser compatibility, based on the features used by the runtime and default theme.

Numbas editor

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

  • George Li improved the JME value preview for nested lists. (issue)
  • I improved the preview text for range values. (issue)
  • Our student intern Janet Cheung removed the placeholder text from new choices in multiple choice parts, so you can start typing in them straight away. (issue)
  • Adaptive marking part references refer to parts by a unique ID, so that they don’t break when you add, remove or move parts. (issue)
  • The variable testing condition stops as soon as there’s an error generating a variable value, so you can see exactly where the error occurred. (issue)
  • MathJax doesn’t process the “generated value” box in the variable editor, so you can see raw LaTeX code in strings. (issue)
  • When you have focused a non-editable content area with the keyboard, pressing Enter makes it editable. (issue)
  • When defining several variables by destructuring a list, the “generated value” box shows each variable separately. (issue)
  • The “reveal answers to all questions” feedback setting is always visible, regardless of the exam’s navigation mode. (issue)
  • MathJax typesets LaTeX in the part feedback produced in the testing tab. (code)
  • In the part testing tab, the final score and feedback for gap-fill parts are shown. (issue)
  • When you change the location of an extension, its source files are moved to the new location. (issue)
  • Stu Murray fixed a small typo in the documentation. A valuable contribution! (code)
  • Focused elements always get the browser’s default outline style. (issue)
  • When deleting a file from a theme or extension, the sidebar with the file tree is shown, to give you some context. (code)

Extensions

  • Updated JSXGraph to 1.6.2. (code)
  • Fixed a bug in the programming extension’s code editor where pressing Enter would submit the answer instead of starting a new line. (issue)
  • Fixed a bug in the code editor where the cursor would sometimes move back to the start of the text. (issue)
  • Janet Cheung added some functions for binning data to the stats extension. (issue, documentation)

Numbas LTI provider

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

  • Fixed an error in the documentation for Safe Exam Browser: the config key is in the “Exam” tab, not “Browser”. (code)
  • Restored the code to automatically launch the lockdown app. (issue)
  • Removed “executable” permission from some source files that shouldn’t have it. (issue)
  • Avoided a bug in SEB on mac which led to it not recognising the quit URL when it has a query parameter added. (issue)
  • In an access change, you can choose to disable the time limit entirely. (issue)
  • The times associated with attempt data are sent back to the server with time zone information attached. (issue)
  • Attempt launch records are correctly created when the user is anonymous. (code)
  • Attempt data is loaded through a separate request from the browser, instead of being embedded in the page. This fixes several timing errors. (issue)

Moodle Numbas SCORM report

I fixed a typo in the Moodle Numbas SCORM report which affected parts with steps. (code)

Note that Moodle broke their links to custom SCORM reports in version 4.0, so you can’t access the Numbas SCORM report at the moment. There’s an open item in their bug tracker about this.