- Description:
Contain the logic for the bulkmove questions modal.
- Source:
- Copyright:
- 2024 onwards Catalyst IT EU https://catalyst-eu.net
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Contain the logic for the bulkmove questions modal.
Methods
(async) display(currentBankContextId, currentCategoryId)
- Description:
Get the content to display and enhance the selects into auto complete fields.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
currentBankContextId |
integer | |
currentCategoryId |
integer |
(async) displayConfirmMove() → {Promise.<void>}
- Description:
Update the body with a confirmation prompt and set confirm cancel buttons in the footer.
- Source:
Returns:
- Type
- Promise.<void>
(async) enhanceSelects() → {Promise.<Array.<Promise>>}
- Description:
Take the provided select options and enhance them into auto-complete fields.
- Source:
Returns:
- Type
- Promise.<Array.<Promise>>
initSelectedCategoryId(categoryId)
- Description:
Initialise the category select based on the data passed to the JS or if a filter is applied in the url.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
categoryId |
integer |
(async) moveQuestionsAfterConfirm(targetContextId, targetCategoryId) → {Promise.<void>}
- Description:
Move the selected questions to their new target category.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
targetContextId |
integer | the target bank context id. |
targetCategoryId |
integer | the target question category id. |
Returns:
- Type
- Promise.<void>
registerEnhancedEventListeners()
- Description:
Register event listeners on the enhanced selects. Must be done after they have been enhanced.
- Source:
updateCategorySelector(selectedBankCmId) → {Promise}
- Description:
Update the category selector based on the selected question bank.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
selectedBankCmId |
Number |
Returns:
Resolved when the update is complete.
- Type
- Promise
updateCategorySelectorState(toEnable)
- Description:
Disable/enable the enhanced category selector field.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
toEnable |
boolean | True to enable, false to disable the field. |
updateSaveButtonState()
- Description:
Disable the button if the selected category is the same as the one the questions already belong to. Enable it otherwise.
- Source: