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 01/28] 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 02/28] 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 03/28] 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 2200 zcmb_dO>7%g5T5sT*Xtj$j(^ul+r)`m#jc7|$8{5z5V?ppP!!RoB5YH0QCx(BU*GW-Hyh|F9yd@vNa?_FGcPfei z`~ByrQ2L>+G+Ov64XW(%P1{&v=7@33oT)gel!f#`3X;swY5}Jos;yS**S@Ch1p}nO zO85!JA&JJzOu{E_HB>^>IOS-HF4HQEV^gwpDlap`hD^iOhaM!k?{eg2)=PitM_hPym;f@swd}muAM!5ZD-DtEeb}=o*pw2^rWyn&6Abc z#F^|nR#U-uat@jGlOZ|Q1ns}Wu%J~5&hnDF<60_xq^vEe~Oyr8H))i5K0K*ThlDvYJ3X_61d2eg5=(w*l)ePFqpx4o~% z#s5(BRy;F$=+I~;?n$w)F*Nr#hR$EW<2&u7OfKf*nf`FNpF7%Q6n--CSaj(^ul+r)`m#jc8j<7#o7Xs@ztNX#Y*`SY%9vEJeh~U$CjDFG!AfQ83T!3l z38pZn_39$~y#>)=QofO&SISp#uFkO}Z3@y48|BIpY}ashk?Cdg>t8NaH@6Vh_d9+H zBt<3hA!$VNrhEkbhQq}llovke|2;~Se4;D027XG7N_(7>wk|RANm0z4@hGX32KRsq zl8n%3Ku9WoU}d(;AFpQ?hV8D^tUU zj70}zJ~TD}!GIx)g(;cWcyb$u_8KClp|JbN_<)iJ-ngW-d)LpNy?$@4#pky#pE`AU zd%ndRp$gE#Y{Y&DW-CX^r7C~L+Qkx{5(f5(VN}mCt_+N%HEW;<*0K?evj8*j~Cog z@-6mBOXvI7J+s!VxYa2Os0n;=u9}#jSLifueS;o!b92E3^Mb%X{-PK%v&u+TDdb~j z3e&iu=!HDWNEZ`Ij%#8Hr7pRMoqlH3 z{E=|TYs3uQs#(@GZzvq`TRQZ5zp87hkVdr6F!~U!P&Hk(Z6cgJnn)Z?hJ|etR=1vA zlxKaR#DQ^yrKhSd(Bm}*hmS<=25PklZ%@Fd-i;g?9yG+Oit14fGvxDyOar3Ay3{mH za$p>wt+ZCU^W3iwpbvKL18p@f{)eKsqN&jX2S!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 04/28] 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 45b00ffc146987b1143099dc10699d5f96687f41 Mon Sep 17 00:00:00 2001 From: Tom Arild Jakobsen Date: Mon, 8 May 2017 13:59:38 +0200 Subject: [PATCH 05/28] Remove deprecated and unneeded reference to 'overrideSettings'. HFP-574 --- js/questionset.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index 0fdd085..71ea69b 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -265,9 +265,6 @@ H5P.QuestionSet = function (options, contentId, contentData) { } question.params = question.params || {}; - question.params.overrideSettings = question.params.overrideSettings || {}; - question.params.overrideSettings.$confirmationDialogParent = $template.last(); - question.params.overrideSettings.instance = this; var hasAnswers = contentData.previousState && contentData.previousState.answers; var questionInstance = H5P.newRunnable(question, contentId, undefined, undefined, { @@ -282,7 +279,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { } return result; - } + }; // Create question instances from questions given by params questionInstances = createQuestionInstancesFromQuestions(params.questions); From 6374504868d6bc99e3f9be6999c5892837ed2b20 Mon Sep 17 00:00:00 2001 From: Andreas Nergaard Date: Tue, 9 May 2017 10:27:50 +0200 Subject: [PATCH 06/28] 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. From 00f6e302972217d744bcaa534134918f8b33350f Mon Sep 17 00:00:00 2001 From: Sergey Yuhnevich Date: Fri, 2 Jun 2017 15:02:27 +0300 Subject: [PATCH 07/28] Add ability to override check button --- js/questionset.js | 27 ++++++++++++++------------- library.json | 4 ++-- semantics.json | 22 ++++++++++++++++++++-- 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index b96cc0e..7966ddf 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -225,20 +225,21 @@ H5P.QuestionSet = function (options, contentId, contentData) { var $template = $(template.render(params)); // Set overrides for questions - 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); - } + var override = {}; - if (params.override.retryButton) { - // Force "Retry" button to be on or off for all interactions - override.enableRetry = - (params.override.retryButton === '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'; } /** diff --git a/library.json b/library.json index 3fb82a0..64c1f66 100644 --- a/library.json +++ b/library.json @@ -4,7 +4,7 @@ "contentType": "question", "majorVersion": 1, "minorVersion": 13, - "patchVersion": 0, + "patchVersion": 1, "embedTypes": [ "iframe" ], @@ -61,4 +61,4 @@ "minorVersion": 2 } ] -} \ No newline at end of file +} diff --git a/semantics.json b/semantics.json index 7268972..db3fabd 100644 --- a/semantics.json +++ b/semantics.json @@ -418,10 +418,28 @@ { "name": "override", "type": "group", - "label": "Settings for \"Show solution\" and \"Retry\" buttons", + "label": "Override settings for \"Check\", \"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", @@ -460,4 +478,4 @@ } ] } -] \ No newline at end of file +] From 976e9567c686b37179a9c8b753e9a690d591254f Mon Sep 17 00:00:00 2001 From: Tom Arild Jakobsen Date: Wed, 7 Jun 2017 14:44:42 +0200 Subject: [PATCH 08/28] Fix bug where Question Set children without media fails. HFP-1181 --- js/questionset.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index b96cc0e..1413ab7 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -411,16 +411,22 @@ H5P.QuestionSet = function (options, contentId, contentData) { /** * Handle autoplays, limit to one at a time + * + * @param {number} currentQuestionIndex */ - var handleAutoPlay = function (currentQuestion) { + var handleAutoPlay = function (currentQuestionIndex) { for (var i = 0; i < questionInstances.length; i++) { questionInstances[i].pause(); } - var hasAutoPlay = params.questions[currentQuestion].params.media.params.playback.autoplay; + var currentQuestion = params.questions[currentQuestionIndex]; + + var hasAutoPlay = currentQuestion + && currentQuestion.params.media + && currentQuestion.params.media.params.playback.autoplay; if (hasAutoPlay) { - questionInstances[currentQuestion].play(); + questionInstances[currentQuestionIndex].play(); } }; From e7e83f43ce6de390fc37b1e8cc94e9b8d6557bb4 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Mon, 12 Jun 2017 11:07:31 +0200 Subject: [PATCH 09/28] Revert "Merge pull request #11 from SergeyYukhnevich/add-override-of-check-button" This reverts commit 6c86c8ac9d6f4d4a09412dffaee84a2a21f29c97, reversing changes made to 976e9567c686b37179a9c8b753e9a690d591254f. --- js/questionset.js | 27 +++++++++++++-------------- library.json | 4 ++-- semantics.json | 22 ++-------------------- 3 files changed, 17 insertions(+), 36 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index 4e3aba4..1413ab7 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -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); + } } /** diff --git a/library.json b/library.json index 64c1f66..3fb82a0 100644 --- a/library.json +++ b/library.json @@ -4,7 +4,7 @@ "contentType": "question", "majorVersion": 1, "minorVersion": 13, - "patchVersion": 1, + "patchVersion": 0, "embedTypes": [ "iframe" ], @@ -61,4 +61,4 @@ "minorVersion": 2 } ] -} +} \ No newline at end of file diff --git a/semantics.json b/semantics.json index db3fabd..7268972 100644 --- a/semantics.json +++ b/semantics.json @@ -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 @@ } ] } -] +] \ No newline at end of file From 60dedf8ef79b79e922b9a5c734fe3f4369c86d02 Mon Sep 17 00:00:00 2001 From: Sabahuddin Date: Fri, 16 Jun 2017 00:55:59 +0200 Subject: [PATCH 10/28] bs.json Bosnian translation --- language/bs.json | 229 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 language/bs.json diff --git a/language/bs.json b/language/bs.json new file mode 100644 index 0000000..c4b1280 --- /dev/null +++ b/language/bs.json @@ -0,0 +1,229 @@ +{ + "semantics": [ + { + "label": "Uvod u kviz", + "fields": [ + { + "label": "Prikaži uvod" + }, + { + "label": "Naziv", + "description": "Ovaj će naziv biti prikazan iznad uvodnog teksta." + }, + { + "label": "Tekst uvoda", + "description": "Ovaj će naziv biti prikazan prije početka kviza." + }, + { + "label": "Oznaka za dugme \"Start\"", + "default": "Start" + }, + { + "label": "Slika pozadine", + "description": "Slika pozadine na početku. (opcionalno)." + } + ] + }, + { + "label": "Slika pozadine", + "description": "Slika pozadine seta pitanja. (opcionalno)." + }, + { + "label": "Prikaz napredovanja", + "description": "Prikazivanje napredovanja", + "options": [ + { + "label": "Tekst" + }, + { + "label": "Bodovi" + } + ] + }, + { + "label": "Minimalno procenata za prolaz", + "description": "Minimalno osvojenih procenata da bi se kviz smatrao uspješno prođenim." + }, + { + "label": "Pitanja", + "widgets": [ + { + "label": "Standard" + }, + { + "label": "Tekst" + } + ], + "entity": "Pitanje", + "field": { + "label": "Vrsta pitanja", + "description": "Biblioteka za ovo pitanje." + } + }, + { + "label": "Prikaz teksta u kvizu", + "fields": [ + { + "label": "Oznaka za dugme \"Nazad\"", + "default": "Zurück" + }, + { + "label": "Oznaka za dugme \"Naprijed\"", + "default": "Weiter" + }, + { + "label": "Oznaka za dugme \"Završi\"", + "default": "Završi" + }, + { + "label": "Tekst o napredovanju", + "description": "Koristi tekst ako je izabran za napredak u pisanom obliku.", + "default": "Aktuelno pitanje: @current od @total pitanja" + }, + { + "label": "Označavanje za skakanje do određene tačke", + "description": "Koristi mjesto '%d' za redoslijed pitanja i %total za ukupan broj pitanja.", + "default": "Pitanje %d od %total" + }, + { + "label": "Opis pitanja u vezi sa vezi s autorom", + "default": "Pitanje" + }, + { + "label": "Napredno \"Readspeaker\"", + "description": "Varijable: @current i @total", + "default": "Pitanje @current od @total" + }, + { + "label": "Tekst za neodgovorena pitanja", + "default": "Neodgovoreno" + }, + { + "label": "Tekst za odgovorena pitanja", + "default": "Odgovoreno" + }, + { + "label": "Tekst za trenutno pitanja", + "default": "Trenutno pitanje" + } + ] + }, + { + "label": "Deaktivirati mogućnost povratka unazad", + "description": "Ako je aktivirano, korisnik će moći ići samo naprijed u odgovaranju na pitanja." + }, + { + "label": "Izmješati pitanja", + "description": "Ako je aktivirano, pitanja će kod svakog učitavanja kviza imati drugi raspored." + }, + { + "label": "Broj pitanja za prikaz:", + "description": "Može se koristiti kod odabira slučajnog pitanja." + }, + { + "label": "Završi kviz", + "fields": [ + { + "label": "Prikaz rezultata" + }, + { + "label": "Napomena ako nema rezultata", + "description": "Tekst koji će biti prikazan u slučaju da je \"Prikaz rezultata\" deaktiviran", + "default": "Završi" + }, + { + "label": "Oznaka za povratne informacije", + "default": "Tvoj rezultat:", + "description": "Ovaj tekst će biti prikazan na kraju kviza kada korisnik odgovori na pitanja." + }, + { + "label": "Tekst za prikaz broj odova", + "description": "Ovaj tekst će se koristiti da prikaže ukupan broj bodova korisnika. \"@score\" će biti zamjenjen sa osvojenim bodovima, \"@total\" će biti zamjenjeno sa maksimalnim brojem bodova.", + "default": "Osvojeno @score bodova od @total mogućih." + }, + { + "label": "Oznaka za \"Kviz položen\"", + "placeholder": "BRAVO!", + "default": "BRAVO!", + "description": "Ovaj tekst će biti prikazan iznad broja bodova kada je korisnik uspješno završio kviz." + }, + { + "label": "Komentar za uspješno završen kviz", + "default": "Nije loše!", + "description": "Ovaj tekst će biti prikazan iznad broja bodova kada je korisnik uspješno završio kviz." + }, + { + "label": "Oznaka kod neuspješnog završetka kviza", + "default": "Ovoga puta nije dovoljno dobro.", + "description": "Ovaj tekst će biti prikazan iznad broja bodova kada je korisnik nije uspješno završio kviz." + }, + { + "label": "Oznaka kod neuspješnog završetka kviza", + "default": "Pokušaj još jednom!", + "description": "Ovaj komentar će se pokazati nakon što korisnik nije sakupio dovoljan broj bodova za uspješan završetak kviza." + }, + { + "label": "Oznaka za dugme \"Prikaži rješenje\"", + "default": "Prikaži rješenje", + "description": "Oznaka za dugme \"Prikaži rješenje\"" + }, + { + "label": "Oznaka za dugme \"Ponovi\"", + "default": "Ponovi", + "description": "Oznaka za dugme \"Ponovi\"" + }, + { + "label": "Oznaka za dugme \"Završi\"", + "default": "Završi" + }, + { + "label": "Prikaži video prije rezultata kviza" + }, + { + "label": "Aktiviraj dugme \"Preskoči vidio\"" + }, + { + "label": "Oznaka za dugme \"Preskoči video\"", + "default": "Preskoči video" + }, + { + "label": "Video nakon položenog kviza", + "description": "Ovaj video se prikazuje nakon što korisnik uspješno položi kviz." + }, + { + "label": "Video nakon nepoloženog kviza", + "description": "Ovaj video se prikazuje nakon što korisnik neuspješno završi kviz." + } + ] + }, + { + "label": "Podešavanje dugmeta \"Prikaži rješenje\" i \"Ponovi\".", + "fields": [ + { + "label": "Poništi dugme \"Prikaži rješenje\"", + "description": "Ova opcija podešava prikazivanje dugmeta \"Prikaži rješenje\" za sva pitanja ili da bude za svako posebno pitanje konfigurirano.", + "options": [ + { + "label": "Prikaži" + }, + { + "label": "Nemoj prikazati" + } + ] + }, + { + "label": "Poništi dugme \"Ponovi\"", + "description": "Ova opcija podešava prikazivanje dugmeta \"Ponovi\" za sva pitanja ili da bude za svako posebno pitanje konfigurirano.", + "options": [ + { + "label": "Prikaži" + }, + { + "label": "Nemoj prikazati" + } + ] + } + ] + } + ] +} From 5aaa622fa5d35ac0443872e35dd36815c5e8123d Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Thu, 22 Jun 2017 15:29:46 +0200 Subject: [PATCH 11/28] HFP-1210 Set up Crowdin --- crowdin.yml | 3 + language/.en.json | 233 ++++++++++++++++++++++++++++++++++++++++++++++ language/ar.json | 2 +- language/bs.json | 2 +- language/de.json | 2 +- language/fr.json | 2 +- language/it.json | 2 +- language/nb.json | 2 +- language/nn.json | 2 +- 9 files changed, 243 insertions(+), 7 deletions(-) create mode 100644 crowdin.yml create mode 100644 language/.en.json diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 0000000..48edea1 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,3 @@ +files: + - source: /language/.en.json + translation: /language/%two_letters_code%.json diff --git a/language/.en.json b/language/.en.json new file mode 100644 index 0000000..c59f34f --- /dev/null +++ b/language/.en.json @@ -0,0 +1,233 @@ +{ + "semantics": [ + { + "label": "Quiz introduction", + "fields": [ + { + "label": "Display introduction" + }, + { + "label": "Title", + "description": "This title will be displayed above the introduction text." + }, + { + "label": "Introduction text", + "description": "This text will be displayed before the quiz starts." + }, + { + "label": "Start button text", + "default": "Start Quiz" + }, + { + "label": "Background image", + "description": "An optional background image for the introduction." + } + ] + }, + { + "label": "Background image", + "description": "An optional background image for the Question set." + }, + { + "label": "Progress indicator", + "description": "Question set progress indicator style.", + "options": [ + { + "label": "Textual" + }, + { + "label": "Dots" + } + ], + "default": "dots" + }, + { + "label": "Pass percentage", + "description": "Percentage of Total score required for passing the quiz." + }, + { + "label": "Questions", + "widgets": [ + { + "label": "Default" + }, + { + "label": "Textual" + } + ], + "entity": "question", + "field": { + "label": "Question type", + "description": "Library for this question." + } + }, + { + "label": "Interface texts in quiz", + "fields": [ + { + "label": "Back button", + "default": "Previous question" + }, + { + "label": "Next button", + "default": "Next question" + }, + { + "label": "Finish button", + "default": "Finish" + }, + { + "label": "Progress text", + "description": "Text used if textual progress is selected.", + "default": "Question: @current of @total questions" + }, + { + "label": "Label for jumping to a certain question", + "description": "You must use the placeholder '%d' instead of the question number, and %total instead of total amount of questions.", + "default": "Question %d of %total" + }, + { + "label": "Copyright dialog question label", + "default": "Question" + }, + { + "label": "Readspeaker progress", + "description": "May use @current and @total question variables", + "default": "Question @current of @total" + }, + { + "label": "Unanswered question text", + "default": "Unanswered" + }, + { + "label": "Answered question text", + "default": "Answered" + }, + { + "label": "Current question text", + "default": "Current question" + } + ] + }, + { + "label": "Disable backwards navigation", + "description": "This option will only allow you to move forward in Question Set" + }, + { + "label": "Randomize questions", + "description": "Enable to randomize the order of questions on display." + }, + { + "label": "Number of questions to be shown:", + "description": "Create a randomized batch of questions from the total." + }, + { + "label": "Quiz finished", + "fields": [ + { + "label": "Display results" + }, + { + "label": "Display solution button" + }, + { + "label": "No results message", + "description": "Text displayed on end page when \"Display results\" is disabled", + "default": "Finished" + }, + { + "label": "Feedback heading", + "default": "Your result:", + "description": "This heading will be displayed at the end of the quiz when the user has answered all questions." + }, + { + "label": "Score display text", + "description": "Text used to display Total user score. \"@score\" will be replaced by calculated score, \"@total\" will be replaced by maximum possible score. ", + "default": "You got @score of @total points" + }, + { + "label": "Quiz passed greeting", + "placeholder": "Congratulations!", + "default": "Congratulations!", + "description": "This text will be displayed above the score if the user has successfully passed the quiz." + }, + { + "label": "Passed comment", + "default": "You did very well!", + "description": "This comment will be displayed after the score if the user has successfully passed the quiz." + }, + { + "label": "Quiz failed title", + "default": "You did not pass this time.", + "description": "This text will be displayed above the score if the user has failed the quiz." + }, + { + "label": "Failed comment", + "default": "Have another try!", + "description": "This comment will be displayed after the score if the user has failed the quiz." + }, + { + "label": "Solution button label", + "default": "Show solution", + "description": "Text for the solution button." + }, + { + "label": "Retry button label", + "default": "Retry", + "description": "Text for the retry button." + }, + { + "label": "Finish button text", + "default": "Finish" + }, + { + "label": "Display video before quiz results" + }, + { + "label": "Enable skip video button" + }, + { + "label": "Skip video button label", + "default": "Skip video" + }, + { + "label": "Passed video", + "description": "This video will be played if the user successfully passed the quiz." + }, + { + "label": "Fail video", + "description": "This video will be played if the user failes the quiz." + } + ] + }, + { + "label": "Settings for \"Show solution\" and \"Retry\" buttons", + "fields": [ + { + "label": "Override \"Show Solution\" button", + "description": "This option determines if the \"Show Solution\" button will be shown for all questions, disabled for all or configured for each question individually.", + "options": [ + { + "label": "Enabled" + }, + { + "label": "Disabled" + } + ] + }, + { + "label": "Override \"Retry\" button", + "description": "This option determines if the \"Retry\" button will be shown for all questions, disabled for all or configured for each question individually.", + "options": [ + { + "label": "Enabled" + }, + { + "label": "Disabled" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/language/ar.json b/language/ar.json index 07fc570..e8b0509 100644 --- a/language/ar.json +++ b/language/ar.json @@ -213,4 +213,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/language/bs.json b/language/bs.json index c4b1280..c92f10e 100644 --- a/language/bs.json +++ b/language/bs.json @@ -226,4 +226,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/language/de.json b/language/de.json index 1713d8b..7ca76c1 100644 --- a/language/de.json +++ b/language/de.json @@ -226,4 +226,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/language/fr.json b/language/fr.json index 1656009..25d6038 100644 --- a/language/fr.json +++ b/language/fr.json @@ -229,4 +229,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/language/it.json b/language/it.json index 0d6d818..7b7a5b5 100644 --- a/language/it.json +++ b/language/it.json @@ -213,4 +213,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/language/nb.json b/language/nb.json index 4cca386..650641d 100644 --- a/language/nb.json +++ b/language/nb.json @@ -228,4 +228,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/language/nn.json b/language/nn.json index 08ad5e9..54a5a25 100644 --- a/language/nn.json +++ b/language/nn.json @@ -228,4 +228,4 @@ ] } ] -} +} \ No newline at end of file From 89a7ac9cbecf6375dadd7d4dcc32e79a3a163fb7 Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Thu, 22 Jun 2017 15:36:00 +0200 Subject: [PATCH 12/28] HFP-1210 Update english source --- language/.en.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/language/.en.json b/language/.en.json index c59f34f..8f14827 100644 --- a/language/.en.json +++ b/language/.en.json @@ -38,8 +38,7 @@ { "label": "Dots" } - ], - "default": "dots" + ] }, { "label": "Pass percentage", @@ -230,4 +229,4 @@ ] } ] -} \ No newline at end of file +} From 7bcf03db17fab8c3d0677a09e895e09bd9f03888 Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Mon, 26 Jun 2017 14:31:29 +0200 Subject: [PATCH 13/28] HFP-1210 Update .en.json --- language/.en.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/language/.en.json b/language/.en.json index 8f14827..c59f34f 100644 --- a/language/.en.json +++ b/language/.en.json @@ -38,7 +38,8 @@ { "label": "Dots" } - ] + ], + "default": "dots" }, { "label": "Pass percentage", @@ -229,4 +230,4 @@ ] } ] -} +} \ No newline at end of file From 562063ddb041843fa798c6b07b52c14f4ed6463d Mon Sep 17 00:00:00 2001 From: otacke Date: Wed, 28 Jun 2017 16:07:46 +0200 Subject: [PATCH 14/28] fix typo --- language/de.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language/de.json b/language/de.json index 7ca76c1..dca83c1 100644 --- a/language/de.json +++ b/language/de.json @@ -103,7 +103,7 @@ "default": "Beantwortet" }, { - "label": "Text fpr aktuelle Frage", + "label": "Text für aktuelle Frage", "default": "Aktuelle Frage" } ] @@ -226,4 +226,4 @@ ] } ] -} \ No newline at end of file +} From 9401e5abe33faf4e38d58594fcaf2b92e593307c Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Mon, 3 Jul 2017 15:09:49 +0200 Subject: [PATCH 15/28] Added overall feedback to question set + bonus fixes [HFP-1174] --- css/questionset.css | 17 ++++------ js/questionset.js | 27 +++++++-------- library.json | 9 +++-- semantics.json | 82 +++++++++++++++++++++++++++++++++++---------- upgrades.js | 26 ++++++++++++++ 5 files changed, 116 insertions(+), 45 deletions(-) diff --git a/css/questionset.css b/css/questionset.css index f9dc83a..a9eb1fc 100644 --- a/css/questionset.css +++ b/css/questionset.css @@ -225,30 +225,27 @@ font-size: 1.25em; } -.questionset-results .feedback-section .feedback-text { - font-weight: normal; - color: #777; -} - .questionset-results .buttons { - margin-bottom: 1.5em; + margin: 2em 0 1em 0; } .questionset-results .result-header, -.questionset-results .result-text { +.questionset-results .result-text, +.questionset-results .feedback-section .feedback-text { color: #1a73d9; font-weight: bold; } .questionset-results .result-header { font-size: 2em; - margin-top: 1em; + margin: 1em 0.5em 0.5em 0.5em; } -.questionset-results .result-text { +.questionset-results .result-text, +.questionset-results .feedback-section .feedback-text { font-size: 1.25em; line-height: 1.25em; - margin: 1em 1em 2.25em; + margin: 1em; } /* No margin for questions when no frame */ diff --git a/js/questionset.js b/js/questionset.js index d4bc904..6bd0b21 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -112,11 +112,11 @@ H5P.QuestionSet = function (options, contentId, contentData) { showResultPage: true, noResultMessage: 'Finished', message: 'Your result:', - successGreeting: 'Congratulations!', - successComment: 'You have enough correct answers to pass the test.', - failGreeting: 'Sorry!', - failComment: "You don't have enough correct answers to pass this test.", - scoreString: 'You got @score of @total points', + successGreeting: '', + successComment: '', + failGreeting: '', + failComment: '', + overallFeedback: [], finishButtonText: 'Finish', solutionButtonText: 'Show solution', retryButtonText: 'Retry', @@ -420,13 +420,17 @@ H5P.QuestionSet = function (options, contentId, contentData) { var hasAutoPlay = currentQuestion && currentQuestion.params.media + && currentQuestion.params.media.params + && currentQuestion.params.media.params.playback && currentQuestion.params.media.params.playback.autoplay; - if (hasAutoPlay) { + if (hasAutoPlay && typeof questionInstances[currentQuestionIndex].play === 'function') { questionInstances[currentQuestionIndex].play(); } }; + + /** * Show solutions for subcontent, and hide subcontent buttons. * Used for contracts with integrated content. @@ -703,12 +707,9 @@ H5P.QuestionSet = function (options, contentId, contentData) { // Get total score. var finals = self.getScore(); var totals = self.getMaxScore(); - var scoreString = params.endGame.scoreString.replace("@score", finals).replace("@total", totals); + + var scoreString = H5P.Question.determineOverallFeedback(params.endGame.overallFeedback, finals / totals).replace('@score', finals).replace('@total', totals); var success = ((100 * finals / totals) >= params.passPercentage); - var eventData = { - score: scoreString, - passed: success - }; /** * Makes our buttons behave like other buttons. @@ -743,10 +744,6 @@ H5P.QuestionSet = function (options, contentId, contentData) { $myDom.append(endTemplate.render(eparams)); if (params.endGame.showResultPage) { - // Add event handlers to summary buttons - hookUpButton('.qs-finishbutton', function () { - self.trigger('h5pQuestionSetFinished', eventData); - }); hookUpButton('.qs-solutionbutton', function () { showSolutions(); $myDom.children().hide().filter('.questionset').show(); diff --git a/library.json b/library.json index 3fb82a0..0c46467 100644 --- a/library.json +++ b/library.json @@ -14,7 +14,7 @@ "author": "Joubel", "coreApi": { "majorVersion": 1, - "minorVersion": 6 + "minorVersion": 14 }, "license": "MIT", "preloadedJs": [ @@ -50,6 +50,11 @@ } ], "editorDependencies": [ + { + "machineName": "H5PEditor.RangeList", + "majorVersion": 1, + "minorVersion": 0 + }, { "machineName": "H5PEditor.VerticalTabs", "majorVersion": 1, @@ -61,4 +66,4 @@ "minorVersion": 2 } ] -} \ No newline at end of file +} diff --git a/semantics.json b/semantics.json index 7268972..3eb6e3c 100644 --- a/semantics.json +++ b/semantics.json @@ -122,7 +122,7 @@ "description": "Library for this question.", "options": [ "H5P.MultiChoice 1.9", - "H5P.DragQuestion 1.10", + "H5P.DragQuestion 1.11", "H5P.Blanks 1.7", "H5P.MarkTheWords 1.6", "H5P.DragText 1.5", @@ -276,7 +276,6 @@ "label": "Feedback heading", "importance": "low", "default": "Your result:", - "optional": true, "description": "This heading will be displayed at the end of the quiz when the user has answered all questions.", "tags": [ "strong", @@ -284,27 +283,74 @@ ] }, { - "name": "scoreString", - "type": "text", - "label": "Score display text", + "name": "overallFeedback", + "type": "group", + "label": "Overall Feedback", "importance": "low", - "description": "Text used to display Total user score. \"@score\" will be replaced by calculated score, \"@total\" will be replaced by maximum possible score. ", - "default": "You got @score of @total points", - "optional": true + "fields": [ + { + "name": "overallFeedback", + "type": "list", + "widgets": [ + { + "name": "RangeList", + "label": "Default" + } + ], + "importance": "high", + "label": "Define custom feedback for any score range", + "description": "Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!", + "entity": "range", + "min": 1, + "defaultNum": 1, + "optional": true, + "field": { + "name": "overallFeedback", + "type": "group", + "importance": "low", + "fields": [ + { + "name": "from", + "type": "number", + "label": "Score Range", + "min": 0, + "max": 100, + "default": 0, + "unit": "%" + }, + { + "name": "to", + "type": "number", + "min": 0, + "max": 100, + "default": 100, + "unit": "%" + }, + { + "name": "feedback", + "type": "text", + "label": "Feedback for defined score range", + "importance": "low", + "placeholder": "Fill in the feedback", + "optional": true + } + ] + } + } + ] }, { "name": "successGreeting", "type": "text", "label": "Quiz passed greeting", "importance": "low", - "placeholder": "Congratulations!", - "default": "Congratulations!", "optional": true, "description": "This text will be displayed above the score if the user has successfully passed the quiz.", "tags": [ "strong", "em" - ] + ], + "deprecated": true }, { "name": "successComment", @@ -312,7 +358,6 @@ "widget": "html", "label": "Passed comment", "importance": "low", - "default": "You did very well!", "optional": true, "description": "This comment will be displayed after the score if the user has successfully passed the quiz.", "tags": [ @@ -322,20 +367,21 @@ "em", "a", "p" - ] + ], + "deprecated": true }, { "name": "failGreeting", "type": "text", "label": "Quiz failed title", "importance": "low", - "default": "You did not pass this time.", "optional": true, "description": "This text will be displayed above the score if the user has failed the quiz.", "tags": [ "strong", "em" - ] + ], + "deprecated": true }, { "name": "failComment", @@ -343,7 +389,6 @@ "widget": "html", "label": "Failed comment", "importance": "low", - "default": "Have another try!", "optional": true, "description": "This comment will be displayed after the score if the user has failed the quiz.", "tags": [ @@ -353,7 +398,8 @@ "em", "a", "p" - ] + ], + "deprecated": true }, { "name": "solutionButtonText", @@ -460,4 +506,4 @@ } ] } -] \ No newline at end of file +] diff --git a/upgrades.js b/upgrades.js index dc41328..bf86aea 100644 --- a/upgrades.js +++ b/upgrades.js @@ -52,6 +52,32 @@ H5PUpgrades['H5P.QuestionSet'] = (function ($) { // Remove old copyright dialog question label delete parameters.questionLabel; + finished(null, parameters); + }, + + /** + * Asynchronous content upgrade hook. + * + * Upgrade params to support overall feedback + * + * @param {Object} parameters + * @param {function} finished + */ + 13: function (parameters, finished) { + + parameters.endGame = parameters.endGame || {}; + parameters.endGame.overallFeedback = []; + + if (parameters.endGame.scoreString) { + parameters.endGame.overallFeedback.push({ + from: 0, + to: 100, + feedback: parameters.endGame.scoreString + }); + + delete parameters.endGame.scoreString; + } + finished(null, parameters); } } From acb9da13ee9157dae7e25ae2280c28ce995f5252 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Tue, 4 Jul 2017 08:30:52 +0200 Subject: [PATCH 16/28] Updated english source file [HFP-1174] --- language/.en.json | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/language/.en.json b/language/.en.json index c59f34f..242a8bf 100644 --- a/language/.en.json +++ b/language/.en.json @@ -141,29 +141,43 @@ "description": "This heading will be displayed at the end of the quiz when the user has answered all questions." }, { - "label": "Score display text", - "description": "Text used to display Total user score. \"@score\" will be replaced by calculated score, \"@total\" will be replaced by maximum possible score. ", - "default": "You got @score of @total points" + "label": "Overall Feedback", + "fields": [ + { + "widgets": [], + "label": "Define custom feedback for any score range", + "description": "Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!", + "entity": "range", + "field": { + "fields": [ + { + "label": "Score Range" + }, + { + }, + { + "label": "Feedback for defined score range", + "placeholder": "Fill in the feedback" + } + ] + } + } + ] }, { "label": "Quiz passed greeting", - "placeholder": "Congratulations!", - "default": "Congratulations!", "description": "This text will be displayed above the score if the user has successfully passed the quiz." }, { "label": "Passed comment", - "default": "You did very well!", "description": "This comment will be displayed after the score if the user has successfully passed the quiz." }, { "label": "Quiz failed title", - "default": "You did not pass this time.", "description": "This text will be displayed above the score if the user has failed the quiz." }, { "label": "Failed comment", - "default": "Have another try!", "description": "This comment will be displayed after the score if the user has failed the quiz." }, { @@ -230,4 +244,4 @@ ] } ] -} \ No newline at end of file +} From 63e95b71522284f0779731114a69fd63820139fa Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Tue, 4 Jul 2017 13:12:11 +0200 Subject: [PATCH 17/28] Setting up default feedback for overall feedback [HFP-1174] --- semantics.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/semantics.json b/semantics.json index 3eb6e3c..b6db4ee 100644 --- a/semantics.json +++ b/semantics.json @@ -299,7 +299,7 @@ ], "importance": "high", "label": "Define custom feedback for any score range", - "description": "Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!", + "description": "Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!\n\"@score\" will be replaced by calculated score, \"@total\" will be replaced by maximum possible score.", "entity": "range", "min": 1, "defaultNum": 1, @@ -332,6 +332,8 @@ "label": "Feedback for defined score range", "importance": "low", "placeholder": "Fill in the feedback", + "default": "You got @score of @total points", + "showDefaultOnFirstRow": true, "optional": true } ] From e734db1769c5b02fbe088e03d9b5b1d02c7a200f Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Thu, 13 Jul 2017 14:46:03 +0200 Subject: [PATCH 18/28] Version bump --- library.json | 9 +++++++-- semantics.json | 12 ++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/library.json b/library.json index 3fb82a0..9463e17 100644 --- a/library.json +++ b/library.json @@ -3,7 +3,7 @@ "description": "Put together a set of different questions that has to be solved. (Quiz)", "contentType": "question", "majorVersion": 1, - "minorVersion": 13, + "minorVersion": 15, "patchVersion": 0, "embedTypes": [ "iframe" @@ -59,6 +59,11 @@ "machineName": "H5PEditor.QuestionSetTextualEditor", "majorVersion": 1, "minorVersion": 2 + }, + { + "machineName": "H5PEditor.RangeList", + "majorVersion": 1, + "minorVersion": 0 } ] -} \ No newline at end of file +} diff --git a/semantics.json b/semantics.json index 7268972..ffbbc0f 100644 --- a/semantics.json +++ b/semantics.json @@ -121,11 +121,11 @@ "importance": "high", "description": "Library for this question.", "options": [ - "H5P.MultiChoice 1.9", - "H5P.DragQuestion 1.10", - "H5P.Blanks 1.7", - "H5P.MarkTheWords 1.6", - "H5P.DragText 1.5", + "H5P.MultiChoice 1.10", + "H5P.DragQuestion 1.11", + "H5P.Blanks 1.8", + "H5P.MarkTheWords 1.7", + "H5P.DragText 1.6", "H5P.TrueFalse 1.1" ] } @@ -460,4 +460,4 @@ } ] } -] \ No newline at end of file +] From 7aad2428915fcd48d2d0a45bdd55d2ea5ffd17ca Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Thu, 13 Jul 2017 15:19:37 +0200 Subject: [PATCH 19/28] Remove default feedback HFP-1174 --- semantics.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/semantics.json b/semantics.json index b6db4ee..2720be7 100644 --- a/semantics.json +++ b/semantics.json @@ -332,8 +332,6 @@ "label": "Feedback for defined score range", "importance": "low", "placeholder": "Fill in the feedback", - "default": "You got @score of @total points", - "showDefaultOnFirstRow": true, "optional": true } ] From 6a762b8223c64b2187e24e8c2c802b172f8538b6 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Thu, 13 Jul 2017 15:51:24 +0200 Subject: [PATCH 20/28] Move old feedback into a separate deprecated group HFP-1174 --- js/questionset.js | 80 +++++++++++++++--------------- language/.en.json | 36 ++++++++------ library.json | 2 +- semantics.json | 123 ++++++++++++++++++++++++---------------------- upgrades.js | 20 ++++++++ 5 files changed, 146 insertions(+), 115 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index 6bd0b21..8518a7d 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -112,10 +112,12 @@ H5P.QuestionSet = function (options, contentId, contentData) { showResultPage: true, noResultMessage: 'Finished', message: 'Your result:', - successGreeting: '', - successComment: '', - failGreeting: '', - failComment: '', + oldFeedback: { + successGreeting: '', + successComment: '', + failGreeting: '', + failComment: '' + }, overallFeedback: [], finishButtonText: 'Finish', solutionButtonText: 'Show solution', @@ -158,27 +160,27 @@ H5P.QuestionSet = function (options, contentId, contentData) { var randomizeQuestionOrdering = function (questions) { // Save the original order of the questions in a multidimensional array [[question0,0],[question1,1]... - var questionOrdering = questions.map(function(questionInstance, index) { return [questionInstance, index] }); + var questionOrdering = questions.map(function (questionInstance, index) { return [questionInstance, index]; }); // Shuffle the multidimensional array questionOrdering = H5P.shuffleArray(questionOrdering); // Retrieve question objects from the first index - var questions = []; + questions = []; for (var i = 0; i < questionOrdering.length; i++) { questions[i] = questionOrdering[i][0]; } // Retrieve the new shuffled order from the second index var newOrder = []; - for (var i = 0; i< questionOrdering.length; i++) { + for (var j = 0; j < questionOrdering.length; j++) { // Use a previous order if it exists - if(contentData.previousState && contentData.previousState.questionOrder) { - newOrder[i] = questionOrder[questionOrdering[i][1]]; + if (contentData.previousState && contentData.previousState.questionOrder) { + newOrder[j] = questionOrder[questionOrdering[j][1]]; } else { - newOrder[i] = questionOrdering[i][1]; + newOrder[j] = questionOrdering[j][1]; } } @@ -193,7 +195,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { if (params.poolSize > 0) { // If a previous pool exists, recreate it - if(contentData.previousState && contentData.previousState.poolOrder) { + if (contentData.previousState && contentData.previousState.poolOrder) { poolOrder = contentData.previousState.poolOrder; // Recreate the pool from the saved data @@ -247,7 +249,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { * @param {object} questions H5P content types to be created as instances * @return {array} Array of questions instances */ - var createQuestionInstancesFromQuestions = function(questions) { + var createQuestionInstancesFromQuestions = function (questions) { var result = []; // Create question instances from questions // Instantiate question instances @@ -312,8 +314,8 @@ H5P.QuestionSet = function (options, contentId, contentData) { var _updateButtons = function () { // Verify that current question is answered when backward nav is disabled if (params.disableBackwardsNavigation) { - if (questionInstances[currentQuestion].getAnswerGiven() - && questionInstances.length-1 !== currentQuestion) { + if (questionInstances[currentQuestion].getAnswerGiven() && + questionInstances.length-1 !== currentQuestion) { questionInstances[currentQuestion].showButton('next'); } else { @@ -418,11 +420,11 @@ H5P.QuestionSet = function (options, contentId, contentData) { var currentQuestion = params.questions[currentQuestionIndex]; - var hasAutoPlay = currentQuestion - && currentQuestion.params.media - && currentQuestion.params.media.params - && currentQuestion.params.media.params.playback - && currentQuestion.params.media.params.playback.autoplay; + var hasAutoPlay = currentQuestion && + currentQuestion.params.media && + currentQuestion.params.media.params && + currentQuestion.params.media.params.playback && + currentQuestion.params.media.params.playback.autoplay; if (hasAutoPlay && typeof questionInstances[currentQuestionIndex].play === 'function') { questionInstances[currentQuestionIndex].play(); @@ -524,7 +526,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { //Force the last page to be reRendered rendered = false; - if(params.poolSize > 0){ + if (params.poolSize > 0) { // Make new pool from params.questions // Randomize and get the results @@ -577,7 +579,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { var replaceQuestionsInDOM = function (questionInstances) { // Find all question containers and detach questions from them - $('.question-container', $myDom).each(function (){ + $('.question-container', $myDom).each(function () { $(this).children().detach(); }); @@ -592,19 +594,19 @@ H5P.QuestionSet = function (options, contentId, contentData) { question.attach($('.question-container:eq(' + i + ')', $myDom)); //Show buttons if necessary - if(questionInstances[questionInstances.length -1] === question - && question.hasButton('finish')) { + if (questionInstances[questionInstances.length -1] === question && + question.hasButton('finish')) { question.showButton('finish'); } - if(questionInstances[questionInstances.length -1] !== question - && question.hasButton('next')) { + if (questionInstances[questionInstances.length -1] !== question && + question.hasButton('next')) { question.showButton('next'); } - if(questionInstances[0] !== question - && question.hasButton('prev') - && !params.disableBackwardsNavigation) { + if (questionInstances[0] !== question && + question.hasButton('prev') && + !params.disableBackwardsNavigation) { question.showButton('prev'); } @@ -645,7 +647,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { * @param {number} dotIndex Index of dot * @param {boolean} isAnswered True if is answered, False if not answered */ - var toggleAnsweredDot = function(dotIndex, isAnswered) { + var toggleAnsweredDot = function (dotIndex, isAnswered) { var $el = $('.progress-dot:eq(' + dotIndex +')', $myDom); // Skip current button @@ -732,8 +734,8 @@ H5P.QuestionSet = function (options, contentId, contentData) { var eparams = { message: params.endGame.showResultPage ? params.endGame.message : params.endGame.noResultMessage, - comment: params.endGame.showResultPage ? (success ? params.endGame.successGreeting : params.endGame.failGreeting) : undefined, - resulttext: params.endGame.showResultPage ? (success ? params.endGame.successComment : params.endGame.failComment) : undefined, + comment: params.endGame.showResultPage ? (success ? params.endGame.oldFeedback.successGreeting : params.endGame.oldFeedback.failGreeting) : undefined, + resulttext: params.endGame.showResultPage ? (success ? params.endGame.oldFeedback.successComment : params.endGame.oldFeedback.failComment) : undefined, finishButtonText: params.endGame.finishButtonText, solutionButtonText: params.endGame.solutionButtonText, retryButtonText: params.endGame.retryButtonText @@ -873,7 +875,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { }); // Hide next button if it is the last question - if(questionInstances[questionInstances.length -1] === question) { + if (questionInstances[questionInstances.length -1] === question) { question.hideButton('next'); } @@ -1101,10 +1103,10 @@ H5P.QuestionSet = function (options, contentId, contentData) { return info; }; - this.getQuestions = function() { + this.getQuestions = function () { return questionInstances; }; - this.showSolutions = function() { + this.showSolutions = function () { renderSolutions = true; }; @@ -1162,7 +1164,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { /** * Add the question itself to the definition part of an xAPIEvent */ - var addQuestionToXAPI = function(xAPIEvent) { + var addQuestionToXAPI = function (xAPIEvent) { var definition = xAPIEvent.getVerifiedStatementValue(['object', 'definition']); $.extend(definition, getxAPIDefinition()); }; @@ -1173,8 +1175,8 @@ H5P.QuestionSet = function (options, contentId, contentData) { * @param {Object} metaContentType * @returns {array} */ - var getXAPIDataFromChildren = function(metaContentType) { - return metaContentType.getQuestions().map(function(question) { + var getXAPIDataFromChildren = function (metaContentType) { + return metaContentType.getQuestions().map(function (question) { return question.getXAPIData(); }); }; @@ -1185,7 +1187,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { * * @see contract at {@link https://h5p.org/documentation/developers/contracts#guides-header-6} */ - this.getXAPIData = function(){ + this.getXAPIData = function () { var xAPIEvent = this.createXAPIEventTemplate('answered'); addQuestionToXAPI(xAPIEvent); xAPIEvent.setScoredResult(this.getScore(), @@ -1197,7 +1199,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { return { statement: xAPIEvent.data.statement, children: getXAPIDataFromChildren(this) - } + }; }; }; diff --git a/language/.en.json b/language/.en.json index 242a8bf..5dbdf69 100644 --- a/language/.en.json +++ b/language/.en.json @@ -153,8 +153,7 @@ { "label": "Score Range" }, - { - }, + {}, { "label": "Feedback for defined score range", "placeholder": "Fill in the feedback" @@ -165,20 +164,25 @@ ] }, { - "label": "Quiz passed greeting", - "description": "This text will be displayed above the score if the user has successfully passed the quiz." - }, - { - "label": "Passed comment", - "description": "This comment will be displayed after the score if the user has successfully passed the quiz." - }, - { - "label": "Quiz failed title", - "description": "This text will be displayed above the score if the user has failed the quiz." - }, - { - "label": "Failed comment", - "description": "This comment will be displayed after the score if the user has failed the quiz." + "label": "Old Feedback", + "fields": [ + { + "label": "Quiz passed greeting", + "description": "This text will be displayed above the score if the user has successfully passed the quiz." + }, + { + "label": "Passed comment", + "description": "This comment will be displayed after the score if the user has successfully passed the quiz." + }, + { + "label": "Quiz failed title", + "description": "This text will be displayed above the score if the user has failed the quiz." + }, + { + "label": "Failed comment", + "description": "This comment will be displayed after the score if the user has failed the quiz." + } + ] }, { "label": "Solution button label", diff --git a/library.json b/library.json index 95fe57e..3177ecf 100644 --- a/library.json +++ b/library.json @@ -3,7 +3,7 @@ "description": "Put together a set of different questions that has to be solved. (Quiz)", "contentType": "question", "majorVersion": 1, - "minorVersion": 15, + "minorVersion": 13, "patchVersion": 0, "embedTypes": [ "iframe" diff --git a/semantics.json b/semantics.json index 33d59eb..9a8e860 100644 --- a/semantics.json +++ b/semantics.json @@ -340,66 +340,71 @@ ] }, { - "name": "successGreeting", - "type": "text", - "label": "Quiz passed greeting", + "name": "oldFeedback", + "type": "group", + "label": "Old Feedback", "importance": "low", - "optional": true, - "description": "This text will be displayed above the score if the user has successfully passed the quiz.", - "tags": [ - "strong", - "em" - ], - "deprecated": true - }, - { - "name": "successComment", - "type": "text", - "widget": "html", - "label": "Passed comment", - "importance": "low", - "optional": true, - "description": "This comment will be displayed after the score if the user has successfully passed the quiz.", - "tags": [ - "sub", - "sup", - "strong", - "em", - "a", - "p" - ], - "deprecated": true - }, - { - "name": "failGreeting", - "type": "text", - "label": "Quiz failed title", - "importance": "low", - "optional": true, - "description": "This text will be displayed above the score if the user has failed the quiz.", - "tags": [ - "strong", - "em" - ], - "deprecated": true - }, - { - "name": "failComment", - "type": "text", - "widget": "html", - "label": "Failed comment", - "importance": "low", - "optional": true, - "description": "This comment will be displayed after the score if the user has failed the quiz.", - "tags": [ - "sub", - "sup", - "strong", - "em", - "a", - "p" - ], - "deprecated": true + "deprecated": true, + "fields": [ + { + "name": "successGreeting", + "type": "text", + "label": "Quiz passed greeting", + "importance": "low", + "optional": true, + "description": "This text will be displayed above the score if the user has successfully passed the quiz.", + "tags": [ + "strong", + "em" + ] + }, + { + "name": "successComment", + "type": "text", + "widget": "html", + "label": "Passed comment", + "importance": "low", + "optional": true, + "description": "This comment will be displayed after the score if the user has successfully passed the quiz.", + "tags": [ + "sub", + "sup", + "strong", + "em", + "a", + "p" + ] + }, + { + "name": "failGreeting", + "type": "text", + "label": "Quiz failed title", + "importance": "low", + "optional": true, + "description": "This text will be displayed above the score if the user has failed the quiz.", + "tags": [ + "strong", + "em" + ] + }, + { + "name": "failComment", + "type": "text", + "widget": "html", + "label": "Failed comment", + "importance": "low", + "optional": true, + "description": "This comment will be displayed after the score if the user has failed the quiz.", + "tags": [ + "sub", + "sup", + "strong", + "em", + "a", + "p" + ] + } + ] }, { "name": "solutionButtonText", diff --git a/upgrades.js b/upgrades.js index bf86aea..7829f31 100644 --- a/upgrades.js +++ b/upgrades.js @@ -78,6 +78,26 @@ H5PUpgrades['H5P.QuestionSet'] = (function ($) { delete parameters.endGame.scoreString; } + // Group old feedback fields + if (parameters.endGame.successGreeting || + parameters.endGame.successComment || + parameters.endGame.failGreeting || + parameters.endGame.failComment) { + parameters.endGame.oldFeedback = {}; + if (parameters.endGame.successGreeting) { + parameters.endGame.oldFeedback.successGreeting = parameters.endGame.successGreeting; + } + if (parameters.endGame.successComment) { + parameters.endGame.oldFeedback.successComment = parameters.endGame.successComment; + } + if (parameters.endGame.failGreeting) { + parameters.endGame.oldFeedback.failGreeting = parameters.endGame.failGreeting; + } + if (parameters.endGame.failComment) { + parameters.endGame.oldFeedback.failComment = parameters.endGame.failComment; + } + } + finished(null, parameters); } } From c76d0a89c124dcdbccb01710da5a17f653341621 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Thu, 13 Jul 2017 16:07:56 +0200 Subject: [PATCH 21/28] Update description HFP-1174 --- semantics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantics.json b/semantics.json index 9a8e860..0cbdbfa 100644 --- a/semantics.json +++ b/semantics.json @@ -299,7 +299,7 @@ ], "importance": "high", "label": "Define custom feedback for any score range", - "description": "Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!\n\"@score\" will be replaced by calculated score, \"@total\" will be replaced by maximum possible score.", + "description": "Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!" "entity": "range", "min": 1, "defaultNum": 1, From 697720a06a2ffef86e817399a6d4fb6afac24a5d Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Thu, 13 Jul 2017 16:12:26 +0200 Subject: [PATCH 22/28] I messed up... --- semantics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantics.json b/semantics.json index 0cbdbfa..733e68e 100644 --- a/semantics.json +++ b/semantics.json @@ -299,7 +299,7 @@ ], "importance": "high", "label": "Define custom feedback for any score range", - "description": "Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!" + "description": "Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!", "entity": "range", "min": 1, "defaultNum": 1, From 109fe14a45640df352234f53e9bb07c56cd01872 Mon Sep 17 00:00:00 2001 From: otacke Date: Fri, 14 Jul 2017 14:40:30 +0200 Subject: [PATCH 23/28] add stub for Danish translation --- language/da.json | 251 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 language/da.json diff --git a/language/da.json b/language/da.json new file mode 100644 index 0000000..0b9c4f6 --- /dev/null +++ b/language/da.json @@ -0,0 +1,251 @@ +{ + "semantics": [ + { + "label": "Quiz introduction", + "fields": [ + { + "label": "Display introduction" + }, + { + "label": "Title", + "description": "This title will be displayed above the introduction text." + }, + { + "label": "Introduction text", + "description": "This text will be displayed before the quiz starts." + }, + { + "label": "Start button text", + "default": "Start Quiz" + }, + { + "label": "Background image", + "description": "An optional background image for the introduction." + } + ] + }, + { + "label": "Background image", + "description": "An optional background image for the Question set." + }, + { + "label": "Progress indicator", + "description": "Question set progress indicator style.", + "options": [ + { + "label": "Textual" + }, + { + "label": "Dots" + } + ], + "default": "dots" + }, + { + "label": "Pass percentage", + "description": "Percentage of Total score required for passing the quiz." + }, + { + "label": "Questions", + "widgets": [ + { + "label": "Default" + }, + { + "label": "Textual" + } + ], + "entity": "question", + "field": { + "label": "Question type", + "description": "Library for this question." + } + }, + { + "label": "Interface texts in quiz", + "fields": [ + { + "label": "Back button", + "default": "Forrige spørgsmål" + }, + { + "label": "Next button", + "default": "Næste spørgsmål" + }, + { + "label": "Finish button", + "default": "Færdig" + }, + { + "label": "Progress text", + "description": "Text used if textual progress is selected.", + "default": "Spørgsmål: nummer @current ud af @spørgsmål" + }, + { + "label": "Label for jumping to a certain question", + "description": "You must use the placeholder '%d' instead of the question number, and %total instead of total amount of questions.", + "default": "Spørgsmål %d ud af %total" + }, + { + "label": "Copyright dialog question label", + "default": "Spørgsmål" + }, + { + "label": "Readspeaker progress", + "description": "May use @current and @total question variables", + "default": "Spørgsmål @current ud af @total" + }, + { + "label": "Unanswered question text", + "default": "Ubesvaret" + }, + { + "label": "Answered question text", + "default": "Besvaret" + }, + { + "label": "Current question text", + "default": "Aktuel spørgsmål" + } + ] + }, + { + "label": "Disable backwards navigation", + "description": "This option will only allow you to move forward in Question Set" + }, + { + "label": "Randomize questions", + "description": "Enable to randomize the order of questions on display." + }, + { + "label": "Number of questions to be shown:", + "description": "Create a randomized batch of questions from the total." + }, + { + "label": "Quiz finished", + "fields": [ + { + "label": "Display results" + }, + { + "label": "Display solution button" + }, + { + "label": "No results message", + "description": "Text displayed on end page when \"Display results\" is disabled", + "default": "Finished" + }, + { + "label": "Feedback heading", + "default": "Your result:", + "description": "This heading will be displayed at the end of the quiz when the user has answered all questions." + }, + { + "label": "Overall Feedback", + "fields": [ + { + "widgets": [], + "label": "Define custom feedback for any score range", + "description": "Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!", + "entity": "range", + "field": { + "fields": [ + { + "label": "Score Range" + }, + {}, + { + "label": "Feedback for defined score range", + "placeholder": "Fill in the feedback" + } + ] + } + } + ] + }, + { + "label": "Old Feedback", + "fields": [ + { + "label": "Quiz passed greeting", + "description": "This text will be displayed above the score if the user has successfully passed the quiz." + }, + { + "label": "Passed comment", + "description": "This comment will be displayed after the score if the user has successfully passed the quiz." + }, + { + "label": "Quiz failed title", + "description": "This text will be displayed above the score if the user has failed the quiz." + }, + { + "label": "Failed comment", + "description": "This comment will be displayed after the score if the user has failed the quiz." + } + ] + }, + { + "label": "Solution button label", + "default": "Show solution", + "description": "Text for the solution button." + }, + { + "label": "Retry button label", + "default": "Retry", + "description": "Text for the retry button." + }, + { + "label": "Finish button text", + "default": "Finish" + }, + { + "label": "Display video before quiz results" + }, + { + "label": "Enable skip video button" + }, + { + "label": "Skip video button label", + "default": "Skip video" + }, + { + "label": "Passed video", + "description": "This video will be played if the user successfully passed the quiz." + }, + { + "label": "Fail video", + "description": "This video will be played if the user failes the quiz." + } + ] + }, + { + "label": "Settings for \"Show solution\" and \"Retry\" buttons", + "fields": [ + { + "label": "Override \"Show Solution\" button", + "description": "This option determines if the \"Show Solution\" button will be shown for all questions, disabled for all or configured for each question individually.", + "options": [ + { + "label": "Enabled" + }, + { + "label": "Disabled" + } + ] + }, + { + "label": "Override \"Retry\" button", + "description": "This option determines if the \"Retry\" button will be shown for all questions, disabled for all or configured for each question individually.", + "options": [ + { + "label": "Enabled" + }, + { + "label": "Disabled" + } + ] + } + ] + } + ] +} From 49fdaa0bb1a153309ee35735de78d8d5226f84ae Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Mon, 17 Jul 2017 10:09:56 +0200 Subject: [PATCH 24/28] Update da.json --- language/da.json | 200 ++++++++++++++++++++++++----------------------- 1 file changed, 102 insertions(+), 98 deletions(-) diff --git a/language/da.json b/language/da.json index 0b9c4f6..1a3765f 100644 --- a/language/da.json +++ b/language/da.json @@ -1,69 +1,69 @@ { - "semantics": [ + "semantics":[ { - "label": "Quiz introduction", - "fields": [ + "label":"Quiz introduction", + "fields":[ { - "label": "Display introduction" + "label":"Display introduction" }, { - "label": "Title", - "description": "This title will be displayed above the introduction text." + "label":"Title", + "description":"This title will be displayed above the introduction text." }, { - "label": "Introduction text", - "description": "This text will be displayed before the quiz starts." + "label":"Introduction text", + "description":"This text will be displayed before the quiz starts." }, { - "label": "Start button text", - "default": "Start Quiz" + "label":"Start button text", + "default":"Start Quiz" }, { - "label": "Background image", - "description": "An optional background image for the introduction." + "label":"Background image", + "description":"An optional background image for the introduction." } ] }, { - "label": "Background image", - "description": "An optional background image for the Question set." + "label":"Background image", + "description":"An optional background image for the Question set." }, { - "label": "Progress indicator", - "description": "Question set progress indicator style.", - "options": [ + "label":"Progress indicator", + "description":"Question set progress indicator style.", + "options":[ { - "label": "Textual" + "label":"Textual" }, { - "label": "Dots" + "label":"Dots" } ], - "default": "dots" + "default":"dots" }, { - "label": "Pass percentage", - "description": "Percentage of Total score required for passing the quiz." + "label":"Pass percentage", + "description":"Percentage of Total score required for passing the quiz." }, { - "label": "Questions", - "widgets": [ + "label":"Questions", + "widgets":[ { - "label": "Default" + "label":"Default" }, { - "label": "Textual" + "label":"Textual" } ], - "entity": "question", - "field": { - "label": "Question type", - "description": "Library for this question." + "entity":"question", + "field":{ + "label":"Question type", + "description":"Library for this question." } }, { - "label": "Interface texts in quiz", - "fields": [ + "label":"Interface texts in quiz", + "fields":[ { "label": "Back button", "default": "Forrige spørgsmål" @@ -110,53 +110,57 @@ ] }, { - "label": "Disable backwards navigation", - "description": "This option will only allow you to move forward in Question Set" + "label":"Disable backwards navigation", + "description":"This option will only allow you to move forward in Question Set" }, { - "label": "Randomize questions", - "description": "Enable to randomize the order of questions on display." + "label":"Randomize questions", + "description":"Enable to randomize the order of questions on display." }, { - "label": "Number of questions to be shown:", - "description": "Create a randomized batch of questions from the total." + "label":"Number of questions to be shown:", + "description":"Create a randomized batch of questions from the total." }, { - "label": "Quiz finished", - "fields": [ + "label":"Quiz finished", + "fields":[ { - "label": "Display results" + "label":"Display results" }, { - "label": "Display solution button" + "label":"Display solution button" }, { - "label": "No results message", - "description": "Text displayed on end page when \"Display results\" is disabled", - "default": "Finished" + "label":"No results message", + "description":"Text displayed on end page when \"Display results\" is disabled", + "default":"Finished" }, { - "label": "Feedback heading", - "default": "Your result:", - "description": "This heading will be displayed at the end of the quiz when the user has answered all questions." + "label":"Feedback heading", + "default":"Your result:", + "description":"This heading will be displayed at the end of the quiz when the user has answered all questions." }, { - "label": "Overall Feedback", - "fields": [ + "label":"Overall Feedback", + "fields":[ { - "widgets": [], - "label": "Define custom feedback for any score range", - "description": "Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!", - "entity": "range", - "field": { - "fields": [ + "widgets":[ + + ], + "label":"Define custom feedback for any score range", + "description":"Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!", + "entity":"range", + "field":{ + "fields":[ { - "label": "Score Range" + "label":"Score Range" }, - {}, { - "label": "Feedback for defined score range", - "placeholder": "Fill in the feedback" + + }, + { + "label":"Feedback for defined score range", + "placeholder":"Fill in the feedback" } ] } @@ -164,84 +168,84 @@ ] }, { - "label": "Old Feedback", - "fields": [ + "label":"Old Feedback", + "fields":[ { - "label": "Quiz passed greeting", - "description": "This text will be displayed above the score if the user has successfully passed the quiz." + "label":"Quiz passed greeting", + "description":"This text will be displayed above the score if the user has successfully passed the quiz." }, { - "label": "Passed comment", - "description": "This comment will be displayed after the score if the user has successfully passed the quiz." + "label":"Passed comment", + "description":"This comment will be displayed after the score if the user has successfully passed the quiz." }, { - "label": "Quiz failed title", - "description": "This text will be displayed above the score if the user has failed the quiz." + "label":"Quiz failed title", + "description":"This text will be displayed above the score if the user has failed the quiz." }, { - "label": "Failed comment", - "description": "This comment will be displayed after the score if the user has failed the quiz." + "label":"Failed comment", + "description":"This comment will be displayed after the score if the user has failed the quiz." } ] }, { - "label": "Solution button label", - "default": "Show solution", - "description": "Text for the solution button." + "label":"Solution button label", + "default":"Show solution", + "description":"Text for the solution button." }, { - "label": "Retry button label", - "default": "Retry", - "description": "Text for the retry button." + "label":"Retry button label", + "default":"Retry", + "description":"Text for the retry button." }, { - "label": "Finish button text", - "default": "Finish" + "label":"Finish button text", + "default":"Finish" }, { - "label": "Display video before quiz results" + "label":"Display video before quiz results" }, { - "label": "Enable skip video button" + "label":"Enable skip video button" }, { - "label": "Skip video button label", - "default": "Skip video" + "label":"Skip video button label", + "default":"Skip video" }, { - "label": "Passed video", - "description": "This video will be played if the user successfully passed the quiz." + "label":"Passed video", + "description":"This video will be played if the user successfully passed the quiz." }, { - "label": "Fail video", - "description": "This video will be played if the user failes the quiz." + "label":"Fail video", + "description":"This video will be played if the user failes the quiz." } ] }, { - "label": "Settings for \"Show solution\" and \"Retry\" buttons", - "fields": [ + "label":"Settings for \"Show solution\" and \"Retry\" buttons", + "fields":[ { - "label": "Override \"Show Solution\" button", - "description": "This option determines if the \"Show Solution\" button will be shown for all questions, disabled for all or configured for each question individually.", - "options": [ + "label":"Override \"Show Solution\" button", + "description":"This option determines if the \"Show Solution\" button will be shown for all questions, disabled for all or configured for each question individually.", + "options":[ { - "label": "Enabled" + "label":"Enabled" }, { - "label": "Disabled" + "label":"Disabled" } ] }, { - "label": "Override \"Retry\" button", - "description": "This option determines if the \"Retry\" button will be shown for all questions, disabled for all or configured for each question individually.", - "options": [ + "label":"Override \"Retry\" button", + "description":"This option determines if the \"Retry\" button will be shown for all questions, disabled for all or configured for each question individually.", + "options":[ { - "label": "Enabled" + "label":"Enabled" }, { - "label": "Disabled" + "label":"Disabled" } ] } From ae79cd56e8d213bcb7da8ee9cba6b7cf6cd53269 Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Mon, 17 Jul 2017 10:20:39 +0200 Subject: [PATCH 25/28] Update da.json --- language/da.json | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/language/da.json b/language/da.json index 1a3765f..c629729 100644 --- a/language/da.json +++ b/language/da.json @@ -65,47 +65,47 @@ "label":"Interface texts in quiz", "fields":[ { - "label": "Back button", - "default": "Forrige spørgsmål" + "label":"Back button", + "default":"Forrige spørgsmål" }, { - "label": "Next button", - "default": "Næste spørgsmål" + "label":"Next button", + "default":"Næste spørgsmål" }, { - "label": "Finish button", - "default": "Færdig" + "label":"Finish button", + "default":"Færdig" }, { - "label": "Progress text", - "description": "Text used if textual progress is selected.", - "default": "Spørgsmål: nummer @current ud af @spørgsmål" + "label":"Progress text", + "description":"Text used if textual progress is selected.", + "default":"Spørgsmål:nummer @current ud af @spørgsmål" }, { - "label": "Label for jumping to a certain question", - "description": "You must use the placeholder '%d' instead of the question number, and %total instead of total amount of questions.", - "default": "Spørgsmål %d ud af %total" + "label":"Label for jumping to a certain question", + "description":"You must use the placeholder '%d' instead of the question number, and %total instead of total amount of questions.", + "default":"Spørgsmål %d ud af %total" }, { - "label": "Copyright dialog question label", - "default": "Spørgsmål" + "label":"Copyright dialog question label", + "default":"Spørgsmål" }, { - "label": "Readspeaker progress", - "description": "May use @current and @total question variables", - "default": "Spørgsmål @current ud af @total" + "label":"Readspeaker progress", + "description":"May use @current and @total question variables", + "default":"Spørgsmål @current ud af @total" }, { - "label": "Unanswered question text", - "default": "Ubesvaret" + "label":"Unanswered question text", + "default":"Ubesvaret" }, { - "label": "Answered question text", - "default": "Besvaret" + "label":"Answered question text", + "default":"Besvaret" }, { - "label": "Current question text", - "default": "Aktuel spørgsmål" + "label":"Current question text", + "default":"Aktuel spørgsmål" } ] }, From aaedd545f7916eefc429d0d8b335f43ade6f790d Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Tue, 18 Jul 2017 10:08:10 +0200 Subject: [PATCH 26/28] Fix missing default --- js/questionset.js | 1 + library.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index 0fdd085..0869070 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -119,6 +119,7 @@ H5P.QuestionSet = function (options, contentId, contentData) { showAnimations: false, skipButtonText: 'Skip video' }, + override: {}, disableBackwardsNavigation: false }; diff --git a/library.json b/library.json index dcb9339..780b83b 100644 --- a/library.json +++ b/library.json @@ -4,7 +4,7 @@ "contentType": "question", "majorVersion": 1, "minorVersion": 12, - "patchVersion": 1, + "patchVersion": 2, "embedTypes": [ "iframe" ], @@ -61,4 +61,4 @@ "minorVersion": 2 } ] -} \ No newline at end of file +} From 5699cfc690a2e688f7441e210a48624347c96d20 Mon Sep 17 00:00:00 2001 From: thomasmars Date: Mon, 24 Jul 2017 13:57:06 +0200 Subject: [PATCH 27/28] Fixes duplicate dependency declaration from broken merge. --- library.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/library.json b/library.json index 3177ecf..0c46467 100644 --- a/library.json +++ b/library.json @@ -64,11 +64,6 @@ "machineName": "H5PEditor.QuestionSetTextualEditor", "majorVersion": 1, "minorVersion": 2 - }, - { - "machineName": "H5PEditor.RangeList", - "majorVersion": 1, - "minorVersion": 0 } ] } From cdba8edd08d16ca727230e3ce8cd759dd64ef562 Mon Sep 17 00:00:00 2001 From: otacke Date: Sat, 29 Jul 2017 11:14:45 +0200 Subject: [PATCH 28/28] fix typo --- language/de.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/de.json b/language/de.json index dca83c1..8c8542e 100644 --- a/language/de.json +++ b/language/de.json @@ -154,7 +154,7 @@ }, { "label": "Kopfzeile für nicht bestandenes Quiz", - "default": "Diese Mal hast du nicht bestanden.", + "default": "Dieses Mal hast du nicht bestanden.", "description": "Dieser Text wird oberhalb der Punkte angezeigt, wenn der Nutzer das Quiz nicht bestanden hat." }, {