Jump to navigation

Namespace: answer_widgets

Numbas.answer_widgets

Methods

(static) register_custom_widget(params)

Register a custom answer widget.

Parameters:
Name Type Description
params Numbas.answer_widgets.custom_answer_widget_params
Source:

Type Definitions

answer_changed(answer)

A function to call when the content of an answer input widget changes.

Parameters:
Name Type Description
answer Numbas.custom_part_answer
Source:

custom_answer_widget_params

Parameters for registering a custom answer widget.

Properties:
Name Type Description
name string

The name of the widget. Used by custom part type definitions to refer to this widget.

niceName string

A readable name to be displayed in the editor.

signature string

The signature of the type of JME value that the input produces.

answer_to_jme function

Convert a raw answer to a JME token.

options_definition Array

A definition of options that the widget accepts.

widget Numbas.answer_widgets.custom_answer_widget_constructor

A constructor for the widget.

scorm_storage Numbas.storage.scorm.inputWidgetStorage

Methods to save and resume answers using this widget.

Source: