Submit a request
Submit a request

Requiring Authors to Set Correct Answers for Score-able Question Types

You can control if authors are required to set the correct answers for score-able Question types before saving by using the require_validation init option of Author API.  If set to true, authors will get an error message and the section for setting in the correct and alternate answers would be highlighted in the Question Editor API template for authors to set the answers. 

Note: only when the default auto scoring option is enabled, are authors expected to set the correct answers for score-able Question types.

Check_Validation_on_Save.png

Figure 1: Requiring authors to set correct answers before saving score-able Question types.

The require_validation init option of Author API will not work with custom Question types.

You can customize the save behaviour of score-able Question types by calling the checkValidation public method of the Question Editor API instance embedded within Author API. The method takes in a showErrors argument to decide if the section to set in correct answers should be highlighted, if authors have not set in a correct answer for score-able question types. 

Was this article helpful?
0 out of 0 found this helpful

Did you arrive here by accident? If so, learn more about Learnosity by clicking here.