add-ability-to-randomize-questions

pull/7/head
Sergey Yuhnevich 2016-10-08 11:01:12 +03:00
parent e510b662ed
commit 77d993b44e
3 changed files with 23 additions and 0 deletions

View File

@ -20,6 +20,8 @@ H5P.QuestionSet = function (options, contentId, contentData) {
var self = this;
this.contentId = contentId;
H5P.Randomize(options, 'questions');
var texttemplate =
'<% if (introPage.showIntroPage) { %>' +
'<div class="intro-page">' +

View File

@ -38,6 +38,11 @@
"majorVersion": 4,
"minorVersion": 5
},
{
"machineName": "H5P.Randomize",
"majorVersion": 1,
"minorVersion": 0
},
{
"machineName": "H5P.Video",
"majorVersion": 1,

View File

@ -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",
"type": "group",