Fix library loading bug

d3summaryChart
Svein-Tore Griff With 2013-04-03 15:44:43 +02:00
parent fae5693ace
commit 04f5d0357d
1 changed files with 3 additions and 1 deletions

View File

@ -118,7 +118,9 @@ 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);
}