Skip to content

Commit e7e83f4

Browse files
committed
Revert "Merge pull request #11 from SergeyYukhnevich/add-override-of-check-button"
This reverts commit 6c86c8a, reversing changes made to 976e956.
1 parent 6c86c8a commit e7e83f4

File tree

3 files changed

+17
-36
lines changed

3 files changed

+17
-36
lines changed

js/questionset.js

+13-14
Original file line numberDiff line numberDiff line change
@@ -225,21 +225,20 @@ H5P.QuestionSet = function (options, contentId, contentData) {
225225
var $template = $(template.render(params));
226226

227227
// Set overrides for questions
228-
var override = {};
229-
230-
if (params.override.checkButton) {
231-
// Force "Check" button to be on or off for all interactions
232-
override.enableCheck = params.override.checkButton === 'on';
233-
}
234-
235-
if (params.override.showSolutionButton) {
236-
// Force "Show solution" button to be on or off for all interactions
237-
override.enableSolutionsButton = params.override.showSolutionButton === 'on';
238-
}
228+
var override;
229+
if (params.override.showSolutionButton || params.override.retryButton) {
230+
override = {};
231+
if (params.override.showSolutionButton) {
232+
// Force "Show solution" button to be on or off for all interactions
233+
override.enableSolutionsButton =
234+
(params.override.showSolutionButton === 'on' ? true : false);
235+
}
239236

240-
if (params.override.retryButton) {
241-
// Force "Retry" button to be on or off for all interactions
242-
override.enableRetry = params.override.retryButton === 'on';
237+
if (params.override.retryButton) {
238+
// Force "Retry" button to be on or off for all interactions
239+
override.enableRetry =
240+
(params.override.retryButton === 'on' ? true : false);
241+
}
243242
}
244243

245244
/**

library.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"contentType": "question",
55
"majorVersion": 1,
66
"minorVersion": 13,
7-
"patchVersion": 1,
7+
"patchVersion": 0,
88
"embedTypes": [
99
"iframe"
1010
],
@@ -61,4 +61,4 @@
6161
"minorVersion": 2
6262
}
6363
]
64-
}
64+
}

semantics.json

+2-20
Original file line numberDiff line numberDiff line change
@@ -418,28 +418,10 @@
418418
{
419419
"name": "override",
420420
"type": "group",
421-
"label": "Override settings for \"Check\", \"Show solution\" and \"Retry\" buttons",
421+
"label": "Settings for \"Show solution\" and \"Retry\" buttons",
422422
"importance": "low",
423423
"optional": true,
424424
"fields": [
425-
{
426-
"name": "checkButton",
427-
"type": "select",
428-
"label": "Override \"Check\" button",
429-
"importance": "low",
430-
"description": "This option determines if the \"Check\" button will be shown for all questions, disabled for all or configured for each question individually.",
431-
"optional": true,
432-
"options": [
433-
{
434-
"value": "on",
435-
"label": "Enabled"
436-
},
437-
{
438-
"value": "off",
439-
"label": "Disabled"
440-
}
441-
]
442-
},
443425
{
444426
"name": "showSolutionButton",
445427
"type": "select",
@@ -478,4 +460,4 @@
478460
}
479461
]
480462
}
481-
]
463+
]

0 commit comments

Comments
 (0)