Question Editor API Methods
checkValidation()
Checks whether the question currently being edited has a correct answer set.
Examples
var result = questionEditorApp.checkValidation({ showErrors: true }); // { has_validation: true }
Arguments
-
options object
The following properties are supported.
-
showErrors boolean
When
trueand a correct answer is not set, this will highlight the "Set correct answer(s)" section in the UI.Default:
falseVersion added: v2020.2.LTS
-
Return value
Type validationStatusObject
Type false
If the operation can not be performed.
i.e., the Widget currently being edited is not a question, or the editor is not
in the Widget edit view.
Note An error message will also be logged to the console.