HFP-30 Made checkButton into a boolean instead of select.
Updated checkButton logic.pull/19/merge
parent
e903f96ead
commit
c8531f60f0
|
@ -231,7 +231,7 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
|||
|
||||
// Set overrides for questions
|
||||
var override;
|
||||
if (params.override.showSolutionButton || params.override.retryButton || params.override.checkButton) {
|
||||
if (params.override.showSolutionButton || params.override.retryButton || params.override.checkButton === false) {
|
||||
override = {};
|
||||
if (params.override.showSolutionButton) {
|
||||
// Force "Show solution" button to be on or off for all interactions
|
||||
|
@ -245,10 +245,9 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
|||
(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);
|
||||
if (params.override.checkButton === false) {
|
||||
// Force "Check" button to be on or off for all interactions
|
||||
override.enableCheckButton = params.override.checkButton;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -512,21 +512,12 @@
|
|||
},
|
||||
{
|
||||
"name": "checkButton",
|
||||
"type": "select",
|
||||
"label": "Override \"Check\" button",
|
||||
"type": "boolean",
|
||||
"label": "Show \"Check\" buttons",
|
||||
"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.",
|
||||
"description": "This option determines if the \"Check\" button will be shown for all questions.",
|
||||
"optional": true,
|
||||
"options": [
|
||||
{
|
||||
"value": "on",
|
||||
"label": "Enabled"
|
||||
},
|
||||
{
|
||||
"value": "off",
|
||||
"label": "Disabled"
|
||||
}
|
||||
]
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue