HFP-29: Add option to disable solution button
parent
a601a1014c
commit
36c5192c1d
|
@ -56,6 +56,10 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
||||||
' </div>' +
|
' </div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
|
var solutionButtonTemplate = options.endGame.showSolutionButton ?
|
||||||
|
' <button type="button" class="h5p-joubelui-button h5p-button qs-solutionbutton"><%= solutionButtonText %></button>':
|
||||||
|
'';
|
||||||
|
|
||||||
var resulttemplate =
|
var resulttemplate =
|
||||||
'<div class="questionset-results">' +
|
'<div class="questionset-results">' +
|
||||||
' <div class="greeting"><%= message %></div>' +
|
' <div class="greeting"><%= message %></div>' +
|
||||||
|
@ -71,7 +75,7 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
||||||
' <% } %>' +
|
' <% } %>' +
|
||||||
' <div class="buttons">' +
|
' <div class="buttons">' +
|
||||||
' <button type="button" class="h5p-joubelui-button h5p-button qs-finishbutton"><%= finishButtonText %></button>' +
|
' <button type="button" class="h5p-joubelui-button h5p-button qs-finishbutton"><%= finishButtonText %></button>' +
|
||||||
' <button type="button" class="h5p-joubelui-button h5p-button qs-solutionbutton"><%= solutionButtonText %></button>' +
|
solutionButtonTemplate +
|
||||||
' <button type="button" class="h5p-joubelui-button h5p-button qs-retrybutton"><%= retryButtonText %></button>' +
|
' <button type="button" class="h5p-joubelui-button h5p-button qs-retrybutton"><%= retryButtonText %></button>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
|
@ -212,6 +212,12 @@
|
||||||
"label": "Display results",
|
"label": "Display results",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "showSolutionButton",
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Display solution button",
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "noResultMessage",
|
"name": "noResultMessage",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
|
Loading…
Reference in New Issue