Tried to make H5P work again..

d3summaryChart
Frode Petterson 2013-03-08 11:51:28 +01:00
parent c79bb54c4e
commit eaf45ee1d3
2 changed files with 6 additions and 3 deletions

View File

@ -118,8 +118,7 @@ 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 libraryObject = H5P.libraryFromString(question.library); var tmp = new (H5P.classFromName(question.library))(question.params, contentId);
var tmp = new (H5P.classFromName(libraryObject.machineName))(question.params, contentId);
questionInstances.push(tmp); questionInstances.push(tmp);
} }

View File

@ -16,6 +16,10 @@
{"path": "css/questionset.css"} {"path": "css/questionset.css"}
], ],
"preloadedDependencies": [ "preloadedDependencies": [
{"machineName": "EmbeddedJS", "majorVersion": 1, "minorVersion": 0} {
"name": "embedded-js",
"majorVersion": 1,
"minorVersion": 0
}
] ]
} }