mod_quiz/add_question_modal_launcher

Initialise the an add question modal on the quiz page.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Methods

(inner) init(modalType, selector, contextId, preShowCallback, showNewCategory) → {promise}

Source:

Create a modal using the modal factory and add listeners to launch the modal when clicked.

Parameters:
Name Type Description
modalType string

Which modal to create

selector string

The selectors for the elements that trigger the modal

contextId int

The current context id

preShowCallback function

A callback to execute before the modal is shown

showNewCategory boolean

Display the New category tab when selecting random questions.

Returns:

Resolved with the modal

Type
promise