core_course/manual_completion_toggle

Provides the functionality for toggling the manual completion state of a course module through the manual completion button.

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

Members

(static, constant) init

Source:

Registers the click event listener for the manual completion toggle button.

(inner) registered :boolean

Source:

Whether the event listener has already been registered for this module.

Type:
  • boolean

(inner, constant) SELECTORS :Object

Source:

Selectors in the manual completion template.

Type:
  • Object

(inner, constant) TOGGLE_TYPES :Object

Source:

Toggle type values for the data-toggletype attribute in the core_course/completion_manual template.

Type:
  • Object

Methods

(async, inner) toggleManualCompletionState(toggleButton) → {Promise.<void>}

Source:

Toggles the manual completion state of the module for the given user.

Parameters:
Name Type Description
toggleButton HTMLElement
Returns:
Type
Promise.<void>