Merge branch 'master' into api-1.1
commit
dd52d82dcf
|
@ -64,7 +64,6 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
var defaults = {
|
var defaults = {
|
||||||
randomOrder: false,
|
randomOrder: false,
|
||||||
initialQuestion: 0,
|
initialQuestion: 0,
|
||||||
backgroundImage: undefined,
|
|
||||||
progressType: 'dots',
|
progressType: 'dots',
|
||||||
passPercentage: 50,
|
passPercentage: 50,
|
||||||
questions: [],
|
questions: [],
|
||||||
|
@ -90,9 +89,7 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
scoreString: 'You got @score points of @total possible.',
|
scoreString: 'You got @score points of @total possible.',
|
||||||
finishButtonText: 'Finish',
|
finishButtonText: 'Finish',
|
||||||
solutionButtonText: 'Show solution',
|
solutionButtonText: 'Show solution',
|
||||||
showAnimations: false,
|
showAnimations: false
|
||||||
successVideo: undefined,
|
|
||||||
failVideo: undefined
|
|
||||||
},
|
},
|
||||||
postUserStatistics: (H5P.postUserStatistics === true)
|
postUserStatistics: (H5P.postUserStatistics === true)
|
||||||
};
|
};
|
||||||
|
@ -106,10 +103,6 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
var $myDom;
|
var $myDom;
|
||||||
renderSolutions = false;
|
renderSolutions = false;
|
||||||
|
|
||||||
// if (params.randomOrder) {
|
|
||||||
// // TODO: Randomize order of questions
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Instantiate question instances
|
// Instantiate question instances
|
||||||
for (var i = 0; i < params.questions.length; i++) {
|
for (var i = 0; i < params.questions.length; i++) {
|
||||||
var question = params.questions[i];
|
var question = params.questions[i];
|
||||||
|
@ -293,6 +286,16 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
backgroundSize: '100% auto'
|
backgroundSize: '100% auto'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params.introPage.backgroundImage !== undefined) {
|
||||||
|
var $intro = $myDom.find('.intro-page');
|
||||||
|
if ($intro.length) {
|
||||||
|
$intro.css({
|
||||||
|
background: '#000 url("' + H5P.getPath(params.introPage.backgroundImage.path, contentId) + '") no-repeat 50% 50%',
|
||||||
|
backgroundSize: '100% auto'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Attach questions
|
// Attach questions
|
||||||
for (var i = 0; i < questionInstances.length; i++) {
|
for (var i = 0; i < questionInstances.length; i++) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"contentType": "question",
|
"contentType": "question",
|
||||||
"majorVersion": 1,
|
"majorVersion": 1,
|
||||||
"minorVersion": 0,
|
"minorVersion": 0,
|
||||||
"patchVersion": 49,
|
"patchVersion": 51,
|
||||||
"runnable": 1,
|
"runnable": 1,
|
||||||
"fullscreen": 0,
|
"fullscreen": 0,
|
||||||
"machineName": "H5P.QuestionSet",
|
"machineName": "H5P.QuestionSet",
|
||||||
|
|
|
@ -97,6 +97,13 @@
|
||||||
"label": "Start button text",
|
"label": "Start button text",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"default": "Start Quiz"
|
"default": "Start Quiz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "backgroundImage",
|
||||||
|
"type": "image",
|
||||||
|
"label": "Background image",
|
||||||
|
"optional": true,
|
||||||
|
"description": "An optional background image for the introduction."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue