mod_quiz/add_question_modal

Description:
  • Contain the logic for the add random question modal.

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

Contain the logic for the add random question modal.

Methods

(async) handleSwitchBankContentReload(Selector) → {Promise}

Description:
  • Update the modal with a list of banks to switch to and enhance the standard selects to Autocomplete fields.

Source:
Parameters:
Name Type Description
Selector String

for the original select element.

Returns:

Modal.

Type
Promise

(inner) getAddOnPageId() → {Number}

Description:
  • Returns the saved page id for the question to be added to.

Source:
Returns:
Type
Number

(inner) getContextId() → {Number}

Description:
  • Retrieve the saved Moodle context id.

Source:
Returns:
Type
Number

(inner) setAddOnPageId(id)

Description:
  • Set the id of the page that the question should be added to when the user clicks the add to quiz link.

Source:
Parameters:
Name Type Description
id Number

(inner) setContextId(id)

Description:
  • Save the Moodle context id that the question bank is being rendered in.

Source:
Parameters:
Name Type Description
id Number