diff --git a/css/questionset.css b/css/questionset.css index 22e65d20..f9dc83af 100644 --- a/css/questionset.css +++ b/css/questionset.css @@ -1,15 +1,3 @@ -/* IcoMoon font licensed under the GNU General Public License: http://www.gnu.org/licenses/gpl.html */ -@font-face { - font-family: 'icomoon-questionset'; - src:url('../fonts/icomoon.eot'); - src:url('../fonts/icomoon.eot?#iefix') format('embedded-opentype'), - url('../fonts/icomoon.woff') format('woff'), - url('../fonts/icomoon.ttf') format('truetype'), - url('../fonts/icomoon.svg#icomoon') format('svg'); - font-weight: normal; - font-style: normal; -} - .questionset-results h2 { font-size: 1.2em; font-weight: bold; diff --git a/fonts/icomoon.eot b/fonts/icomoon.eot deleted file mode 100644 index d8cdc1a7..00000000 Binary files a/fonts/icomoon.eot and /dev/null differ diff --git a/fonts/icomoon.svg b/fonts/icomoon.svg deleted file mode 100644 index 1a48364e..00000000 --- a/fonts/icomoon.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - \ No newline at end of file diff --git a/fonts/icomoon.ttf b/fonts/icomoon.ttf deleted file mode 100644 index 9649f7e4..00000000 Binary files a/fonts/icomoon.ttf and /dev/null differ diff --git a/fonts/icomoon.woff b/fonts/icomoon.woff deleted file mode 100644 index 5d29f5d4..00000000 Binary files a/fonts/icomoon.woff and /dev/null differ diff --git a/js/questionset.js b/js/questionset.js index 71ea69b5..0c486ce4 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -61,6 +61,10 @@ H5P.QuestionSet = function (options, contentId, contentData) { ' ' + ''; + var solutionButtonTemplate = options.endGame.showSolutionButton ? + ' ': + ''; + var resulttemplate = '
' + '
<%= message %>
' + @@ -76,7 +80,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { ' <% } %>' + '
' + ' ' + - ' ' + + solutionButtonTemplate + ' ' + '
' + '
'; @@ -350,6 +354,8 @@ H5P.QuestionSet = function (options, contentId, contentData) { currentQuestion = questionNumber; + handleAutoPlay(currentQuestion); + // Hide all questions $('.question-container', $myDom).hide().eq(questionNumber).show(); @@ -400,6 +406,21 @@ H5P.QuestionSet = function (options, contentId, contentData) { return currentQuestion; }; + /** + * Handle autoplays, limit to one at a time + */ + var handleAutoPlay = function (currentQuestion) { + for (var i = 0; i < questionInstances.length; i++) { + questionInstances[i].pause(); + } + + var hasAutoPlay = params.questions[currentQuestion].params.media.params.playback.autoplay; + + if (hasAutoPlay) { + questionInstances[currentQuestion].play(); + } + }; + /** * Show solutions for subcontent, and hide subcontent buttons. * Used for contracts with integrated content. diff --git a/language/ar.json b/language/ar.json index 838ccf77..07fc570b 100644 --- a/language/ar.json +++ b/language/ar.json @@ -121,6 +121,9 @@ { "label": "عرض النتائج" }, + { + "label": "Display solution button" + }, { "label": "No results message", "description": "Text displayed on end page when \"Display results\" is disabled", diff --git a/language/fr.json b/language/fr.json index dc445fad..16560092 100644 --- a/language/fr.json +++ b/language/fr.json @@ -126,6 +126,9 @@ { "label": "Afficher les résultats" }, + { + "label": "Display solution button" + }, { "label": "Message si pas de résultats", "description": "Texte affiché sur la page finale si l'option \"Afficher les résultats\" est désactivée.", diff --git a/language/it.json b/language/it.json index d520b116..0d6d8181 100644 --- a/language/it.json +++ b/language/it.json @@ -121,6 +121,9 @@ { "label": "Visualizza risultati" }, + { + "label": "Display solution button" + }, { "label": "No results message", "description": "Text displayed on end page when \"Display results\" is disabled", diff --git a/language/nb.json b/language/nb.json index 4c2aa482..4cca3860 100644 --- a/language/nb.json +++ b/language/nb.json @@ -126,6 +126,9 @@ { "label": "Vis resultater" }, + { + "label": "Vis resultatknapp" + }, { "label": "Melding når resultater ikke vises", "description": "Teksten vises på avslutnings-siden når resultater ikke vises", diff --git a/language/nn.json b/language/nn.json index 33507d19..08ad5e95 100644 --- a/language/nn.json +++ b/language/nn.json @@ -126,6 +126,9 @@ { "label": "Vis resultat" }, + { + "label": "Vis resultatknapp" + }, { "label": "Melding når resultater ikke vises", "description": "Teksten vises på avslutnings-siden når resultater ikke vises", diff --git a/library.json b/library.json index dcb93390..3fb82a0d 100644 --- a/library.json +++ b/library.json @@ -3,8 +3,8 @@ "description": "Put together a set of different questions that has to be solved. (Quiz)", "contentType": "question", "majorVersion": 1, - "minorVersion": 12, - "patchVersion": 1, + "minorVersion": 13, + "patchVersion": 0, "embedTypes": [ "iframe" ], diff --git a/semantics.json b/semantics.json index a5013051..72689729 100644 --- a/semantics.json +++ b/semantics.json @@ -122,7 +122,7 @@ "description": "Library for this question.", "options": [ "H5P.MultiChoice 1.9", - "H5P.DragQuestion 1.9", + "H5P.DragQuestion 1.10", "H5P.Blanks 1.7", "H5P.MarkTheWords 1.6", "H5P.DragText 1.5", @@ -255,6 +255,12 @@ "importance": "low", "default": true }, + { + "name": "showSolutionButton", + "type": "boolean", + "label": "Display solution button", + "default": true + }, { "name": "noResultMessage", "type": "text",