// Will render a Question with multiple choices for answers. // Options format: // { // title: "Optional title for question box", // question: "Question text", // answers: [{text: "Answer text", correct: false}, ...], // singleAnswer: true, // or false, will change rendered output slightly. // } // // Events provided: // - h5pQuestionSetFinished: Triggered when a question is finished. (User presses Finish-button) window.H5P = window.H5P || {}; H5P.QuestionSet = function (options, contentId) { if ( !(this instanceof H5P.QuestionSet) ) return new H5P.QuestionSet(options, contentId); var $ = H5P.jQuery; var cp = H5P.getContentPath(contentId); var texttemplate = '' + '<% if (introPage.showIntroPage) { %>' + '