var H5P = H5P || {}; if (H5P.getPath === undefined) { /** * Find the path to the content files based on the id of the content * * Also identifies and returns absolute paths * * @param {String} path Absolute path to a file, or relative path to a file in the content folder * @param {Number} contentId Identifier of the content requesting the path * @returns {String} The path to use. */ H5P.getPath = function (path, contentId) { if (path.substr(0, 7) === 'http://' || path.substr(0, 8) === 'https://') { return path; } return H5PIntegration.getContentPath(contentId) + path; }; } /** * Will render a Question with multiple choices for answers. * * Events provided: * - h5pQuestionSetFinished: Triggered when a question is finished. (User presses Finish-button) * * @param {Array} options * @param {int} contentId * @returns {H5P.QuestionSet} Instance */ H5P.QuestionSet = function (options, contentId) { if (!(this instanceof H5P.QuestionSet)) { return new H5P.QuestionSet(options, contentId); } var $ = H5P.jQuery; var texttemplate = '<% if (introPage.showIntroPage) { %>' + '