Fix library loading bug
parent
fae5693ace
commit
04f5d0357d
|
@ -118,7 +118,9 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue