From 2c26b7692da20c3a8dde08149cc71a57be308baf Mon Sep 17 00:00:00 2001 From: Magnus Vik Magnussen Date: Thu, 31 Oct 2013 13:39:51 +0100 Subject: [PATCH] HFJ-1 Design update to questions set completed. No changes made to dragNdrop so far. --- css/img/mark-fail.png | Bin 3520 -> 0 bytes css/img/mark-pass.png | Bin 3220 -> 0 bytes css/questionset.css | 173 +++++++++++++++++++++++++++++++----------- fonts/icomoon.eot | Bin 0 -> 2364 bytes fonts/icomoon.svg | 14 ++++ fonts/icomoon.ttf | Bin 0 -> 2200 bytes fonts/icomoon.woff | Bin 0 -> 2276 bytes js/questionset.js | 26 +++---- language/nb.json | 5 ++ language/nn.json | 7 +- semantics.json | 19 ++++- 11 files changed, 182 insertions(+), 62 deletions(-) delete mode 100644 css/img/mark-fail.png delete mode 100644 css/img/mark-pass.png create mode 100644 fonts/icomoon.eot create mode 100644 fonts/icomoon.svg create mode 100644 fonts/icomoon.ttf create mode 100644 fonts/icomoon.woff diff --git a/css/img/mark-fail.png b/css/img/mark-fail.png deleted file mode 100644 index cbd3936b1928c0ed73326d13e5253ed980926409..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3520 zcmV;x4L|aUP)HgRT-ai=5gP5@4frz zZoA#P+istvJcli+<1w*>N&-9vHMnRl66z_*}AmlfxD5-~D$0 za$<#j2|124N6%Zj^1T|F+k<@4luM* zhFlXS9^VmTIgz0ivf~6)0JSs_jK^hVt>a?RA2zpMT@5G)80WpHOGyjvTaGPSflC$z zgACmsufJ9%B<%b_i{`tb$V7^|jRzQaYM8b-r9jaN#DI8!Qh=e`+&>Ce=ypZ&oAdgL zLowxQgoc*5kqt_A-B8@gFSah&329-+1-o1kP}3A>N1}c;h(XBfN0^r&KP5d}r4$&y6U?(M^S49N ze#SA^83QVMEDwaXmix}=H%pO7#DvKjKA+DBg+j(t zV?%F&5B5petGG-6gX$!%DAy~B5`YB|<^=QD?3Np$>bTSE<_717wwyTfb;~oD1C-|> zdm`Z+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%+l$Ov{4}(4HR}*dL6Ftvdvnk%BYT``KZ3QPQ zf&r)?$V32ACT5qNu>Z5{Oz*){<>Jh@tI3j2cvi6?4snE|u-c>7iBy8o1%fG{o&_Bx z6Wg{@p{`5+8mq0f1Azdks;a_F>kJEVS87NM_8jT|0|e=G!tB|-J^jS;jnSWh-WsNQ z;--Dabpcj_herTZmrz#G#}hZCX#3T&RQ`oZX1{M}UG-GW%@7!N4s;B)-93EYitVTg zE$RUkIn+3@)+Y z9)Pm%KAGIvdz`)NxvcZA0OlSeG%0jLz6`oUw)}P13uykj%p$v{2bX^ZF=&HvNIG=9 zRP;kKpW9|!OS}8*2hV1n%jx{*QyN%x%R_eFD)d?oNo26z9U*wv)2{}jfv zCMd`t>5QwZ7FGsaQ08-6%(fXAvZcXrpZVWM{LqPgoRJay$YD&71Gy~}^)wXtG(3oodrU<8 zwu^tvrFokTaE`&l+uU?uZEh7Hnb#3`otaKs*^a#(k?Kx?o93YNOjHx%(GST>T_eAy z_|Cw21k_<{s`s6+&$PZLJ!@N51|QyHIk5ab597C7zw2@9;%#_8fXsrM=3r26 zjpc3Cs8{QX;}ahU%qc7IP^hfl_9;8qxu0%z0PL(|relWh*gFsB7=*Yf?TXX6U&5>< z17^VR&nhb`^G}lbgh3X^CrpxaprBJ$z-^PLCOn{iaEJU>Unl#}1c02KabVD#V`ez! zozGbrq8K$V!vH@8fI7N8#w98GP0n~hii51g^{ac(%KUZm z^#0&|#)(KLCYrjsItx0E=m?D>VFqf_bo#6#z%=u0?KJ{4%!R%iQ6-wVu+DgTRuh0_Sc27hnL^*dMtuGOzLg0000 .h5p-question { - margin: 1em 0.5em 0; - padding: 0.5em 0.75em; - box-shadow: 0 0 0.5em #e3e3e3; - border-radius: 0.5em; + text-align: left; + padding: 1em 0 0.2em; + margin: 0 0.5em 0.7em; background: rgba(255, 255, 255, 0.9); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#e6FFFFFF,endColorstr=#e6FFFFFF); zoom: 1; @@ -25,32 +42,22 @@ } .progress-dot { display: inline-block; - width: 0.75em; - height: 0.75em; + width: 0.6em; + height: 0.6em; border-radius: 50%; margin: 0 0.25em; cursor: pointer; background: #fff; - border: 0.0625em solid #c7c7c7; + background: #cecece; } .progress-dot:hover { box-shadow: 0 0 0.5em #c7c7c7; } .progress-dot.answered { - border: 0.0625em solid #fff; background: #bccade; } .progress-dot.current { - width: 1em; - height: 1em; - border: 0.0625em solid #fff; - margin-bottom: -0.125em; background: #267ec9; - background-image: -webkit-linear-gradient(top, #3999ea, #267ec9); - background-image: -moz-linear-gradient(top, #3999ea, #267ec9); - background-image: -o-linear-gradient(top, #3999ea, #267ec9); - background-image: -ms-linear-gradient(top, #3999ea, #267ec9); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3999ea', endColorstr='#267ec9',GradientType=0); } .intro-page .title { font-size: 2em; @@ -72,40 +79,75 @@ } .qs-footer .button, .qs-startbutton, .qs-finishbutton, .questionset-results .button, .video-container > .button { - display: block; - line-height: 1.25em; - padding: 0.25em 1em; - border-radius: 0.75em; + display: inline-block; + padding: 0.2em 1em; + border: 0.2em solid #fff; + border-radius: 0.4em; + margin: 0 0.5em 1em; cursor: pointer; color: #fff; - box-shadow: 0 0 0.5em #aebdc9; - margin: 0.5em; + box-shadow: 0 0 0.5em #999; - background: #267ec9; - background-image: -webkit-linear-gradient(top, #3999ea, #267ec9); - background-image: -moz-linear-gradient(top, #3999ea, #267ec9); - background-image: -o-linear-gradient(top, #3999ea, #267ec9); - background-image: -ms-linear-gradient(top, #3999ea, #267ec9); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3999ea', endColorstr='#267ec9',GradientType=0); + background: rgb(100,152,254); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(100,152,254,1) 0%, rgba(4,104,206,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(100,152,254,1)), color-stop(100%,rgba(4,104,206,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(100,152,254,1) 0%,rgba(4,104,206,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(100,152,254,1) 0%,rgba(4,104,206,1) 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, rgba(100,152,254,1) 0%,rgba(4,104,206,1) 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6498fe', endColorstr='#0468ce',GradientType=0 ); /* IE6-9 */ } .qs-footer .button:hover, .qs-startbutton:hover, .questionset-results .button:hover, .video-container > .button:hover { text-decoration: none; - color: #fff; - box-shadow: 0 0 0.5em #267ec9; + box-shadow: 0 0 0.5em #999; + + background: rgb(4,104,206); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(4,104,206,1) 0%, rgba(100,152,254,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(4,104,206,1)), color-stop(100%,rgba(100,152,254,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(4,104,206,1) 0%,rgba(100,152,254,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(4,104,206,1) 0%,rgba(100,152,254,1) 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, rgba(4,104,206,1) 0%,rgba(100,152,254,1) 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0468ce', endColorstr='#6498fe',GradientType=0 ); /* IE6-9 */ } .qs-startbutton { display: inline-block; font-size: 2.5em; } -.qs-footer > .prev, .qs-solutionbutton { +.qs-footer > .prev { float: left; } + +.qs-footer > .qs-solutionbutton { + float: none; +} + .qs-footer > .next, .qs-footer > .finish, .qs-finishbutton { float: right; } + +.qs-footer a.next.button:after { + font-family: FontAwesome; + content: " \f054"; +} + +.qs-footer a.prev.button:before { + font-family: FontAwesome; + content: "\f053 "; +} + .questionset-results .qs-finishbutton { display: none; } + +.qs-footer a.finish.button:before { + font-family: FontAwesome; + content: "\f00c "; +} + +.questionset-results a.button.qs-solutionbutton:before { + font-family: FontAwesome; + content: "\f06e "; +} + .video-container { position: relative; } @@ -127,40 +169,85 @@ text-align: center; background: rgba(255, 255, 255, 0.9); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#E6FFFFFF,endColorstr=#E6FFFFFF); + padding: 0.625em; } .questionset-results .greeting { - margin: 1em; + text-align: left; + border-bottom: 0.1em solid #ddd; + width: 100%; } .questionset-results .score { - font-size: 1.5em; - margin: 1em; + margin: 0; + display: block; + margin-bottom: 2em; } .questionset-results .resulttext { text-align: left; font-size: 1.25em; line-height: 1.25em; - margin: 1em 3em; - padding-left: 3em; - min-height: 3em; + margin: 1em 0em; background-repeat: no-repeat; background-position: left center; } -.questionset-results .resulttext.fail { - background-image: url(img/mark-fail.png); -} .questionset-results .resulttext.fail em { font-style: normal; color: #b9272d; } -.questionset-results .resulttext.success { - background-image: url(img/mark-pass.png); +.questionset-results .score.success .emoticon:before { + font-family: IcoMoon; + font-size: 5em; + content: "\e606"; + top: 0.5em; + position: relative; + float: left; } + +.questionset-results .score.fail .emoticon:before { + font-family: IcoMoon; + font-size: 5em; + content: "\e607"; + top: 0.5em; + position: relative; + float: left; +} + +.questionset-results .resulttext.success, +.resulttext.almost, +.resulttext.fail +{ + display: block; + background: #eee; + padding: 1em; + border-radius: 1em; + margin-left: 6.5em; + position: relative; + font-size: 1em; +} + +.questionset-results .resulttext.success:before, +.resulttext.fail:before +{ + font-family: IcoMoon; + content: ""; + font-size: 5em; + position: absolute; + left: -15px; + top: 36px; + height: 0; + width: 0; + border-top: 15px solid transparent; + border-bottom: 15px solid transparent; + border-right: 15px solid #eee; + display: inline-block; +} + .questionset-results .resulttext.success em { font-style: normal; color: #6aa81b; + text-align: left; } \ No newline at end of file diff --git a/fonts/icomoon.eot b/fonts/icomoon.eot new file mode 100644 index 0000000000000000000000000000000000000000..d8cdc1a706bfa01a6aa79621094ce23f38be7a5a GIT binary patch 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 new file mode 100644 index 0000000000000000000000000000000000000000..9649f7e4215f6b46e79e2406bf2fbfb5cee35cce GIT binary patch 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( literal 0 HcmV?d00001 diff --git a/js/questionset.js b/js/questionset.js index a3b8d41..72db963 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -69,8 +69,10 @@ H5P.QuestionSet = function (options, contentId) { var resulttemplate = '
' + '
<%= greeting %>
' + - '
<%= score %>
' + - '
<%= resulttext %>
' + + '
' + + '
' + + '

<%= comment %>

<%= score %>
<%= resulttext %>
' + + '
' + ' ' + '
'; @@ -95,18 +97,18 @@ H5P.QuestionSet = function (options, contentId) { }, endGame: { showResultPage: true, + greeting: '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: '@score/@total', + scoreString: 'You got @score of @total questions correct.', finishButtonText: 'Finish', solutionButtonText: 'Show solution', showAnimations: false, successVideo: undefined, failVideo: undefined - }, - postUserStatistics: (H5P.postUserStatistics === true) + } }; var template = new EJS({text: texttemplate}); @@ -128,10 +130,6 @@ H5P.QuestionSet = function (options, contentId) { // TODO: Render on init, inject in template. var libraryObject = H5P.libraryFromString(question.library); - $.extend(question.params, { - displaySolutionsButton: false, - postUserStatistics: false - }); var tmp = new (H5P.classFromName(libraryObject.machineName))(question.params, contentId); questionInstances.push(tmp); } @@ -172,7 +170,7 @@ H5P.QuestionSet = function (options, contentId) { $('.question-container', $myDom).hide().eq(questionNumber).show(); // Trigger resize on question in case the size of the QS has changed. - if (questionInstances[questionNumber].resize !== undefined) { + if (questionInstances[questionNumber].resize) { questionInstances[questionNumber].resize(); } @@ -222,17 +220,14 @@ H5P.QuestionSet = function (options, contentId) { passed: success }; var displayResults = function () { - if (params.postUserStatistics === true) { - H5P.setFinished(contentId, getScore(), totalScore()); - } - if (!params.endGame.showResultPage) { $(returnObject).trigger('h5pQuestionSetFinished', eventData); return; } var eparams = { - greeting: (success ? params.endGame.successGreeting : params.endGame.failGreeting), + greeting: params.endGame.greeting, + comment: (success ? params.endGame.successGreeting : params.endGame.failGreeting), score: scoreString, scoreclass: (success ? 'success' : 'fail'), resulttext: (success ? params.endGame.successComment : params.endGame.failComment), @@ -311,6 +306,7 @@ H5P.QuestionSet = function (options, contentId) { var question = questionInstances[i]; question.attach($('.question-container:eq(' + i + ')', $myDom)); + question.$solutionButton.hide(); $(question).on('h5pQuestionAnswered', function () { $('.progress-dot:eq(' + currentQuestion +')', $myDom).removeClass('unanswered').addClass('answered'); _updateButtons(); diff --git a/language/nb.json b/language/nb.json index 32d1f28..4e496eb 100644 --- a/language/nb.json +++ b/language/nb.json @@ -81,6 +81,11 @@ { "label": "Vis resultater" }, + { + "label": "Overskrift over tilbakemeldinger", + "default": "Ditt resultat:", + "description": "Denne overskriften vises over tilbakemeldingene på slutten av spørsmålssettet." + }, { "label": "Tittel ved bestått", "default": "Gratulerer!", diff --git a/language/nn.json b/language/nn.json index b64f8b8..fe5d97f 100644 --- a/language/nn.json +++ b/language/nn.json @@ -79,7 +79,12 @@ "label": "Spørsmålssett avslutning", "fields": [ { - "label": "Vis resultater" + "label": "Vis resultat" + }, + { + "label": "Overskrift over tilbakemeldingar", + "default": "Ditt resultat:", + "description": "Denne overskriften vises over tilbakemeldingane på slutten av spørsmålssettet." }, { "label": "Tittel ved bestått", diff --git a/semantics.json b/semantics.json index d008917..83df6d9 100644 --- a/semantics.json +++ b/semantics.json @@ -37,6 +37,7 @@ "name": "questions", "label": "Questions", "type": "list", + "widget": "verticalTabs", "min": 1, "entity": "question", "field": { @@ -147,14 +148,26 @@ "label": "Display results", "default": true }, + { + "name": "message", + "type": "text", + "label": "Feedback heading", + "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", + "em" + ] + }, { "name": "successGreeting", "type": "text", - "label": "Quiz passed title", + "label": "Quiz passed greeting", "placeholder": "Congratulations!", "default": "Congratulations!", "optional": true, - "description": "This title will be displayed above results if the user has successfully passed the quiz.", + "description": "This text will be displayed above the score if the user has successfully passed the quiz.", "tags": [ "strong", "em" @@ -182,7 +195,7 @@ "label": "Quiz failed title", "default": "Oh, no!", "optional": true, - "description": "This title will be displayed above the results if the user has failed the quiz.", + "description": "This text will be displayed above the score if the user has failed the quiz.", "tags": [ "strong", "em"