From 36c5192c1dd719a3489428f2b0da7f8902323526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Akon=20Ellingsen?= Date: Wed, 28 Sep 2016 11:28:53 +0200 Subject: [PATCH 1/5] HFP-29: Add option to disable solution button --- js/questionset.js | 6 +++++- semantics.json | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/js/questionset.js b/js/questionset.js index b346c51..bab8a12 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -56,6 +56,10 @@ H5P.QuestionSet = function (options, contentId, contentData) { ' ' + ''; + var solutionButtonTemplate = options.endGame.showSolutionButton ? + ' ': + ''; + var resulttemplate = '
' + '
<%= message %>
' + @@ -71,7 +75,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { ' <% } %>' + '
' + ' ' + - ' ' + + solutionButtonTemplate + ' ' + '
' + '
'; diff --git a/semantics.json b/semantics.json index eaaa265..a3ebb19 100644 --- a/semantics.json +++ b/semantics.json @@ -212,6 +212,12 @@ "label": "Display results", "default": true }, + { + "name": "showSolutionButton", + "type": "boolean", + "label": "Display solution button", + "default": true + }, { "name": "noResultMessage", "type": "text", From b893070d84ef75b6977eadfe47cf5853f934dc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Akon=20Ellingsen?= Date: Tue, 4 Oct 2016 09:33:00 +0200 Subject: [PATCH 2/5] HFP-29: Add new field to translations --- language/ar.json | 3 +++ language/de.json | 3 +++ language/fr.json | 3 +++ language/it.json | 3 +++ language/nb.json | 3 +++ language/nn.json | 3 +++ 6 files changed, 18 insertions(+) diff --git a/language/ar.json b/language/ar.json index 3a9c5fc..dd9f71c 100644 --- a/language/ar.json +++ b/language/ar.json @@ -113,6 +113,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/de.json b/language/de.json index 14b925f..51bc558 100644 --- a/language/de.json +++ b/language/de.json @@ -118,6 +118,9 @@ { "label": "Ergebnisanzeige" }, + { + "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 7929026..2cef1f0 100644 --- a/language/fr.json +++ b/language/fr.json @@ -118,6 +118,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 e6a6f1a..0b96fec 100644 --- a/language/it.json +++ b/language/it.json @@ -113,6 +113,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 e436438..2a07368 100644 --- a/language/nb.json +++ b/language/nb.json @@ -115,6 +115,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 bf63599..f6e5844 100644 --- a/language/nn.json +++ b/language/nn.json @@ -115,6 +115,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", From fd73d9fce79c093f5405e888557fd14e59307729 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Wed, 26 Apr 2017 16:07:22 +0200 Subject: [PATCH 3/5] Removed unused icomoon font files/definition --- css/questionset.css | 12 ------------ fonts/icomoon.eot | Bin 2364 -> 0 bytes fonts/icomoon.svg | 14 -------------- fonts/icomoon.ttf | Bin 2200 -> 0 bytes fonts/icomoon.woff | Bin 2276 -> 0 bytes 5 files changed, 26 deletions(-) delete mode 100644 fonts/icomoon.eot delete mode 100644 fonts/icomoon.svg delete mode 100644 fonts/icomoon.ttf delete mode 100644 fonts/icomoon.woff diff --git a/css/questionset.css b/css/questionset.css index 22e65d2..f9dc83a 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 d8cdc1a706bfa01a6aa79621094ce23f38be7a5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2364 zcmb_eO>7%g5T3U`UjLBwzt>6I#EDzQu8LE~brTm8xd<94M5L(*TqB2!rkRG~873atUwX^s|Yi9VoJD$+F| z5t;{bjW(dmIx#v)DZH%PIU6AR;USY`I{D_sv2p#&Khr?I!Mji@7uSFIXW$N$4nxi_ z6*tyFeURS)buO)5f8YH3(dUpCh}6mD#o}c;uYE@3*v9zjWdPc@@?*$9Lq57(-rNd+ zf&3S`=xU`@l)sifCDNXQte1;h>*S^HA@h2%wPJbkW#g+~Am_10ZoRUx2|v-CTRcv( zLgE&wMA98;2gpr}ia#hL5c@8zK(Qy9T&?4gt5oRFjx}WdalB#(Jx3};3MD`tp!{25 zpADc5Hxg|)kh}=GNg-FWyPWBhTrA#8#-8-Wl2?4 zi5+7H8-hL3o901vV7ZsSy)Vbb|B&=%C_Z-R&{#ZVQ?aiw)brJp`3e!NGUJBD`;S88sU!!?~ypt+%Ml-!13 zbq*%1&Kj*R - - -Generated by IcoMoon - - - - - - - - - - \ No newline at end of file diff --git a/fonts/icomoon.ttf b/fonts/icomoon.ttf deleted file mode 100644 index 9649f7e4215f6b46e79e2406bf2fbfb5cee35cce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 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S!uT78h-eq2AsYI)4GrZo5GlTr5OW z{lQ>AAGJT{9?6Xo^j+_xkKPVWKBa)lR{Htl@+bfD<`=_X4|i%F*uy=Y(4cu>wp*^P zIFpANyR(Oz*iL@BC8E-hpF-xH9(riMhRzoDa1VpNY~l<1O>@qYkY}291@hshtU`XH zDQgsm=Jb}${;!E|H?(~%uaNA_TEvANg5Tm^2GDxfND z&^#^Cd$dWbww9#lDGS==v$|NVRI3}ijWmai%k)02QyBoeHsI1rfM(z_ZGm5;B)vmd SF~4RXKHEIpzLh(VZSp@SaBdF( From 44125fa5ca9f606054f18b762c927ddd90f49c95 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Fri, 5 May 2017 11:35:55 +0200 Subject: [PATCH 4/5] Bumping minor --- library.json | 4 ++-- semantics.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library.json b/library.json index dcb9339..3fb82a0 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 a501305..a2b3ce6 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", From 6374504868d6bc99e3f9be6999c5892837ed2b20 Mon Sep 17 00:00:00 2001 From: Andreas Nergaard Date: Tue, 9 May 2017 10:27:50 +0200 Subject: [PATCH 5/5] HFP-815 Added function to limit number of auto plays at a time. --- js/questionset.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/js/questionset.js b/js/questionset.js index 0fdd085..512bf58 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -353,6 +353,8 @@ H5P.QuestionSet = function (options, contentId, contentData) { currentQuestion = questionNumber; + handleAutoPlay(currentQuestion); + // Hide all questions $('.question-container', $myDom).hide().eq(questionNumber).show(); @@ -403,6 +405,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.