- Description:
Provides the functionality for toggling the manual completion state of a course module through the manual completion button.
- Source:
- Copyright:
- 2021 Jun Pataleta
- 2021 Jun Pataleta
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Provides the functionality for toggling the manual completion state of a course module through the manual completion button.
Members
(static, constant) init
- Description:
Registers the click event listener for the manual completion toggle button.
- Source:
Registers the click event listener for the manual completion toggle button.
(inner, constant) SELECTORS :Object
- Description:
Selectors in the manual completion template.
- Source:
Selectors in the manual completion template.
Type:
- Object
(inner, constant) TOGGLE_TYPES :Object
- Description:
Toggle type values for the data-toggletype attribute in the core_course/completion_manual template.
- Source:
Toggle type values for the data-toggletype attribute in the core_course/completion_manual template.
Type:
- Object
(inner) registered :boolean
- Description:
Whether the event listener has already been registered for this module.
- Source:
Whether the event listener has already been registered for this module.
Type:
- boolean
Methods
(async, inner) toggleManualCompletionState(toggleButton) → {Promise.<void>}
- Description:
Toggles the manual completion state of the module for the given user.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
toggleButton |
HTMLElement |
Returns:
- Type
- Promise.<void>