Adding full versioning support
parent
c502efd675
commit
d82f8ef1e7
|
@ -118,7 +118,8 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
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];
|
||||||
// TODO: Render on init, inject in template.
|
// TODO: Render on init, inject in template.
|
||||||
var tmp = new (H5P.classFromName(question.library))(question.params, contentId);
|
var libraryObject = H5P.libraryFromString(question.library);
|
||||||
|
var tmp = new (H5P.classFromName(libraryObject.machineName))(question.params, contentId);
|
||||||
questionInstances.push(tmp);
|
questionInstances.push(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,14 +64,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"label": "Question library",
|
"label": "Question library",
|
||||||
"description": "Library for this question.",
|
"description": "Library for this question.",
|
||||||
"options": [
|
"options": ["H5P.MultiChoice 1.0"]
|
||||||
{
|
|
||||||
"machineName": "H5P.MultiChoice",
|
|
||||||
"majorVersion": 1,
|
|
||||||
"minorVersion": 0,
|
|
||||||
"defaultStyles": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue