Adding full versioning support

d3summaryChart
Svein-Tore Griff With 2013-03-06 15:58:30 +01:00
parent c502efd675
commit d82f8ef1e7
2 changed files with 3 additions and 9 deletions

View File

@ -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);
}

View File

@ -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"]
}
]
}