add-ability-to-randomize-questions
parent
e510b662ed
commit
77d993b44e
|
@ -20,6 +20,8 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.contentId = contentId;
|
this.contentId = contentId;
|
||||||
|
|
||||||
|
H5P.Randomize(options, 'questions');
|
||||||
|
|
||||||
var texttemplate =
|
var texttemplate =
|
||||||
'<% if (introPage.showIntroPage) { %>' +
|
'<% if (introPage.showIntroPage) { %>' +
|
||||||
'<div class="intro-page">' +
|
'<div class="intro-page">' +
|
||||||
|
|
|
@ -38,6 +38,11 @@
|
||||||
"majorVersion": 4,
|
"majorVersion": 4,
|
||||||
"minorVersion": 5
|
"minorVersion": 5
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"machineName": "H5P.Randomize",
|
||||||
|
"majorVersion": 1,
|
||||||
|
"minorVersion": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"machineName": "H5P.Video",
|
"machineName": "H5P.Video",
|
||||||
"majorVersion": 1,
|
"majorVersion": 1,
|
||||||
|
|
|
@ -119,6 +119,22 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "randomizeQuestions",
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Randomize questions",
|
||||||
|
"description": "Show questions to the user in random order.",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "randomQuestionsAmount",
|
||||||
|
"type": "number",
|
||||||
|
"label": "Random questions amount",
|
||||||
|
"description": "Amount of questions that will be shown to the user in random order. If it is empty all questions will be shown.",
|
||||||
|
"min": 1,
|
||||||
|
"step": 1,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "texts",
|
"name": "texts",
|
||||||
"type": "group",
|
"type": "group",
|
||||||
|
|
Loading…
Reference in New Issue