HFP-30 Added checkButton override to semantic and logic for buttons.
parent
61583c4cf6
commit
e903f96ead
|
@ -231,7 +231,7 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
|||
|
||||
// Set overrides for questions
|
||||
var override;
|
||||
if (params.override.showSolutionButton || params.override.retryButton) {
|
||||
if (params.override.showSolutionButton || params.override.retryButton || params.override.checkButton) {
|
||||
override = {};
|
||||
if (params.override.showSolutionButton) {
|
||||
// Force "Show solution" button to be on or off for all interactions
|
||||
|
@ -244,6 +244,12 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
|||
override.enableRetry =
|
||||
(params.override.retryButton === 'on' ? true : false);
|
||||
}
|
||||
|
||||
if (params.override.checkButton) {
|
||||
// Force "Retry" button to be on or off for all interactions
|
||||
override.enableCheckButton =
|
||||
(params.override.checkButton === 'on' ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -509,6 +509,24 @@
|
|||
"label": "Disabled"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "checkButton",
|
||||
"type": "select",
|
||||
"label": "Override \"Check\" button",
|
||||
"importance": "low",
|
||||
"description": "This option determines if the \"Check\" button will be shown for all questions, disabled for all or configured for each question individually.",
|
||||
"optional": true,
|
||||
"options": [
|
||||
{
|
||||
"value": "on",
|
||||
"label": "Enabled"
|
||||
},
|
||||
{
|
||||
"value": "off",
|
||||
"label": "Disabled"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue