diff --git a/content.json b/content.json deleted file mode 100644 index e69de29..0000000 diff --git a/css/questionset.css b/css/questionset.css new file mode 100644 index 0000000..26c5a3a --- /dev/null +++ b/css/questionset.css @@ -0,0 +1,32 @@ +.dots-container { + text-align: center; +} +.progress-dot { + display: inline-block; + width: 10px; + height: 10px; + border-radius: 50%; +} +.progress-dot.unanswered { + background: darkred; +} +.progress-dot.answered { + background: darkgreen; +} +.progress-dot.current { + box-shadow: 0px 0px 6px firebrick; +} +.intro-page { + background-color: rgba(255,255,255,0.9); + padding: 10px; + position: absolute; + z-index: 20; + height: 100%; + width: 100%; + left: 0px; + top: 0px; +} +.questionset-results { + background-color: rgba(255, 255, 255, 0.75); + padding: 10px; +} diff --git a/js/questionset.js b/js/questionset.js index ca85d98..c9ebdc9 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -12,42 +12,14 @@ // - h5pQuestionSetFinished: Triggered when a question is finished. (User presses Finish-button) window.H5P = window.H5P || {}; -H5P.QuestionSet = function (options) { +H5P.QuestionSet = function (options, contentId) { if ( !(this instanceof H5P.QuestionSet) ) - return new H5P.QuestionSet(options); + return new H5P.QuestionSet(options, contentId); var $ = H5P.jQuery; + var cp = H5P.getContentPath(contentId); var texttemplate = '' + -'' + '
' + ' <% if (introPage.showIntroPage) { %>' + '
' + @@ -153,7 +125,7 @@ H5P.QuestionSet = function (options) { for (var i=0; i -.dots-container { - text-align: center; -} -.progress-dot { - display: inline-block; - width: 10px; - height: 10px; - border-radius: 50%; -} -.progress-dot.unanswered { - background: darkred; -} -.progress-dot.answered { - background: darkgreen; -} -.progress-dot.current { - box-shadow: 0px 0px 6px firebrick; -} -.intro-page { - background: white; - position: absolute; - z-index: 20; - height: 100%; - width: 100%; - left: 0px; - top: 0px; -} -
<% if (introPage.showIntroPage) { %>