From ddb6893d35832d304d22947d62c30b4a9d5cfe67 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Thu, 27 Jun 2013 14:13:00 +0200 Subject: [PATCH] OPPG-376: Added hook for modifying params. Replace getContentPath with getPath to reduce code and display absolute urls. --- js/questionset.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index 725df10..1fb1559 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -16,7 +16,6 @@ H5P.QuestionSet = function (options, contentId) { } var $ = H5P.jQuery; - var cp = H5P.getContentPath(contentId); var texttemplate = '<% if (introPage.showIntroPage) { %>' + @@ -234,7 +233,7 @@ H5P.QuestionSet = function (options, contentId) { fitToWrapper: true, controls: false, autoplay: true - }, cp); + }, contentId); video.endedCallback = function () { displayResults(); $videoContainer.hide(); @@ -270,7 +269,7 @@ H5P.QuestionSet = function (options, contentId) { if (params.backgroundImage !== undefined) { $myDom.css({ overflow: 'hidden', - background: '#000 url(' + cp + params.backgroundImage.path + ') no-repeat 50% 50%', + background: '#000 url(' + H5P.getPath(contentId, params.backgroundImage.path) + ') no-repeat 50% 50%', backgroundSize: '100% auto' }); }