Compare commits

...

1 Commits

Author SHA1 Message Date
Frode Petterson d72490a04d Revert "Add ability to override check button" 2017-06-12 11:05:27 +02:00
3 changed files with 17 additions and 36 deletions

View File

@ -225,21 +225,20 @@ H5P.QuestionSet = function (options, contentId, contentData) {
var $template = $(template.render(params));
// Set overrides for questions
var override = {};
var override;
if (params.override.showSolutionButton || params.override.retryButton) {
override = {};
if (params.override.showSolutionButton) {
// Force "Show solution" button to be on or off for all interactions
override.enableSolutionsButton =
(params.override.showSolutionButton === 'on' ? true : false);
}
if (params.override.checkButton) {
// Force "Check" button to be on or off for all interactions
override.enableCheck = params.override.checkButton === 'on';
}
if (params.override.showSolutionButton) {
// Force "Show solution" button to be on or off for all interactions
override.enableSolutionsButton = params.override.showSolutionButton === 'on';
}
if (params.override.retryButton) {
// Force "Retry" button to be on or off for all interactions
override.enableRetry = params.override.retryButton === 'on';
if (params.override.retryButton) {
// Force "Retry" button to be on or off for all interactions
override.enableRetry =
(params.override.retryButton === 'on' ? true : false);
}
}
/**

View File

@ -4,7 +4,7 @@
"contentType": "question",
"majorVersion": 1,
"minorVersion": 13,
"patchVersion": 1,
"patchVersion": 0,
"embedTypes": [
"iframe"
],
@ -61,4 +61,4 @@
"minorVersion": 2
}
]
}
}

View File

@ -418,28 +418,10 @@
{
"name": "override",
"type": "group",
"label": "Override settings for \"Check\", \"Show solution\" and \"Retry\" buttons",
"label": "Settings for \"Show solution\" and \"Retry\" buttons",
"importance": "low",
"optional": true,
"fields": [
{
"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"
}
]
},
{
"name": "showSolutionButton",
"type": "select",
@ -478,4 +460,4 @@
}
]
}
]
]