Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

A command-line script which runs Numbas exams for testing or remarking

License

Notifications You must be signed in to change notification settings

numbas/numbas-testing-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an abandoned path of development. The Numbas LTI tool now runs exams client-side when re-marking.

Numbas testing framework

This is a command-line script which runs Numbas exams for testing or remarking.

It's used by the Numbas LTI tool to verify exam packages, and to remark attempts when an exam is updated.

Installation

  1. Clone this git repository.
  2. Install node.js or a compatible JavaScript runtime.
  3. Install the dependencies with npm install.

Use

./test_exam path_to_exam command

path_to_exam is a filesystem path to an extracted Numbas package.

command is one of:

  • test: test that the exam package works correctly: it's loaded, an attempt is started and the expected answer is submitted for every part. Then the exam is loaded again, and the previous attempt is resumed and it checks that the score is the same.
  • remark: pipe in a JSON-encoded dictionary of attempts: objects of the form {"attempt_pk": integer, "cmi": SCORM data model}.

The script always prints a JSON-encoded object with a boolean key success representing whether the command succeeded or not. The remark command also returns a key results describing changed SCORM data model elements for each attempt.

About

A command-line script which runs Numbas exams for testing or remarking

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published