Members
(static) control_focus
Should Numbas control the browser's scroll and focus? Set to true if the page only contains this Numbas exam. Disable this if the exam is embedded in a page.
(static) font_options
List of options for the display font.
Methods
(static) die(e)
The Numbas exam has failed so much it can't continue - show an error message and the error.
Parameters:
Name | Type | Description |
---|---|---|
e |
Error |
(static) init()
Initialise the display.
(static) makeHTMLFromXML(xml, template, scope, contextDescription, root_element) → {Promise}
Make HTML from an XML node and bind it to the given scope and display object.
Variables are substituted from the given scope using Numbas.jme.variables.DOMcontentsubvars
.
Parameters:
Name | Type | Description |
---|---|---|
xml |
Element | |
template |
XMLDocument | |
scope |
Numbas.jme.Scope | |
contextDescription |
string | Description of the JME context, for error messages. |
root_element |
Element | The exam's root |
Returns:
Type | Description |
---|---|
Promise |
|
(static) showLoadProgress()
Update the progress bar when loading.
(static) showScoreFeedback(obj, settings) → {Numbas.display_util.scoreFeedback}
Update a score feedback box.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Numbas.display_util.feedbackable | Object to show feedback about. |
settings |
Numbas.display_util.showScoreFeedback_settings |
Returns:
Type | Description |
---|---|
Numbas.display_util.scoreFeedback |