A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
Clone or download
christianp question variables can be overridden by marking notes
We had a question with a variable 'rows', and a matrix entry part. The
marking algorithm for matrix entry parts defines a note 'rows',
representing the number of rows in the student's answer.

The question author should not need to know what notes are defined by
the marking algorithm. It's safe to assume that if a marking algorithm
defines a note with the same name as a question variable, it doesn't
care about the value of that variable.

So before a marking script is evaluated, the names of all notes are
marked as 'deleted' in the scope, so the marking script can't see any
variables that might already be defined with those names.
Latest commit 51ef377 Nov 29, 2018

README.md

Numbas logo

Numbas is an open-source system for creating tests which run entirely in the browser. It has been developed by Newcastle University's School of Mathematics, Statistics and Physics.

For more information about Numbas and what it does, see our website at numbas.org.uk.

How to use Numbas

Documentation for Numbas users is at numbas-editor.readthedocs.org.

Installation

This repository contains the Numbas compiler, which runs as standalone Python 3, but the most convenient way to use Numbas is through the web-based editor.

A publicly-available editor, requiring no set-up, is available at numbas.mathcentre.ac.uk. Or, you can follow our instructions for Windows, Mac, or Ubuntu to install your own instance.

If you decide to run your own installation, install the compiler's dependencies with pip install -r requirements.txt.

This repository is just one part of the Numbas ecosystem. See the numbas organisation for the other pieces, including the web-based editor, extensions, and VLE integrations.

Contributing to Numbas

Numbas is open source, and we welcome contributions of any sort. Bug reports or feature suggestions can be added to the GitHub issue tracker, or emailed to numbas@ncl.ac.uk.

See our page on contributing to Numbas for more information on how you can help.

We keep a list of tasks specifically for new contributors, under the good-first-issue label. There's a corresponding list in the editor repository, too. These tasks should be fairly straightforward to implement without much knowledge of how all the code fits together.

Development

This tool runs on the command line: run python bin/numbas.py to see the options. You can give it the name of a .exam file or pipe one in.

When making changes to the JavaScript runtime, it's a good idea to run the unit tests in the tests directory. Start a local web server with python -m http.server and go to http://localhost:8000/tests. The file jme.html contains tests to do with the JME system, and parts.html contains tests to do with the part marking algorithms.

If you make a change, please try to add unit tests to confirm that Numbas behaves as expected.

The Makefile in this repository collects together scripts to run the unit tests, and builds the API documentation. Linux and Mac OS have built-in support Makefiles, but Windows doesn't. On Windows, cygwin provides make.

API documentation for developers is at numbas.github.io/Numbas. This is generated using JSDoc, with a custom template. Run make docs to rebuild the API documentation into ../numbas-docs.

Copyright

Copyright 2011-18 Newcastle University

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can see a plain-English explanation of the license and what it allows at tl;drLegal

Copyright in the content produced using Numbas resides with the author.