Change to use library/params instead of machineName/options

d3summaryChart
Frank Ronny Larsen 2013-02-07 13:11:42 +01:00
parent 929e71fa38
commit bd1125de0f
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ H5P.QuestionSet = function (options, contentId) {
' <div class="title"><%= title %></div>' +
' <% for (var i=0; i<questions.length; i++) { %>' +
' <div class="question-container" id="q-<%= i %>">' +
' <div><%= questions[i].machineName %></div>' +
' <div><%= questions[i].library %></div>' +
' </div>' +
' <% } %>' +
' <div class="qs-footer">' +
@ -119,7 +119,7 @@ H5P.QuestionSet = function (options, contentId) {
for (var i=0; i<params.questions.length; i++) {
var quest = params.questions[i];
// TODO: Render on init, inject in template.
var tmp = new (H5P.classFromName(quest.machineName))(quest.options, contentId);
var tmp = new (H5P.classFromName(quest.library))(quest.params, contentId);
questionInstances.push(tmp);
}