Development log: May 2015


We’ve just updated the Numbas editor with another long-awaited feature: a “shopping basket” to keep questions while you browse the database. You can create an exam containing the questions in your basket with one click, or select individual questions from the basket inside the question editor. This resolves a long-standing problem with the exam editor – when there can be dozens of questions with the same name, and copies of those questions, it was very hard to find the questions you want in the miniature search interface included in the question editor.

I’ve updated the “create an exam” tutorial with instructions on how to use the new “shopping basket” feature.

New collaboration features in the Numbas editor


It’s a good idea to work as part of a team when writing a Numbas question: you can proofread each other’s questions, suggest changes, and give the final OK when a question works. I’ve just added a few new features to the Numbas editor which make collaborating with others a bit easier.

Development log: February 2015

We’ve just updated the Numbas editor with a “Licence” field on both questions and exams, which lets you specify the licence under which you allow other people to use your work. To begin with, you can pick from “All rights reserved” or any of the Creative Commons licences.

When you search for questions or exams, you can filter the results by what you’re allowed to do with them – freely reuse, modify, or reuse commercially. If you apply any of these filters, content with no licence specified will be excluded, so please make sure you specify a licence for your material!

Happily, everything produced at Newcastle University and uploaded to the mathcentre Numbas editor is available under a CC BY (free to reuse with attribution) licence.

Note that these licences aren’t enforced by the software – they’re just there to help people do the right thing when compiling open-access resources. If you don’t want your material to be publicly available, the solution is still to use the access controls to make your questions and exams hidden by default.

Since I’m here, I’ll do a general development log as well.

A new part type: matrix entry

We’ve got a pretty big new feature for Numbas this week – a whole new part type! The matrix entry part asks the student to enter a matrix.

In the past, we’ve hacked together questions where we ask the student to enter a matrix by putting a load of gapfills in a table. That was very laborious to set up, and the user experience for the student wasn’t particularly great.

The matrix entry part is meant to make all this a lot smoother – you give a JME matrix variable as the correct answer, and the student is shown a (optionally resizable) grid of cells to enter their answer.

It works like this:

numbas matrix part

The student picks the size of their answer, then enters numbers in each of the cells. It’s marked as correct if the matrix they give exactly matches the one you give.

If you want, you can lock the size of the answer matrix, so the student doesn’t have to be shown the size picker interface. That looks like this:numbas matrix entry no size

There are a few other options:

  • You can award the marks proportionate to the number of correct cells, instead of a simple pass/fail.
  • You can mark cells as correct if they’re within a given margin of error of the correct answer.
  • The precision restriction options from the number entry part are also available here.
  • You can allow the student to enter their answers as fractions (this is also available for number entry parts now)

You can see all that in action in this demo exam I created, containing a few simple-ish matrix entry questions. And of course, there’s documentation.

New tools to test generated variables

One thing that many people have asked for over the years is the ability to check whether the variables generated by a question have a desired property, and “re-roll” them if not. I’ve been reluctant to implement this because it can lead to sloppy question design when a method that’s guaranteed to work can often be found with a little bit of thinking.

Development log – November 2014: version tracking!

Here’s another round-up of recent development work on Numbas.

Version tracking

The big new feature is version tracking – every change made to a Numbas question or exam is saved in the database, and you can revert to old versions in the new “Editing history” tab.

Development log – September 2014

Here’s another round-up of the development work on Numbas in the past month-and-a-bit.

A little attribution

I’ve added a small attribution footer to the bottom of the default theme. It looks like this:

created using numbas

Now that people can upload their own themes, we wanted an unobtrusive way of noting that tests are built using Numbas. If you don’t want it there, you can use a modified theme to remove it, but we’d prefer you kept it.

Responsive layout on mobile devices

On small screens (tablets and phones, mainly), the default Numbas theme didn’t used to leave much space for the question content.

I’ve spent the past couple of days making the theme responsive, so screens less than 980px wide switch to a more vertical layout. The question menu and pause/end buttons move beneath the content area, and the banner is more vertical too. This means the content area can have the full width of the page.

Upload your own extensions to the Numbas editor

A couple of weeks ago I made it possible to upload your own themes to the editor, so it makes sense to also allow you to upload your own extensions.

Extensions in Numbas can affect any part of the Numbas runtime. Typically, that means adding new functions in JME or javascript (or even a new JME data type) to avoid repeating the same code across several questions.

I’ve written some instructions on how to write an extension, along with a couple of examples, in the Numbas documentation.

Upload your own themes to the Numbas editor

Numbas has always had support for themes, allowing you to completely change how exams are displayed. The Numbas editor, however, only supported a static list of themes installed by the server administrator, so most users were stuck with the default themes.

I’ve just released an update to the Numbas editor which allows any user to upload a .zip package of their own theme, which they can then use in any exam. You could use this to do something simple such as show your institution’s logo instead of the Numbas one, or add some CSS rules to tweak the layout of the page.

I’ve written some brief instructions on how to create your own themes, along with a couple of simple examples, in the Numbas documentation.


Numbas features full documentation which is always in line with the most recent version.

Numbas Documentation

Numbas Blog

We regularly update our blog with articles about new and future features, as well as other useful information.

Numbas Blog