Jump to navigation

Class: NumbasExamElement

NumbasExamElement

A container element for a self-contained Numbas exam.

Constructor

new NumbasExamElement()

Source:

Members

has_loaded

Has this exam been loaded?

Source:

Callback functions for the modals.

Type:
Source:

Methods

hide_lightbox()

Hide the lightbox.

Source:

register_lightbox(element)

Register event listeners to show the lightbox when images in this element are clicked.

Parameters:
Name Type Description
element Element
Source:

showAlert(msg, fnOK)

Show an alert dialog.

Parameters:
Name Type Description
msg string

message to show the user

fnOK function

callback when OK is clicked

Source:

showConfirm(msg, fnOK, fnCancel)

Show a confirmation dialog box.

Parameters:
Name Type Description
msg string

message to show the user

fnOK function

callback if OK is clicked

fnCancel function

callback if cancelled

Source:

showConfirmEndExam(msg, fnEnd, fnCancel)

Show the end exam confirmation dialog box.

Parameters:
Name Type Description
msg string

message to show the user

fnEnd function

callback to end the exam

fnCancel function

callback if cancelled

Source:

showStyleModal()

Show the modal with styling options.

Source:

show_lightbox(original)

Show the lightbox.

Parameters:
Name Type Description
original Element

The original image element which is going to be copied into the lightbox.

Source: