Merge branch 'master' of github.com:h5p/h5p-question-set into HFP-574-remove-override-settings
commit
df11efd681
|
@ -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 {
|
.questionset-results h2 {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
Binary file not shown.
|
@ -1,14 +0,0 @@
|
||||||
<?xml version="1.0" standalone="no"?>
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<metadata>Generated by IcoMoon</metadata>
|
|
||||||
<defs>
|
|
||||||
<font id="icomoon" horiz-adv-x="1024">
|
|
||||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
|
||||||
<missing-glyph horiz-adv-x="1024" />
|
|
||||||
<glyph unicode=" " d="" horiz-adv-x="512" />
|
|
||||||
<glyph unicode="" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM256 640c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64-35.346 0-64 28.654-64 64zM640 640c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64-35.346 0-64 28.654-64 64zM704.098 332.74l82.328-49.396c-55.962-93.070-157.916-155.344-274.426-155.344s-218.464 62.274-274.426 155.344l82.328 49.396c39.174-65.148 110.542-108.74 192.098-108.74s152.924 43.592 192.098 108.74z" />
|
|
||||||
<glyph unicode="" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM745.74 358.38l22.488-76.776-437.008-128.002-22.488 76.776zM256 640c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64-35.346 0-64 28.654-64 64zM640 640c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64-35.346 0-64 28.654-64 64z" />
|
|
||||||
<glyph unicode="" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM192 448v-64c0-140.8 115.2-256 256-256h128c140.8 0 256 115.2 256 256v64h-640zM384 203.012c-26.538 9.458-50.924 24.822-71.544 45.446-36.406 36.402-56.456 84.54-56.456 135.542h128v-180.988zM576 192h-128v192h128v-192zM711.544 248.458c-20.624-20.624-45.010-35.988-71.544-45.446v180.988h128c0-51.002-20.048-99.14-56.456-135.542zM225.352 576c0.002 0 0 0 0 0 9.768 0 18.108 7.056 19.724 16.69 6.158 36.684 37.668 63.31 74.924 63.31s68.766-26.626 74.924-63.31c1.616-9.632 9.956-16.69 19.722-16.69 9.768 0 18.108 7.056 19.724 16.688 1.082 6.436 1.628 12.934 1.628 19.312 0 63.962-52.038 116-116 116s-116-52.038-116-116c0-6.378 0.548-12.876 1.628-19.312 1.62-9.632 9.96-16.688 19.726-16.688zM609.352 576c0.002 0 0 0 0 0 9.77 0 18.112 7.056 19.724 16.69 6.158 36.684 37.668 63.31 74.924 63.31s68.766-26.626 74.924-63.31c1.616-9.632 9.958-16.69 19.722-16.69s18.108 7.056 19.722 16.688c1.082 6.436 1.628 12.934 1.628 19.312 0 63.962-52.038 116-116 116s-116-52.038-116-116c0-6.378 0.544-12.876 1.626-19.312 1.624-9.632 9.964-16.688 19.73-16.688z" />
|
|
||||||
<glyph unicode="" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM384 256c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128-70.692 0-128 57.308-128 128zM640 608c0 53.019 28.654 96 64 96s64-42.981 64-96c0-53.019-28.654-96-64-96-35.346 0-64 42.981-64 96zM256 608c0 53.019 28.654 96 64 96s64-42.981 64-96c0-53.019-28.654-96-64-96-35.346 0-64 42.981-64 96z" />
|
|
||||||
</font></defs></svg>
|
|
Before Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
Binary file not shown.
|
@ -61,6 +61,10 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
||||||
' </div>' +
|
' </div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
|
var solutionButtonTemplate = options.endGame.showSolutionButton ?
|
||||||
|
' <button type="button" class="h5p-joubelui-button h5p-button qs-solutionbutton"><%= solutionButtonText %></button>':
|
||||||
|
'';
|
||||||
|
|
||||||
var resulttemplate =
|
var resulttemplate =
|
||||||
'<div class="questionset-results">' +
|
'<div class="questionset-results">' +
|
||||||
' <div class="greeting"><%= message %></div>' +
|
' <div class="greeting"><%= message %></div>' +
|
||||||
|
@ -76,7 +80,7 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
||||||
' <% } %>' +
|
' <% } %>' +
|
||||||
' <div class="buttons">' +
|
' <div class="buttons">' +
|
||||||
' <button type="button" class="h5p-joubelui-button h5p-button qs-finishbutton"><%= finishButtonText %></button>' +
|
' <button type="button" class="h5p-joubelui-button h5p-button qs-finishbutton"><%= finishButtonText %></button>' +
|
||||||
' <button type="button" class="h5p-joubelui-button h5p-button qs-solutionbutton"><%= solutionButtonText %></button>' +
|
solutionButtonTemplate +
|
||||||
' <button type="button" class="h5p-joubelui-button h5p-button qs-retrybutton"><%= retryButtonText %></button>' +
|
' <button type="button" class="h5p-joubelui-button h5p-button qs-retrybutton"><%= retryButtonText %></button>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
@ -350,6 +354,8 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
||||||
|
|
||||||
currentQuestion = questionNumber;
|
currentQuestion = questionNumber;
|
||||||
|
|
||||||
|
handleAutoPlay(currentQuestion);
|
||||||
|
|
||||||
// Hide all questions
|
// Hide all questions
|
||||||
$('.question-container', $myDom).hide().eq(questionNumber).show();
|
$('.question-container', $myDom).hide().eq(questionNumber).show();
|
||||||
|
|
||||||
|
@ -400,6 +406,21 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
||||||
return currentQuestion;
|
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.
|
* Show solutions for subcontent, and hide subcontent buttons.
|
||||||
* Used for contracts with integrated content.
|
* Used for contracts with integrated content.
|
||||||
|
|
|
@ -121,6 +121,9 @@
|
||||||
{
|
{
|
||||||
"label": "عرض النتائج"
|
"label": "عرض النتائج"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Display solution button"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "No results message",
|
"label": "No results message",
|
||||||
"description": "Text displayed on end page when \"Display results\" is disabled",
|
"description": "Text displayed on end page when \"Display results\" is disabled",
|
||||||
|
|
|
@ -126,6 +126,9 @@
|
||||||
{
|
{
|
||||||
"label": "Afficher les résultats"
|
"label": "Afficher les résultats"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Display solution button"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Message si pas de résultats",
|
"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.",
|
"description": "Texte affiché sur la page finale si l'option \"Afficher les résultats\" est désactivée.",
|
||||||
|
|
|
@ -121,6 +121,9 @@
|
||||||
{
|
{
|
||||||
"label": "Visualizza risultati"
|
"label": "Visualizza risultati"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Display solution button"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "No results message",
|
"label": "No results message",
|
||||||
"description": "Text displayed on end page when \"Display results\" is disabled",
|
"description": "Text displayed on end page when \"Display results\" is disabled",
|
||||||
|
|
|
@ -126,6 +126,9 @@
|
||||||
{
|
{
|
||||||
"label": "Vis resultater"
|
"label": "Vis resultater"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Vis resultatknapp"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Melding når resultater ikke vises",
|
"label": "Melding når resultater ikke vises",
|
||||||
"description": "Teksten vises på avslutnings-siden når resultater ikke vises",
|
"description": "Teksten vises på avslutnings-siden når resultater ikke vises",
|
||||||
|
|
|
@ -126,6 +126,9 @@
|
||||||
{
|
{
|
||||||
"label": "Vis resultat"
|
"label": "Vis resultat"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Vis resultatknapp"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Melding når resultater ikke vises",
|
"label": "Melding når resultater ikke vises",
|
||||||
"description": "Teksten vises på avslutnings-siden når resultater ikke vises",
|
"description": "Teksten vises på avslutnings-siden når resultater ikke vises",
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"description": "Put together a set of different questions that has to be solved. (Quiz)",
|
"description": "Put together a set of different questions that has to be solved. (Quiz)",
|
||||||
"contentType": "question",
|
"contentType": "question",
|
||||||
"majorVersion": 1,
|
"majorVersion": 1,
|
||||||
"minorVersion": 12,
|
"minorVersion": 13,
|
||||||
"patchVersion": 1,
|
"patchVersion": 0,
|
||||||
"embedTypes": [
|
"embedTypes": [
|
||||||
"iframe"
|
"iframe"
|
||||||
],
|
],
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
"description": "Library for this question.",
|
"description": "Library for this question.",
|
||||||
"options": [
|
"options": [
|
||||||
"H5P.MultiChoice 1.9",
|
"H5P.MultiChoice 1.9",
|
||||||
"H5P.DragQuestion 1.9",
|
"H5P.DragQuestion 1.10",
|
||||||
"H5P.Blanks 1.7",
|
"H5P.Blanks 1.7",
|
||||||
"H5P.MarkTheWords 1.6",
|
"H5P.MarkTheWords 1.6",
|
||||||
"H5P.DragText 1.5",
|
"H5P.DragText 1.5",
|
||||||
|
@ -255,6 +255,12 @@
|
||||||
"importance": "low",
|
"importance": "low",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "showSolutionButton",
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Display solution button",
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "noResultMessage",
|
"name": "noResultMessage",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
|
Loading…
Reference in New Issue