diff --git a/css/questionset.css b/css/questionset.css index 416217c..953313f 100644 --- a/css/questionset.css +++ b/css/questionset.css @@ -1,3 +1,6 @@ +.questionset, .intro-page, .questionset-results { + overflow: hidden; +} .questionset.hidden { display: none; } @@ -49,7 +52,7 @@ overflow: hidden; } -.qs-footer .button, .qs-startbutton, .qs-finishbutton, .questionset-results .button { +.qs-footer .button, .qs-startbutton, .qs-finishbutton, .questionset-results .button, .video-container > .button { display: block; line-height: 1.25em; padding: 0.25em 1em; @@ -66,7 +69,7 @@ background-image: -ms-linear-gradient(top, #3999ea, #267ec9); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3999ea', endColorstr='#267ec9',GradientType=0); } -.qs-footer .button:hover, .qs-startbutton:hover, .questionset-results .button:hover { +.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; @@ -84,6 +87,17 @@ .questionset-results .qs-finishbutton { display: none; } +.video-container { + position: relative; +} +.video-container > video { + background-color: #000; +} +.video-container > .button { + position: absolute; + top: 0.5em; + right: 0.5em; +} .qs-progress { text-align: center; diff --git a/js/questionset.js b/js/questionset.js index 8ace8e4..2a52995 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -76,7 +76,7 @@ H5P.QuestionSet = function (options, contentId) { passPercentage: 50, questions: [], introPage: { - showIntroPage: true, + showIntroPage: false, title: '', introduction: '', startButtonText: 'Start' @@ -239,6 +239,7 @@ H5P.QuestionSet = function (options, contentId) { if (params.endGame.showAnimations) { var videoData = success ? params.endGame.successVideo : params.endGame.failVideo; if (videoData) { + $myDom.children().hide(); var $videoContainer = $('
').appendTo($myDom); var video = new H5P.Video({ diff --git a/semantics.json b/semantics.json index acd3f6b..5615235 100644 --- a/semantics.json +++ b/semantics.json @@ -5,19 +5,6 @@ "label": "Title", "description": "Question set title (optional)." }, - { - "name": "randomOrder", - "type": "boolean", - "label": "Randomize order", - "description": "Whether questions should be shown in random order." - }, - { - "name": "initialQuestion", - "type": "number", - "label": "Initial question", - "description": "Which question to start with. Count from 0.", - "default": 0 - }, { "name": "backgroundImage", "type": "image", @@ -185,6 +172,13 @@ "default": "This didn't go so well.", "description": "This comment will be displayed after the score if the user has failed the quiz." }, + { + "name": "solutionButtonText", + "type": "text", + "label": "Solution button label", + "default": "Show solution", + "description": "Text for the solution button." + }, { "name": "finishButtonText", "type": "text",