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++) {
|
||||
var question = params.questions[i];
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -64,14 +64,7 @@
|
|||
"type": "library",
|
||||
"label": "Question library",
|
||||
"description": "Library for this question.",
|
||||
"options": [
|
||||
{
|
||||
"machineName": "H5P.MultiChoice",
|
||||
"majorVersion": 1,
|
||||
"minorVersion": 0,
|
||||
"defaultStyles": true
|
||||
}
|
||||
]
|
||||
"options": ["H5P.MultiChoice 1.0"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue