From cee88a544f84f29afda324e85d246cfc8080de69 Mon Sep 17 00:00:00 2001 From: thomasmars Date: Fri, 23 Sep 2016 15:46:52 +0200 Subject: [PATCH 01/33] Made it possible to ignore build files when exporting development folders. --- h5p-default-storage.class.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/h5p-default-storage.class.php b/h5p-default-storage.class.php index a1cd27f..88a4776 100644 --- a/h5p-default-storage.class.php +++ b/h5p-default-storage.class.php @@ -275,6 +275,8 @@ class H5PDefaultStorage implements \H5PFileStorage { throw new \Exception('unabletocopy'); } + $ignoredFiles = self::getIgnoredFiles("{$source}/.h5pignore"); + $dir = opendir($source); if ($dir === FALSE) { trigger_error('Unable to open directory ' . $source, E_USER_WARNING); @@ -282,7 +284,7 @@ class H5PDefaultStorage implements \H5PFileStorage { } while (false !== ($file = readdir($dir))) { - if (($file != '.') && ($file != '..') && $file != '.git' && $file != '.gitignore') { + if (($file != '.') && ($file != '..') && $file != '.git' && $file != '.gitignore' && !in_array($file, $ignoredFiles)) { if (is_dir("{$source}/{$file}")) { self::copyFileTree("{$source}/{$file}", "{$destination}/{$file}"); } @@ -294,6 +296,25 @@ class H5PDefaultStorage implements \H5PFileStorage { closedir($dir); } + /** + * Retrieve array of file names from file. + * + * @param string $file + * @return array Array with files that should be ignored + */ + private static function getIgnoredFiles($file) { + if (file_exists($file) === FALSE) { + return array(); + } + + $contents = file_get_contents($file); + if ($contents === FALSE) { + return array(); + } + + return preg_split('/\s+/', $contents); + } + /** * Recursive function that makes sure the specified directory exists and * is writable. From 516c70add5401530a816bfc08a722dde770df6e3 Mon Sep 17 00:00:00 2001 From: thomasmars Date: Fri, 28 Oct 2016 10:46:05 +0200 Subject: [PATCH 02/33] Don't store results if they have no score. HFP-173 --- js/h5p.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/h5p.js b/js/h5p.js index 60cfdd4..65ec2e1 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -1637,7 +1637,7 @@ H5P.shuffleArray = function (array) { * Reported time consumption/usage */ H5P.setFinished = function (contentId, score, maxScore, time) { - if (H5PIntegration.postUserStatistics === true) { + if (score && H5PIntegration.postUserStatistics === true) { /** * Return unix timestamp for the given JS Date. * From bae31451c0a1f49835ca4a1351f90e86581e9f06 Mon Sep 17 00:00:00 2001 From: thomasmars Date: Fri, 28 Oct 2016 13:45:11 +0200 Subject: [PATCH 03/33] Check that score is a number before storing it to the database. HFP-173 --- js/h5p.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/h5p.js b/js/h5p.js index 65ec2e1..e6b4555 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -1637,7 +1637,7 @@ H5P.shuffleArray = function (array) { * Reported time consumption/usage */ H5P.setFinished = function (contentId, score, maxScore, time) { - if (score && H5PIntegration.postUserStatistics === true) { + if (typeof score === 'number' && H5PIntegration.postUserStatistics === true) { /** * Return unix timestamp for the given JS Date. * From 9b0d77a7212b9c6d37b0687dbde6bd2915c9002a Mon Sep 17 00:00:00 2001 From: thomasmars Date: Sat, 19 Nov 2016 12:29:38 +0100 Subject: [PATCH 04/33] Check instanceof score as well to validate number. HFP-215 --- js/h5p.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/h5p.js b/js/h5p.js index 77f9f0e..ebc7870 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -1637,7 +1637,8 @@ H5P.shuffleArray = function (array) { * Reported time consumption/usage */ H5P.setFinished = function (contentId, score, maxScore, time) { - if (typeof score === 'number' && H5PIntegration.postUserStatistics === true) { + var validScore = typeof score === 'number' || score instanceof Number; + if (validScore && H5PIntegration.postUserStatistics === true) { /** * Return unix timestamp for the given JS Date. * From d76ce3f3a567b132c5626622d294d84f10a60cad Mon Sep 17 00:00:00 2001 From: thomasmars Date: Mon, 12 Dec 2016 11:22:34 +0100 Subject: [PATCH 05/33] Applied fix for Safari full screen in version > 9 Big thanks to Lest@t at Drupal for providing the patch. HFP-342 --- js/h5p.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index a505c9c..b266b5e 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -32,7 +32,7 @@ if (document.documentElement.requestFullScreen) { H5P.fullScreenBrowserPrefix = ''; } else if (document.documentElement.webkitRequestFullScreen) { - H5P.safariBrowser = navigator.userAgent.match(/Version\/(\d)/); + H5P.safariBrowser = navigator.userAgent.match(/version\/([.\d]+)/i); H5P.safariBrowser = (H5P.safariBrowser === null ? 0 : parseInt(H5P.safariBrowser[1])); // Do not allow fullscreen for safari < 7. @@ -497,7 +497,7 @@ H5P.semiFullScreen = function ($element, instance, exitCallback, body) { * @param {Object} instance * @param {function} exitCallback Callback function called when user exits fullscreen. * @param {H5P.jQuery} $body For internal use. Gives the body of the iframe. - * @param {Boolean} forceSemiFullScreen + * @param {Boolean} forceSemiFullScreen */ H5P.fullScreen = function ($element, instance, exitCallback, body, forceSemiFullScreen) { if (H5P.exitFullScreen !== undefined) { From a4d6f3aaabd87c40b3d18ba1d82ff3f745353fb0 Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Mon, 12 Dec 2016 11:28:23 +0100 Subject: [PATCH 06/33] Restore deprecated variable H5P.canHasFullScreen for backwards compatability HFP-339 --- h5p.classes.php | 2 +- js/h5p.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 3276151..0d92330 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -1676,7 +1676,7 @@ class H5PCore { public static $coreApi = array( 'majorVersion' => 1, - 'minorVersion' => 11 + 'minorVersion' => 12 ); public static $styles = array( 'styles/h5p.css', diff --git a/js/h5p.js b/js/h5p.js index b266b5e..618aae7 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -97,6 +97,15 @@ H5P.init = function (target) { // element sizing corrected. Ref. https://connect.microsoft.com/IE/feedback/details/838286/ie-11-incorrectly-reports-dom-element-sizes-in-fullscreen-mode-when-fullscreened-element-is-within-an-iframe } + // Deprecated variable, kept to maintain backwards compatability + if (H5P.canHasFullScreen === undefined) { + /** + * @deprecated since version 1.11 + * @type {boolean} + */ + H5P.canHasFullScreen = (H5P.isFramed && H5P.externalEmbed !== false) ? ((document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled) ? true : false) : true; + } + // H5Ps added in normal DIV. var $containers = H5P.jQuery('.h5p-content:not(.h5p-initialized)', target).each(function () { var $element = H5P.jQuery(this).addClass('h5p-initialized'); @@ -147,6 +156,13 @@ H5P.init = function (target) { }); } + // Check if we should add and display a fullscreen button for this H5P using + // the deprecated variable for backwards compatability. + if (contentData.fullScreen == 1 && H5P.canHasFullScreen) { + H5P.jQuery('
').prependTo($container).children().click(function () { + H5P.fullScreen($container, instance); + }); + } // Create action bar var $actions = H5P.jQuery('
    '); From 7d741fa5032525ca777a8f9b1d877db86413b484 Mon Sep 17 00:00:00 2001 From: thomasmars Date: Tue, 13 Dec 2016 10:16:15 +0100 Subject: [PATCH 07/33] Reset list-style for list items in action bar. HFP-350 --- styles/h5p.css | 1 + 1 file changed, 1 insertion(+) diff --git a/styles/h5p.css b/styles/h5p.css index e5c5240..35538c7 100644 --- a/styles/h5p.css +++ b/styles/h5p.css @@ -235,6 +235,7 @@ div.h5p-fullscreen { } .h5p-actions > li { margin: 0; + list-style: none; } .h5p-popup-dialog { position: absolute; From 0a23dc043d0ab3195a5db24470235d851e322600 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Tue, 13 Dec 2016 10:29:33 +0100 Subject: [PATCH 08/33] Download and embed granularity (HFP-277) --- h5p.classes.php | 142 +++++++++++++++++++++++++++++--------- js/disable.js | 19 ----- js/h5p-action-bar.js | 77 +++++++++++++++++++++ js/h5p-display-options.js | 23 ++++++ js/h5p.js | 103 +++++++-------------------- 5 files changed, 236 insertions(+), 128 deletions(-) delete mode 100644 js/disable.js create mode 100644 js/h5p-action-bar.js create mode 100644 js/h5p-display-options.js diff --git a/h5p.classes.php b/h5p.classes.php index dabca7d..5f8a10a 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -558,6 +558,8 @@ interface H5PFrameworkInterface { * Will trigger after the export file is created. */ public function afterExportCreated(); + + public function hasPermission($permission, $content_id = NULL); } /** @@ -1669,6 +1671,20 @@ Class H5PExport { } } +abstract class H5PPermission { + const DOWNLOAD_H5P = 0; + const EMBED_H5P = 1; +} + +abstract class H5PDisplayOptionBehaviour { + const NEVER_SHOW = 0; + const CONTROLLED_BY_AUTHOR_DEFAULT_ON = 1; + const CONTROLLED_BY_AUTHOR_DEFAULT_OFF = 2; + const ALWAYS_SHOW = 3; + const CONTROLLED_BY_PERMISSIONS = 4; +} + + /** * Functions and storage shared by the other H5P classes */ @@ -1690,7 +1706,8 @@ class H5PCore { 'js/h5p-x-api-event.js', 'js/h5p-x-api.js', 'js/h5p-content-type.js', - 'js/h5p-confirmation-dialog.js' + 'js/h5p-confirmation-dialog.js', + 'js/h5p-action-bar.js' ); public static $adminScripts = array( 'js/jquery.js', @@ -2439,34 +2456,6 @@ class H5PCore { } } - /** - * - */ - public function getGlobalDisable() { - $disable = self::DISABLE_NONE; - - // Allow global settings to override and disable options - if (!$this->h5pF->getOption('frame', TRUE)) { - $disable |= self::DISABLE_FRAME; - } - else { - if (!$this->h5pF->getOption('export', TRUE)) { - $disable |= self::DISABLE_DOWNLOAD; - } - if (!$this->h5pF->getOption('embed', TRUE)) { - $disable |= self::DISABLE_EMBED; - } - if (!$this->h5pF->getOption('copyright', TRUE)) { - $disable |= self::DISABLE_COPYRIGHT; - } - if (!$this->h5pF->getOption('icon', TRUE)) { - $disable |= self::DISABLE_ABOUT; - } - } - - return $disable; - } - /** * Determine disable state from sources. * @@ -2474,7 +2463,7 @@ class H5PCore { * @param int $current * @return int */ - public function getDisable(&$sources, $current) { + public function getDisplayOptionsAsByte(&$sources, $current) { foreach (H5PCore::$disable as $bit => $option) { if ($this->h5pF->getOption(($bit & H5PCore::DISABLE_DOWNLOAD ? 'export' : $option), TRUE)) { if (!isset($sources[$option]) || !$sources[$option]) { @@ -2488,6 +2477,98 @@ class H5PCore { return $current; } + /** + * Determine display options visibility and value on edit + * + * @method getDisplayOptionsForEdit + * @param [int] $disable + * @return [Array] + */ + public function getDisplayOptionsForEdit($disable = NULL) { + $display_options = []; + + $current_display_options = $disable === NULL ? [] : $this->getDisplayOptionsAsArray($disable); + + if ($this->h5pF->getOption('frame', TRUE)) { + $display_options['frame'] = isset($current_display_options['showFrame']) ? $current_display_options['showFrame'] : TRUE; + + $export = $this->h5pF->getOption('export', H5PDisplayOptionBehaviour::ALWAYS_SHOW); + if ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON || $export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) { + $display_options['download'] = isset($current_display_options['showDownload']) ? $current_display_options['showDownload'] : ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON); + } + $embed = $this->h5pF->getOption('embed', H5PDisplayOptionBehaviour::ALWAYS_SHOW); + if ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON || $embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) { + $display_options['embed'] = isset($current_display_options['showEmbed']) ? $current_display_options['showEmbed'] : ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON); + } + if ($this->h5pF->getOption('copyright', TRUE)) { + $display_options['copyright'] = isset($current_display_options['showCopyright']) ? $current_display_options['showCopyright'] : TRUE; + } + } + + return $display_options; + } + + /** + * Determine display option visibility when viewing H5P + * + * @method getDisplayOptionsForView + * @param [int] $display_options + * @param [int] $id Might be content id or user id. + * Depends on what the platform needs to be able to determine permissions. + * @return [Array] + */ + public function getDisplayOptionsForView($disable, $id) { + $display_options = $this->getDisplayOptionsAsArray($disable); + + if ($this->h5pF->getOption('frame', TRUE) == FALSE) { + $display_options['showFrame'] = false; + } + else { + $export = $this->h5pF->getOption('export', H5PDisplayOptionBehaviour::ALWAYS_SHOW); + if ($export == H5PDisplayOptionBehaviour::NEVER_SHOW) { + // If never show globally, force hide + $display_options['showDownload'] = false; + } + elseif ($export == H5PDisplayOptionBehaviour::ALWAYS_SHOW || ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_PERMISSIONS && $this->h5pF->hasPermission(H5PPermission::DOWNLOAD_H5P, $id))) { + // If always show or permissions say so, force show + $display_options['showDownload'] = true; + } + + $embed = $this->h5pF->getOption('embed', H5PDisplayOptionBehaviour::ALWAYS_SHOW); + if ($embed == H5PDisplayOptionBehaviour::NEVER_SHOW) { + // If never show globally, force hide + $display_options['showEmbed'] = false; + } + elseif ($embed == H5PDisplayOptionBehaviour::ALWAYS_SHOW || ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_PERMISSIONS && $this->h5pF->hasPermission(H5PPermission::EMBED_H5P, $id))) { + // If always show or permissions say so, force show + $display_options['showEmbed'] = true; + } + + if ($this->h5pF->getOption('copyright', TRUE) == FALSE) { + $display_options['showCopyright'] = false; + } + } + + return $display_options; + } + + /** + * Convert display options as single byte to array + * + * @method getDisplayOptionsAsArray + * @param [int] $disable + * @return [Array] + */ + private function getDisplayOptionsAsArray($disable) { + return array( + 'showFrame' => !($disable & H5PCore::DISABLE_FRAME), + 'showDownload' => !($disable & H5PCore::DISABLE_DOWNLOAD), + 'showEmbed' => !($disable & H5PCore::DISABLE_EMBED), + 'showCopyright' => !($disable & H5PCore::DISABLE_COPYRIGHT), + 'showAbout' => $this->h5pF->getOption('icon', TRUE), + ); + } + /** * Small helper for getting the library's ID. * @@ -3147,7 +3228,6 @@ class H5PContentValidator { break; } } - // Using a library in content that is not present at all in semantics if ($message === NULL) { $message = $this->h5pF->t('The H5P library %library used in the content is not valid', array( diff --git a/js/disable.js b/js/disable.js deleted file mode 100644 index 0bfbb07..0000000 --- a/js/disable.js +++ /dev/null @@ -1,19 +0,0 @@ -(function ($) { - $(document).ready(function () { - var $inputs = $('.h5p-action-bar-settings input'); - var $frame = $inputs.filter('input[name="frame"], input[name="h5p_frame"]'); - var $others = $inputs.filter(':not(input[name="frame"], input[name="h5p_frame"])'); - - var toggle = function () { - if ($frame.is(':checked')) { - $others.attr('disabled', false); - } - else { - $others.attr('disabled', true); - } - }; - - $frame.change(toggle); - toggle(); - }); -})(H5P.jQuery); diff --git a/js/h5p-action-bar.js b/js/h5p-action-bar.js new file mode 100644 index 0000000..a80ef60 --- /dev/null +++ b/js/h5p-action-bar.js @@ -0,0 +1,77 @@ +H5P.ActionBar = (function ($, EventDispatcher) { + "use strict"; + + function ActionBar(displayOptions) { + EventDispatcher.call(this); + + var self = this; + + var hasActions = false; + + // Create action bar + var $actions = H5P.jQuery('
      '); + + /** + * Helper for creating action bar buttons. + * + * @private + * @param {string} type + * @param {string} customClass Instead of type class + */ + var addActionButton = function (type, customClass) { + var handler = function () { + self.trigger(type); + }; + H5P.jQuery('
    • ', { + 'class': 'h5p-button h5p-' + (customClass ? customClass : type), + role: 'button', + tabindex: 0, + title: H5P.t(type + 'Description'), + html: H5P.t(type), + on: { + click: handler, + keypress: function (e) { + if (e.which === 32) { + handler(); + e.preventDefault(); // (since return false will block other inputs) + } + } + }, + appendTo: $actions + }); + + hasActions = true; + }; + + // Register action bar buttons + if (displayOptions.showDownload) { + // Add export button + addActionButton('download', 'export'); + } + if (displayOptions.showCopyrights) { + addActionButton('copyrights'); + } + if (displayOptions.showEmbed) { + addActionButton('embed'); + } + if (displayOptions.showAbout) { + // Add about H5P button icon + H5P.jQuery('
    • ').appendTo($actions); + hasActions = true; + } + + self.getDOMElement = function () { + return $actions; + }; + + self.hasActions = function () { + return hasActions; + } + }; + + ActionBar.prototype = Object.create(EventDispatcher.prototype); + ActionBar.prototype.constructor = ActionBar; + + return ActionBar; + +})(H5P.jQuery, H5P.EventDispatcher); diff --git a/js/h5p-display-options.js b/js/h5p-display-options.js new file mode 100644 index 0000000..9c8f664 --- /dev/null +++ b/js/h5p-display-options.js @@ -0,0 +1,23 @@ +/** + * Utility that makes it possible to hide fields when a checkbox is unchecked + */ +(function ($) { + function setupHiding () { + var $toggler = $(this); + + // Getting the field which should be hidden: + var $subject = $($toggler.data('h5p-visibility-subject-selector')); + + var toggle = function () { + $subject.toggle($toggler.is(':checked')); + }; + + $toggler.change(toggle); + toggle(); + } + + $(document).ready(function () { + // Get the checkboxes making other fields being hidden: + $('.h5p-visibility-toggler').each(setupHiding); + }); +})(H5P.jQuery); diff --git a/js/h5p.js b/js/h5p.js index 77f9f0e..5fe8c78 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -47,24 +47,6 @@ else if (document.documentElement.msRequestFullscreen) { H5P.fullScreenBrowserPrefix = 'ms'; } -/** @const {number} */ -H5P.DISABLE_NONE = 0; - -/** @const {number} */ -H5P.DISABLE_FRAME = 1; - -/** @const {number} */ -H5P.DISABLE_DOWNLOAD = 2; - -/** @const {number} */ -H5P.DISABLE_EMBED = 4; - -/** @const {number} */ -H5P.DISABLE_COPYRIGHT = 8; - -/** @const {number} */ -H5P.DISABLE_ABOUT = 16; - /** * Keep track of when the H5Ps where started. * @@ -147,76 +129,41 @@ H5P.init = function (target) { }); } - // Create action bar - var $actions = H5P.jQuery('
        '); - /** - * Helper for creating action bar buttons. - * - * @private - * @param {string} type - * @param {function} handler - * @param {string} customClass Instead of type class + * Create action bar */ - var addActionButton = function (type, handler, customClass) { - H5P.jQuery('
      • ', { - 'class': 'h5p-button h5p-' + (customClass ? customClass : type), - role: 'button', - tabindex: 0, - title: H5P.t(type + 'Description'), - html: H5P.t(type), - on: { - click: handler, - keypress: function (e) { - if (e.which === 32) { - handler(); - e.preventDefault(); // (since return false will block other inputs) - } - } - }, - appendTo: $actions - }); - }; - - // Register action bar buttons - if (!(contentData.disable & H5P.DISABLE_DOWNLOAD)) { - // Add export button - addActionButton('download', function () { - // Use button for download to avoid people linking directly to the .h5p - window.location.href = contentData.exportUrl; - }, 'export'); - } - if (!(contentData.disable & H5P.DISABLE_COPYRIGHT)) { - var copyright = H5P.getCopyrights(instance, library.params, contentId); - - if (copyright) { - // Add copyright dialog button - addActionButton('copyrights', function () { - // Open dialog with copyright information - var dialog = new H5P.Dialog('copyrights', H5P.t('copyrightInformation'), copyright, $container); - dialog.open(); - }); + var displayOptions = contentData.displayOptions; + if (displayOptions.showFrame) { + // Special handling of copyrights + if (displayOptions.showCopyrights) { + var copyrights = H5P.getCopyrights(instance, library.params, contentId); + if (!copyrights) { + displayOptions.showCopyrights = false; + } } - } - if (!(contentData.disable & H5P.DISABLE_EMBED)) { - // Add embed button - addActionButton('embed', function () { - // Open dialog with embed information + + // Create action bar + var actionBar = new H5P.ActionBar(displayOptions); + var $actions = actionBar.getDOMElement(); + + actionBar.on('download', function () { + window.location.href = contentData.exportUrl; + }); + actionBar.on('copyrights', function () { + var dialog = new H5P.Dialog('copyrights', H5P.t('copyrightInformation'), copyrights, $container); + dialog.open(); + }); + actionBar.on('embed', function () { H5P.openEmbedDialog($actions, contentData.embedCode, contentData.resizeCode, { width: $element.width(), height: $element.height() }); }); - } - if (!(contentData.disable & H5P.DISABLE_ABOUT)) { - // Add about H5P button icon - H5P.jQuery('
      • ').appendTo($actions); - } - - // Insert action bar if it has any content - if (!(contentData.disable & H5P.DISABLE_FRAME) && $actions.children().length) { $actions.insertAfter($container); + } + + if (displayOptions.showFrame && actionBar.hasActions()) { $element.addClass('h5p-frame'); } else { From 52dc1b2a81f0a5dd4e20e0aac3b5ad0465527c5b Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Tue, 13 Dec 2016 10:33:11 +0100 Subject: [PATCH 09/33] Refactor canHasFullScreen HFP-339 --- js/h5p.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index 618aae7..559b80b 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -156,13 +156,6 @@ H5P.init = function (target) { }); } - // Check if we should add and display a fullscreen button for this H5P using - // the deprecated variable for backwards compatability. - if (contentData.fullScreen == 1 && H5P.canHasFullScreen) { - H5P.jQuery('
        ').prependTo($container).children().click(function () { - H5P.fullScreen($container, instance); - }); - } // Create action bar var $actions = H5P.jQuery('
          '); From e69a81f4039d5c84fd53821a36d82e347a5479d4 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Tue, 13 Dec 2016 10:33:59 +0100 Subject: [PATCH 10/33] Added description of new interface method [HFP-277] --- h5p.classes.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 5f8a10a..ddb48b6 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -559,7 +559,15 @@ interface H5PFrameworkInterface { */ public function afterExportCreated(); - public function hasPermission($permission, $content_id = NULL); + /** + * Check if user has permissions to an action + * + * @method hasPermission + * @param [H5PPermission] $permission Permission type, ref H5PPermission + * @param [int] $id Id need by platform to determine permission + * @return boolean + */ + public function hasPermission($permission, $id = NULL); } /** From a326066c97dd4d226f2bc72cdfc5410438704918 Mon Sep 17 00:00:00 2001 From: thomasmars Date: Tue, 13 Dec 2016 11:36:28 +0100 Subject: [PATCH 11/33] Only set tutorial url if it exists. HFP-348 --- h5p.classes.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 0d92330..b003a27 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2423,7 +2423,9 @@ class H5PCore { // Handle libraries metadata if (isset($json->libraries)) { foreach ($json->libraries as $machineName => $libInfo) { - $this->h5pF->setLibraryTutorialUrl($machineName, $libInfo->tutorialUrl); + if (isset($libInfo->tutorialUrl)) { + $this->h5pF->setLibraryTutorialUrl($machineName, $libInfo->tutorialUrl); + } } } From cddef832879788f1eb579fced0ad91057cefcf4e Mon Sep 17 00:00:00 2001 From: jelenamilinovic Date: Tue, 13 Dec 2016 13:43:25 +0100 Subject: [PATCH 12/33] Add files via upload --- fonts/h5p-core-16.eot | Bin 0 -> 8096 bytes fonts/h5p-core-16.svg | 42 +++++++++++++++++++++++++++++++++++++++++ fonts/h5p-core-16.ttf | Bin 0 -> 7932 bytes fonts/h5p-core-16.woff | Bin 0 -> 8008 bytes 4 files changed, 42 insertions(+) create mode 100644 fonts/h5p-core-16.eot create mode 100644 fonts/h5p-core-16.svg create mode 100644 fonts/h5p-core-16.ttf create mode 100644 fonts/h5p-core-16.woff diff --git a/fonts/h5p-core-16.eot b/fonts/h5p-core-16.eot new file mode 100644 index 0000000000000000000000000000000000000000..239079bac7fcb443abd2063703ed61bab0a9b3b9 GIT binary patch literal 8096 zcma)B3vgU#b^agsxqJ8S-hEwZpVF?hYdySL?P_-u+1A6dCC8TPmrNWSJ62@bvK?E- z53t=NBp6~RW{e?Dz%7tW6DZJ@fhmwol4e}Uq-7|SrnC&5rXB1;9W%5H6dJ%<_xtbe z+OlJY-rfKH=bZnX^S{qI|9_uN5^^;`2qlc%{7`b13d;Dpo9TkL_Rx=RJaB6nAtu>P zrpX-Hhcrj_gTW*l$PC#$Aj}T7s zYd7{3ynf|0D6b%GpWZih;JZKnAVg^l_y>1Q9TIKw0e=>`w(EgoJExvmBLn{&A(6@1 znW-Jd+J{~yBzhI)%Rp)i8>xTFn8!M+KDIeucDlAX(K&LP(M4*{tlFn)N=Y0 zQlz@zTkudc`{rkekhe^J;o1c<#F0?g7<|FkB3@2yqQ)4?YB_hfVniadpocLUoG75R z{AlNoKJsIF`H9OPzI^U2^VV{-Wv=x5#{4xL`R6nQ3cG@{ubuphM_ zu|v?Yux>}N{-T6JlXpQm7E|R;hy8}k@1tFzG7qz;ScrjEdWCgYudrzK3hJQrA@T$} z!JZan?G{j~Ji(0WZ=5nhn>k^d#2D*T&8k_3hAe&UwWVy+H7AEW{@__Ac&M$@ip^eI zdX0!;whVyahc1JjAYt|p--EuYSaDtwAU27TBuSGj=^{OlE{4(-B=!H9(-UK3fBF0V ze9zd}*d~!yty(p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P%gEvr)1OKq!C`QA;XRDZmAAo;x&rNh(f*W9x)HnwtEVC2!< ziroi$CJ(a@wyj>YXmvC(wkR{+X6Kvvl8)^?nTeK`iA?Uk&Vgtz`j3n(b-} z!~GlV`f0L;AK@k3XCr32c_s5B{X0)hOq>!+ua?sb3o%fI@5TK^J?;x&pA&h(UI;-W zzhyt9u>oE_y>8v=|(=Zuuw4Ziwlbdo2ZvQOMb?7vp++uvktAV z-Jy!5ip42T#<1i|sQ3=B5O?CixZ|Y4!4SW_ki*1w!zyd?GqNJdShfH|A;7{413n6n zNe&^41G6TtcL)nW+MSiKo+XfUDJvwUqu1fO#;<^g#lL6i4aG~Z3pw*6MwlGf_)&VF zcj+&Q8wLr__l|t>nHxDqe-u$SzW0f_a2~|s&UZ5+cL-b>718-kPg_k>jV8o^Uy%rX z2nn#0PJlKqchHX`eFEtuQXCq8h&+WP=!=jJAss{dKKQ>3*;b(&Nwn5LdbAF^kSj={ zERM7d>2wXJ&w?!C*dV@mbYpjp<4eOA@RjrDG(&eXgPoNU(qXwtJ|O?I;!_?}A5p)i z4QQ|G`}NPcPPwkQ-|hac@owWm<3$g?mpHv`qXurM#M2lR2dTeI^2Pd?P<-vGNeE6A z_14Bpd<84lVF~b&IxIW)A2l8Y^fh(5i$rk##dktU2gO854HouhR~_bnm(^hj@Pl<& z##fe>I;?=cp$@ySwx8cUJ-2UeZvV|+mftmV@X+qL{Vlz@{Ovy{-&X3j#0@jMjyy1R z@aFH-x8)q2+kd!a*UbKzgHwlRcC_4otmUrhxe2r_hm(f*lzkYz*o7}d`<)NmQ^04) c4$$r=$MC+(`7}OJ|1_S%sPlzW@=o~w0Pj)0SO5S3 literal 0 HcmV?d00001 diff --git a/fonts/h5p-core-16.svg b/fonts/h5p-core-16.svg new file mode 100644 index 0000000..1240927 --- /dev/null +++ b/fonts/h5p-core-16.svg @@ -0,0 +1,42 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/h5p-core-16.ttf b/fonts/h5p-core-16.ttf new file mode 100644 index 0000000000000000000000000000000000000000..daf157117573b9cc4baba149f16cb136104f217b GIT binary patch literal 7932 zcma)B4U}6)b)KL1D?L5w>F@38Z?)2{)5;X-VSi8;nioCLQ(I8C5HTMnE8$w|^27jn{aD3qqO9D17eU^mn;hn53{2FS|& z=1H>GCP1Iwyty-T@0~k$X70T+B9su~CJz!$^6NJB6uf@rG-_T#+CH;y`oMR7`k_1_ zG=}nrc1<5TfZT`jr;uyA?mf11`suYY%AX}9GBr0ly~9{{|BHk~-$r|R4i%avn}o#r zP;Q&sclhXIUytrVc?-&C@138S-tpya1(YwNyk_6@(F3HH0zWSBll!Ol&7NPQ{~F~f z^zrb4`9p^xC!WN=igv=KP4p~5|Li>bJJfu%meU`RBGm=nqK8848=oOU-Zc4zs~5-+ zM?#~}MdL|2fap!67}{z%cd%kaB6Fw@LmQkZs7t=F^No-GkY0ZD@<%S8d(*tSaP_Lg zA^FDa8)tqaI|khgp;WFVIS_ugD2&Ng3la?s-i&I*A;ZJkzZ_R8|BL^QJ%00cgG8T14Rv-|lTj8(;o z^O69uNtCpZG|7@K(gW&ZC|yBP|DQQMF+Tp6zwhOH#>dAui?n+6>M0}#Mp=xHERc(w zv%`+;S=FXl`s$IXZ_pJ}^z@O<$TwqfPmyo%$JqtQNodMspdcaxBfx^=)01O_bMk->ysY!?IWTuq^4fcdse8ELpX+#4h05m)kV5RR6Y1`LwEj zT5)|_UplfW2eKuQhtrRdukmy2W$319aeu|a024h3&6EP^Qn7>-Du&pTf>LlT-6it7 zwoXlb;0uMq!%Nu9D3$89PTo5*QvGo8>Edfe!stoz9RCFS7D?S1gn( zcDR7?^<~>rnNnZ5SO|xL3jf5xpxrjOxhKDQpuK%ybH065?2zP^Qj%1CZPh*ZtU~(n z!T8Ederm9-ZEz}&yxk5Rl7L}I8>hzv&e${|E*d9)B^m7N#J~7F3m^&yziC5sfdeShx3>BEL&jRIecHus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Ag%f4b+)$@ig8lopn%k)+s2t`dV z-5u~-i&w1M7#|qpG?6fUEWC=bbSIN4)s$sLell$;^! z_)%WMeKumYx36S=w13y>sj1Uq>D6+2aVZ9>@V&UdsK~kV7*$W|Puf;lYj>z(sbX=8 zlQAs$3M&2wSc*IGVBB$1;b4g0T*zT!dtj9{`AJ!kWGq{Np%7qUg#jM}$Rvl5#erFq zH#&qRAnnddSkDqjx|9`?(y?oBUE`NP#Nyw(^19-c*Myw;5hF|vZvI1hw|C{wi5mt9 z&v%Y~{K@M%Mt=-ZxA;#`+$D(zvAFZU8Id~#D%Jmu6mb1%t7)oXLJas7iO~Cz06Xa< zXp3?O{V3AMkWL}Rq4E33Q%Hio4Cye^ais5p|BH}q6}pi`YYn7_>aYvBf+Wh~NZXOl z)NuMKkVPCD#6KS0*qxL3r{Qzt1@aS`p}UyD&PfUBh}bHXDfg)ls$bCtv={XQ z`k%Q@yRNw3>HfCyPUAk~Sr7g%5&b7^)W8jucp9VPAoY()KJRb|UKKPUAvjgkTZ6^F zVC6b20X|xXW#|5*#-o6~u1 Date: Tue, 13 Dec 2016 13:45:48 +0100 Subject: [PATCH 13/33] Delete h5p-core-15.eot --- fonts/h5p-core-15.eot | Bin 5168 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 fonts/h5p-core-15.eot diff --git a/fonts/h5p-core-15.eot b/fonts/h5p-core-15.eot deleted file mode 100644 index 5a51b7221e45d6e34ce98293705d05ca207b6a73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5168 zcma)A32a=)d7kUdylaoQ+}%emce%@5a#y6NCAp`qi=r)2icKPk4oihB)RaVtu@0)D z1W2x3E0LW;G88pFRm5=+H$_{tX@jC^k=llu7y*K`sUf5dTEGR;#;L3zZ4tmlkV30| z^L9y*wuAKH&CLJ*^Upv3oZrlh#R>Uh7a^1|vihUsD%FzdkFAz#-S&6rjVE7!e;y%{ z%#%7fg^V!SN#@8=a+Vw?v*a`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`9rsa}pb~X{D;&rsp`GGGmtQVDsXf(r0^Pu~Z6yb1zaDIMB30 za_Z!iFpc8=kQoU~aB9b^53Y-sx>A)ChQYKv%PHBt^w^>H~t?P9cUbwMN@79kaKa3kwTP zYFnW-X`wha{A51l#~E$Q88@7AkxPMHJhv`v>D?U5(y~Kq0TuwjkV^L1rpZS3?%Ov) zsbhzRv&g{SFH!{u`Xl@H?Hy_Tw0fk=&L9liknt43K$Rd zgc3PBxpf%$9LgbXbH2x%Tc%hw<*BAiF~A@skFvi-}pZ4$@LZUncgY22v( z7_T`$r$u^%x$LUw6K9NWt<#qFJ4m}- z3^(~p9XZEM2I*nQ4wCbTKSB;cYX(8To|PY(JH7acg_F7Q^7w~8tS#5O aOzfOHdiMD2>D4cD%em-TzOsuyNdF)4)VB)& From c442300cabf6af5cc272547cd67b94520a7cbcda Mon Sep 17 00:00:00 2001 From: jelenamilinovic Date: Tue, 13 Dec 2016 13:45:55 +0100 Subject: [PATCH 14/33] Delete h5p-core-15.svg --- fonts/h5p-core-15.svg | 46 ------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 fonts/h5p-core-15.svg diff --git a/fonts/h5p-core-15.svg b/fonts/h5p-core-15.svg deleted file mode 100644 index 3a440df..0000000 --- a/fonts/h5p-core-15.svg +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - -{ - "fontFamily": "h5p", - "description": "Font generated by IcoMoon.", - "majorVersion": 1, - "minorVersion": 1, - "version": "Version 1.1", - "fontId": "h5p", - "psName": "h5p", - "subFamily": "Regular", - "fullName": "h5p" -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 26cedf7d70c088f4d5c64af241ad96d2a429e7ee Mon Sep 17 00:00:00 2001 From: jelenamilinovic Date: Tue, 13 Dec 2016 13:45:58 +0100 Subject: [PATCH 15/33] Delete h5p-core-15.ttf --- fonts/h5p-core-15.ttf | Bin 5020 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 fonts/h5p-core-15.ttf diff --git a/fonts/h5p-core-15.ttf b/fonts/h5p-core-15.ttf deleted file mode 100644 index d3a9a27a77cabd64a96df07d6f000077fd64c3c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5020 zcma)A32a=)d7kUdylaoQ+}%emcga1-U6G=e?F= zAh~v;M0O6zP}KNT0mng{6m8L_4T`2k>KJNb1PIcmhLAQ$00+q7L{^Zt2;d?}p;f5;=HW)|Q0<&y)1 z&@}ib=Vq1`QAWXk7Nt3N{M^y6JT-R?{9h0fIX*u-bHsK2=^aA6IO-eo5SXUH!0!Y< zFn{9o*+XCN_P}dDj~rh(Jd^vc%%{P>0lso#=IkOFq+vp00(|!5%!%2jf8rv-n2zD0 z#f7EQh!aoO3k{h3Z{PNo*kki{gPQ9Eun=<{6`XBMn`w941-F9Hu$ta=l6j@b|@oe53sNb>q zU9y|h;7Qg?px2e7H`z$*ChKk8L>rVoK`ycj?0H=`=z*p3B6C~64(bT);e_qgV{B1X zQYD5!HopG)Mz;5MP{JNBbT(-n>RYtwv)4D?Cc2t!0-^Qc%cU1cl0Cs6MPC)ZxCrSY zKItX>q(Dk!Eg6M%HBo3Hso%4t7q)Nz```8QN4Ia^zE`ImJ9g|r3TW`Uf8-YV5$Ei5 z5PM1av_!vgX3sb2rako1nY}3YqH`~hZ}Ml@HN;71KFkvFKIYd8`Qij^RQhRBuBD01 zyk0A_0(-W0a9gRb@xaJFOBf$BBJwFiSo=mEX!NhycCgN_A+MEp-?z^Cwk^M))EA`v zZEM|qyUQ?JgLpW7k$jCm%U;9Sbgyo&TG`BW3wmVgU4?qJj+Ce-*z?*_d#yjL%ZCr{ z+4JEqRw^G`!(Ibd??{7k{J#5IPgP&8Uat~HKTiIUzr_BH^pRoAdTBEa;_vjXT4^-> zWCi`Jl?L<0daY5dBolGTUpf`{2PXE8j_ut%IJkN5*xb{lt=hhAVc>Olh5|8A5EDAzu|P`#N#4f(m3ESx>f-50C@o5i*NW zZWKppUM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uDz*BoyxAaeDs}Im0(_j#I!^gwO^txr{16ur}(IvC7M= zRBSZcFccgI5TXW_&9sV@(t-M-q$9OQhSv7mOvvpgwhNQ@rOWBj_>Mo`Vc2Tju1Rdn zrj@F8o1Wu%%8XgIgUyR`N}uVC#ZoCG&b>%s;9%1V$*Gf5!ZeBpLS`gz!KoduKDaJk z>Pl5om%~$ug)?!ETw*_9?~wb+Me;8=tq$|TMx0mmxm1HI z-mx0KgAV%E8uj(O8c!xxFuM{TuO!FYFbQD^#>?7u?P%Ex9D#**7%xL{BE9PHgpUp^ zywmlx3TFA$N^OHQ^#Q@{ppYY$TB9A8&e@yIg@uJCwXM*av``!yelj2O=qs=e#Z4<21&oJ!LW!)M+&T<=j%LC=rLdXuxGBQv zP*>V99Aze4y`ND+ZeJ4wH+6jvi_1dJi{t8rW$xwj!B$nxd9}s{imQs3Lng>jrgeQd z{d8uibv-jQl%eH-q2~+v=URaPj@KuYUNo!+#Xn_zrP|mXh!6Ubk?kL^M-~ z2LD0y%{h1wWAHzL7(<#DQ#$Iqp6<4%woIFWzbOcP0ts}GER2qzpX% z5M>@o%hw<+A)Q0|F7&?y+uVw8o5XRm8^Nt=CvH@Kg}*t!q(yp^x$KJQ6Q_-CW6}6e z8I_N#^Xkh8LPyz6T_CQ0mU|O0oh(eg*y&6AKS;Y@3^)0U9XZEMy&LMvvISj37B&}P1X!g|72NzCe$IIj7p}=5?d@!iWl5tWd<16j15W8mQ&K#dP ZMRq}bj+`OK(Z;EjT8u1TJ;d*&{~z6zsn-Ai From 1058dab02d9ffbdbc2a2dd9c6f5ca0512d766740 Mon Sep 17 00:00:00 2001 From: jelenamilinovic Date: Tue, 13 Dec 2016 13:46:02 +0100 Subject: [PATCH 16/33] Delete h5p-core-15.woff --- fonts/h5p-core-15.woff | Bin 5096 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 fonts/h5p-core-15.woff diff --git a/fonts/h5p-core-15.woff b/fonts/h5p-core-15.woff deleted file mode 100644 index fa8d5b067ca91876764dca20068333248065fb86..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5096 zcma)A3v3+6d7jtK?CTzTyt^fjcf1#QCsNdryr-=fMO&g2TZ9umEETd)Q4&SQdQcT5 zRC43SiR>h`3`LEfD(V=BlK?H+v_X&uQpHdcBWRE|4TQ8o3%EeqIF*&AErPlTQs~rg z_Kphkg ziOD}Za&q=GbPJH5)b!n-J~=o)yQFph23gx`iq4<7a16TtA|!G`(^sFGzpyYjdz29G z5bB$nT<0rqFF*<1OOOXOnWn)OPM$pv-8IOEG#&m%uXkec2<&2M$jFIQ^Z%at#L3z7 zXgBs=$hm-qX!z9Z$vNnBJ`Zbp=7%mly|{E1{r#&II}VPEi}VUH2w_**Uqk+Q=ShD| zYSed_a&I1c z^W#6FH=n-w%+2TCVs~!exr2HF{oI?Ee?)G64EoD&kw8!H{7dSU)cKU@f7t(!|Ae3D zMhzU^RbXBbDH62WsbYk*?hR7CoA0mF-J%9hvVH=)o;#uKQd+!8K_~VAnCT&A~i?)3B`o=p% zSF=rEv^`?E^dd>J$N8h^tHN6wAw9$={Ul3@q)gV5F?iP!#TH2YKcDpC_U&KzbvJ)> z`}Xa7HSO53V-G0cA?yB;+vJ})XJ>=l%gU!^`pt8DzC}0fp_k6>#d9w@_agZgf0kWG zo`e>{ED;}Iexq0@P10sHOOtXfO>E|kdW99)bM=GU$^*>@M)z65_=pjaPZ`46H~K&` zyJp+L2D^^3UfF%$I_o>O{ESkck@k12b@%PAz-0y1iO;Gt({T zk!kc48?^=~QA@BFw5N{Rctk%RIk;!f2R~P>eq;@M4N{}44W1MC-PeAq_DbzWjWGIA z@@4)q`x`PqMlkE;%{0ir+q+t|+47TB^sinXDwG=aX04h`#3g_EOxz!w+&ebDck|HD z=Dp)X+tN$I5d|UIH?|!xZvULgcA5T3dyjr+$PXwH)9eYdhTKCQ!RS>e z-pHcbOk2$)CJv*Bxx=98yVlT?i|KBb%8=Jm$jcT+L8@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Yw!n%9(LU$Vnt`_k_z;~*Sxg}?xXE^CL&%3AUq*YjM*LtiNUKIMEDdptP9 zt(-kp&L%5om*rCy``6=2jjOmiaU8|CQpdaU@e>`HUO%o9YOGT+1{MbIka2qdJUPcV zaE?>JR;17YF}aK?K(G$#Rj|q{tXyigIxrL*2auu$md&(=mC}X!lBA>cL&IycHWPCD z$?d}A1L;b7EWYEnb{Mu=w`&R;vuUMjy{6|lo-$*W?O^lboYH6eW3f~U#JLwK4jyb- zAvt|&T9`)ZK*)>)Avm?;wFlS5%RQ-T3e#X(p5>J7{zgAzw{OJy`@L9-rf??ClS}NM z*xTfO@-+ENoK{D8aU;&F`dq5P758`@??D%R>&?b`UW+FaE0|r4PgIi=9hii&4CiI* zh7PnG1%V(UI-HlGIFVj;c*08u5z*;-T7$5BYom@sn)-m?PEsh5OTF32OPB18*5cw~ zi`rIbOQsPoz7tgH=TY5Lgvb5~bT7U%rFr<@FHz3yls&LMU7kvDi8`FcMpC1*b?nIC`#1JC4-^oOvc7F2ea&>Z7+GsrBGXI_ z-HQV?bNfP=bIh$bk@3fSRahxkr5mYYBZ8zusSuEh3GUT$se97G6!cYihvKG{i~`0( zeW66oPHr6mK1Va*zH-=1dE6A?bf_oo7>+U%uHMfmA$P6|f-iOb9Tu0xycfr(7nZq~ zF9cgvE$`Kv8z??iygUj)hBNIOBk5-{!|fZH;o%Ie1OlyOhUsI!MA~B5d-3^(QBMG{$57q2h7-Sd$%|Lw~-@W17e-UEaWczOTzm=s(ouZIU7uWGXCZbWMk6Busw4%j-WYztiOf z_)m3t17D4YyS#+{$u4h`Iw>wRPUF{1gPfjTJaslVKX+>G%2^IJ3BT zszRp8A~{9Qk{p@G2j?l!88QobjvR&VFu8#8J>&?iW Date: Tue, 13 Dec 2016 15:57:05 +0100 Subject: [PATCH 17/33] Fixed download/embed button bug when permissions are used --- h5p.classes.php | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/h5p.classes.php b/h5p.classes.php index ddb48b6..d32ee12 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2516,6 +2516,30 @@ class H5PCore { return $display_options; } + /** + * Helper function used to figure out embed & download behaviour + * + * @method setDisplayOptionOverrides + * @param string $option_name + * @param H5PPermission $permission + * @param int $id + * @param bool &$value + */ + private function setDisplayOptionOverrides($option_name, $permission, $id, &$value) { + $behaviour = $this->h5pF->getOption($option_name, H5PDisplayOptionBehaviour::ALWAYS_SHOW); + // If never show globally, force hide + if ($behaviour == H5PDisplayOptionBehaviour::NEVER_SHOW) { + $value = false; + } + elseif ($behaviour == H5PDisplayOptionBehaviour::ALWAYS_SHOW) { + // If always show or permissions say so, force show + $value = true; + } + elseif ($behaviour == H5PDisplayOptionBehaviour::CONTROLLED_BY_PERMISSIONS) { + $value = $this->h5pF->hasPermission($permission, $id); + } + } + /** * Determine display option visibility when viewing H5P * @@ -2532,25 +2556,8 @@ class H5PCore { $display_options['showFrame'] = false; } else { - $export = $this->h5pF->getOption('export', H5PDisplayOptionBehaviour::ALWAYS_SHOW); - if ($export == H5PDisplayOptionBehaviour::NEVER_SHOW) { - // If never show globally, force hide - $display_options['showDownload'] = false; - } - elseif ($export == H5PDisplayOptionBehaviour::ALWAYS_SHOW || ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_PERMISSIONS && $this->h5pF->hasPermission(H5PPermission::DOWNLOAD_H5P, $id))) { - // If always show or permissions say so, force show - $display_options['showDownload'] = true; - } - - $embed = $this->h5pF->getOption('embed', H5PDisplayOptionBehaviour::ALWAYS_SHOW); - if ($embed == H5PDisplayOptionBehaviour::NEVER_SHOW) { - // If never show globally, force hide - $display_options['showEmbed'] = false; - } - elseif ($embed == H5PDisplayOptionBehaviour::ALWAYS_SHOW || ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_PERMISSIONS && $this->h5pF->hasPermission(H5PPermission::EMBED_H5P, $id))) { - // If always show or permissions say so, force show - $display_options['showEmbed'] = true; - } + $this->setDisplayOptionOverrides('export', H5PPermission::DOWNLOAD_H5P, $id, $display_options['showDownload']); + $this->setDisplayOptionOverrides('embed', H5PPermission::EMBED_H5P, $id, $display_options['showEmbed']); if ($this->h5pF->getOption('copyright', TRUE) == FALSE) { $display_options['showCopyright'] = false; From f0d65d4f9d9af7bfdd613fa4cdc75b67f0bb4028 Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Tue, 13 Dec 2016 16:04:57 +0100 Subject: [PATCH 18/33] Refactor canHasFullscreen HFP-339 --- js/h5p.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/h5p.js b/js/h5p.js index 559b80b..b49f412 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -103,7 +103,7 @@ H5P.init = function (target) { * @deprecated since version 1.11 * @type {boolean} */ - H5P.canHasFullScreen = (H5P.isFramed && H5P.externalEmbed !== false) ? ((document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled) ? true : false) : true; + H5P.canHasFullScreen = HFP.fullscreenSupported; } // H5Ps added in normal DIV. From bbe16fb8daf38b2fac32df0889d98c1c31cd8ea5 Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Tue, 13 Dec 2016 19:46:21 +0100 Subject: [PATCH 19/33] Revert changes for canHasFullScreen HFP-339 --- js/h5p.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/h5p.js b/js/h5p.js index b49f412..559b80b 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -103,7 +103,7 @@ H5P.init = function (target) { * @deprecated since version 1.11 * @type {boolean} */ - H5P.canHasFullScreen = HFP.fullscreenSupported; + H5P.canHasFullScreen = (H5P.isFramed && H5P.externalEmbed !== false) ? ((document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled) ? true : false) : true; } // H5Ps added in normal DIV. From 5a272ea2f1f024a7164e0bb4a5f675cb1a6f1509 Mon Sep 17 00:00:00 2001 From: Andreas Nergaard Date: Wed, 14 Dec 2016 09:32:57 +0100 Subject: [PATCH 20/33] Fixed broken font referrance and metadata after font update. --- fonts/h5p-core-16.svg | 20 ++++++++++++++++++-- styles/h5p.css | 10 +++++----- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/fonts/h5p-core-16.svg b/fonts/h5p-core-16.svg index 1240927..d0bdb88 100644 --- a/fonts/h5p-core-16.svg +++ b/fonts/h5p-core-16.svg @@ -1,7 +1,23 @@ -Generated by IcoMoon + + + +{ + "fontFamily": "h5p", + "description": "Font generated by IcoMoon.", + "majorVersion": 1, + "minorVersion": 1, + "version": "Version 1.1", + "fontId": "h5p", + "psName": "h5p", + "subFamily": "Regular", + "fullName": "h5p" +} + + + @@ -39,4 +55,4 @@ - \ No newline at end of file + diff --git a/styles/h5p.css b/styles/h5p.css index 35538c7..2e5842e 100644 --- a/styles/h5p.css +++ b/styles/h5p.css @@ -3,11 +3,11 @@ /* Custom H5P font to use for icons. */ @font-face { font-family: 'h5p'; - src: url('../fonts/h5p-core-15.eot?1a4hhb'); - src: url('../fonts/h5p-core-15.eot?1a4hhb#iefix') format('embedded-opentype'), - url('../fonts/h5p-core-15.ttf?1a4hhb') format('truetype'), - url('../fonts/h5p-core-15.woff?1a4hhb') format('woff'), - url('../fonts/h5p-core-15.svg?1a4hhb#h5p-core-15') format('svg'); + src: url('../fonts/h5p-core-16.eot?80e76o'); + src: url('../fonts/h5p-core-16.eot?80e76o#iefix') format('embedded-opentype'), + url('../fonts/h5p-core-16.ttf?80e76o') format('truetype'), + url('../fonts/h5p-core-16.woff?80e76o') format('woff'), + url('../fonts/h5p-core-16.svg?80e76o#h5p-core-15') format('svg'); font-weight: normal; font-style: normal; } From 28e34c1c093815aa0243581a17d9c2ecf13b3859 Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Wed, 14 Dec 2016 16:21:42 +0100 Subject: [PATCH 21/33] Simplify fullscreenSupported HFP-339 --- js/h5p.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index 559b80b..7e5c068 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -92,7 +92,7 @@ H5P.init = function (target) { * fullscreen, and the semi-fullscreen solution doesn't work when embedded. * @type {boolean} */ - H5P.fullscreenSupported = (H5P.isFramed && H5P.externalEmbed !== false) ? ((document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled) ? true : false) : true; + H5P.fullscreenSupported = !(H5P.isFramed && H5P.externalEmbed !== false) || !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled); // We should consider document.msFullscreenEnabled when they get their // element sizing corrected. Ref. https://connect.microsoft.com/IE/feedback/details/838286/ie-11-incorrectly-reports-dom-element-sizes-in-fullscreen-mode-when-fullscreened-element-is-within-an-iframe } @@ -103,7 +103,7 @@ H5P.init = function (target) { * @deprecated since version 1.11 * @type {boolean} */ - H5P.canHasFullScreen = (H5P.isFramed && H5P.externalEmbed !== false) ? ((document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled) ? true : false) : true; + H5P.canHasFullScreen = H5P.fullscreenSupported; } // H5Ps added in normal DIV. From 526d7ddd7e211eaa425bca6cf7b1ef5b6e5dff0b Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Fri, 16 Dec 2016 11:30:59 +0100 Subject: [PATCH 22/33] Made copyright button being shown [HFP-277] --- js/h5p-action-bar.js | 2 +- js/h5p.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/h5p-action-bar.js b/js/h5p-action-bar.js index a80ef60..8d30101 100644 --- a/js/h5p-action-bar.js +++ b/js/h5p-action-bar.js @@ -48,7 +48,7 @@ H5P.ActionBar = (function ($, EventDispatcher) { // Add export button addActionButton('download', 'export'); } - if (displayOptions.showCopyrights) { + if (displayOptions.showCopyright) { addActionButton('copyrights'); } if (displayOptions.showEmbed) { diff --git a/js/h5p.js b/js/h5p.js index 5fe8c78..4af85e9 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -135,10 +135,10 @@ H5P.init = function (target) { var displayOptions = contentData.displayOptions; if (displayOptions.showFrame) { // Special handling of copyrights - if (displayOptions.showCopyrights) { + if (displayOptions.showCopyright) { var copyrights = H5P.getCopyrights(instance, library.params, contentId); if (!copyrights) { - displayOptions.showCopyrights = false; + displayOptions.showCopyright = false; } } From a1e68d212b907c58aa5e300cafa3cadeb0e4d771 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Fri, 16 Dec 2016 11:38:47 +0100 Subject: [PATCH 23/33] Updated comments [HFP-277] --- h5p.classes.php | 28 ++++++++++++---------------- js/h5p-action-bar.js | 12 ++++++++++++ 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/h5p.classes.php b/h5p.classes.php index d32ee12..7a71041 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2488,9 +2488,8 @@ class H5PCore { /** * Determine display options visibility and value on edit * - * @method getDisplayOptionsForEdit - * @param [int] $disable - * @return [Array] + * @param int $disable + * @return array */ public function getDisplayOptionsForEdit($disable = NULL) { $display_options = []; @@ -2519,11 +2518,10 @@ class H5PCore { /** * Helper function used to figure out embed & download behaviour * - * @method setDisplayOptionOverrides - * @param string $option_name - * @param H5PPermission $permission - * @param int $id - * @param bool &$value + * @param string $option_name + * @param H5PPermission $permission + * @param int $id + * @param bool &$value */ private function setDisplayOptionOverrides($option_name, $permission, $id, &$value) { $behaviour = $this->h5pF->getOption($option_name, H5PDisplayOptionBehaviour::ALWAYS_SHOW); @@ -2543,11 +2541,10 @@ class H5PCore { /** * Determine display option visibility when viewing H5P * - * @method getDisplayOptionsForView - * @param [int] $display_options - * @param [int] $id Might be content id or user id. - * Depends on what the platform needs to be able to determine permissions. - * @return [Array] + * @param int $display_options + * @param int $id Might be content id or user id. + * Depends on what the platform needs to be able to determine permissions. + * @return array */ public function getDisplayOptionsForView($disable, $id) { $display_options = $this->getDisplayOptionsAsArray($disable); @@ -2570,9 +2567,8 @@ class H5PCore { /** * Convert display options as single byte to array * - * @method getDisplayOptionsAsArray - * @param [int] $disable - * @return [Array] + * @param int $disable + * @return array */ private function getDisplayOptionsAsArray($disable) { return array( diff --git a/js/h5p-action-bar.js b/js/h5p-action-bar.js index 8d30101..aba17e3 100644 --- a/js/h5p-action-bar.js +++ b/js/h5p-action-bar.js @@ -60,10 +60,22 @@ H5P.ActionBar = (function ($, EventDispatcher) { hasActions = true; } + /** + * Returns a reference to the dom element + * + * @method getDOMElement + * @return {H5P.jQuery} + */ self.getDOMElement = function () { return $actions; }; + /** + * Does the actionbar contain actions? + * + * @method hasActions + * @return {Boolean} + */ self.hasActions = function () { return hasActions; } From ea0362c3da73e5a3d5aa3b731a22adbc7f4890b8 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Fri, 16 Dec 2016 13:27:40 +0100 Subject: [PATCH 24/33] Making lines shorter [HFP-277] --- h5p.classes.php | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/h5p.classes.php b/h5p.classes.php index 7a71041..302242e 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2499,16 +2499,32 @@ class H5PCore { if ($this->h5pF->getOption('frame', TRUE)) { $display_options['frame'] = isset($current_display_options['showFrame']) ? $current_display_options['showFrame'] : TRUE; + // Download $export = $this->h5pF->getOption('export', H5PDisplayOptionBehaviour::ALWAYS_SHOW); - if ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON || $export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) { - $display_options['download'] = isset($current_display_options['showDownload']) ? $current_display_options['showDownload'] : ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON); + if ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON || + $export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) { + $display_options['download'] = + isset($current_display_options['showDownload']) ? + $current_display_options['showDownload'] : + ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON); } + + // Embed $embed = $this->h5pF->getOption('embed', H5PDisplayOptionBehaviour::ALWAYS_SHOW); - if ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON || $embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) { - $display_options['embed'] = isset($current_display_options['showEmbed']) ? $current_display_options['showEmbed'] : ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON); + if ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON || + $embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) { + $display_options['embed'] = + isset($current_display_options['showEmbed']) ? + $current_display_options['showEmbed'] : + ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON); } + + // Copyright if ($this->h5pF->getOption('copyright', TRUE)) { - $display_options['copyright'] = isset($current_display_options['showCopyright']) ? $current_display_options['showCopyright'] : TRUE; + $display_options['copyright'] = + isset($current_display_options['showCopyright']) ? + $current_display_options['showCopyright'] : + TRUE; } } From 7b39a6900c5ca330dabd14a123ee070b67c674d5 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Fri, 16 Dec 2016 13:29:18 +0100 Subject: [PATCH 25/33] Inheriting global disable setting for export & embed when saving [HFP-277] --- h5p.classes.php | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/h5p.classes.php b/h5p.classes.php index 302242e..08f2a8e 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2465,21 +2465,33 @@ class H5PCore { } /** - * Determine disable state from sources. + * Create representation of display options as int * * @param array $sources * @param int $current * @return int */ - public function getDisplayOptionsAsByte(&$sources, $current) { + public function getStorableDisplayOptions(&$sources, $current) { + // Download - force setting it if always on or always off + $export = $this->h5pF->getOption('export', H5PDisplayOptionBehaviour::ALWAYS_SHOW); + if ($export == H5PDisplayOptionBehaviour::ALWAYS_SHOW || + $export == H5PDisplayOptionBehaviour::NEVER_SHOW) { + $sources['download'] = ($export == H5PDisplayOptionBehaviour::ALWAYS_SHOW); + } + + // Embed - force setting it if always on or always off + $embed = $this->h5pF->getOption('embed', H5PDisplayOptionBehaviour::ALWAYS_SHOW); + if ($embed == H5PDisplayOptionBehaviour::ALWAYS_SHOW || + $embed == H5PDisplayOptionBehaviour::NEVER_SHOW) { + $sources['embed'] = ($embed == H5PDisplayOptionBehaviour::ALWAYS_SHOW); + } + foreach (H5PCore::$disable as $bit => $option) { - if ($this->h5pF->getOption(($bit & H5PCore::DISABLE_DOWNLOAD ? 'export' : $option), TRUE)) { - if (!isset($sources[$option]) || !$sources[$option]) { - $current |= $bit; // Disable - } - else { - $current &= ~$bit; // Enable - } + if (!isset($sources[$option]) || !$sources[$option]) { + $current |= $bit; // Disable + } + else { + $current &= ~$bit; // Enable } } return $current; From 87ec43d687f21903b5332ee853ede13adcfed7e0 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Fri, 16 Dec 2016 14:22:03 +0100 Subject: [PATCH 26/33] Using constants for the different display options, and avoid special cases [HFP-277] --- h5p.classes.php | 79 ++++++++++++++++++++++++-------------------- js/h5p-action-bar.js | 8 ++--- js/h5p.js | 8 ++--- 3 files changed, 52 insertions(+), 43 deletions(-) diff --git a/h5p.classes.php b/h5p.classes.php index 08f2a8e..72d84b6 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -1738,12 +1738,18 @@ class H5PCore { const DISABLE_COPYRIGHT = 8; const DISABLE_ABOUT = 16; + const DISPLAY_OPTION_FRAME = 'frame'; + const DISPLAY_OPTION_DOWNLOAD = 'export'; + const DISPLAY_OPTION_EMBED = 'embed'; + const DISPLAY_OPTION_COPYRIGHT = 'copyright'; + const DISPLAY_OPTION_ABOUT = 'icon'; + // Map flags to string public static $disable = array( - self::DISABLE_FRAME => 'frame', - self::DISABLE_DOWNLOAD => 'download', - self::DISABLE_EMBED => 'embed', - self::DISABLE_COPYRIGHT => 'copyright' + self::DISABLE_FRAME => self::DISPLAY_OPTION_FRAME, + self::DISABLE_DOWNLOAD => self::DISPLAY_OPTION_DOWNLOAD, + self::DISABLE_EMBED => self::DISPLAY_OPTION_EMBED, + self::DISABLE_COPYRIGHT => self::DISPLAY_OPTION_COPYRIGHT ); /** @@ -2473,17 +2479,17 @@ class H5PCore { */ public function getStorableDisplayOptions(&$sources, $current) { // Download - force setting it if always on or always off - $export = $this->h5pF->getOption('export', H5PDisplayOptionBehaviour::ALWAYS_SHOW); - if ($export == H5PDisplayOptionBehaviour::ALWAYS_SHOW || - $export == H5PDisplayOptionBehaviour::NEVER_SHOW) { - $sources['download'] = ($export == H5PDisplayOptionBehaviour::ALWAYS_SHOW); + $download = $this->h5pF->getOption(self::DISPLAY_OPTION_DOWNLOAD, H5PDisplayOptionBehaviour::ALWAYS_SHOW); + if ($download == H5PDisplayOptionBehaviour::ALWAYS_SHOW || + $download == H5PDisplayOptionBehaviour::NEVER_SHOW) { + $sources[self::DISPLAY_OPTION_DOWNLOAD] = ($download == H5PDisplayOptionBehaviour::ALWAYS_SHOW); } // Embed - force setting it if always on or always off - $embed = $this->h5pF->getOption('embed', H5PDisplayOptionBehaviour::ALWAYS_SHOW); + $embed = $this->h5pF->getOption(self::DISPLAY_OPTION_EMBED, H5PDisplayOptionBehaviour::ALWAYS_SHOW); if ($embed == H5PDisplayOptionBehaviour::ALWAYS_SHOW || $embed == H5PDisplayOptionBehaviour::NEVER_SHOW) { - $sources['embed'] = ($embed == H5PDisplayOptionBehaviour::ALWAYS_SHOW); + $sources[self::DISPLAY_OPTION_EMBED] = ($embed == H5PDisplayOptionBehaviour::ALWAYS_SHOW); } foreach (H5PCore::$disable as $bit => $option) { @@ -2508,34 +2514,37 @@ class H5PCore { $current_display_options = $disable === NULL ? [] : $this->getDisplayOptionsAsArray($disable); - if ($this->h5pF->getOption('frame', TRUE)) { - $display_options['frame'] = isset($current_display_options['showFrame']) ? $current_display_options['showFrame'] : TRUE; + if ($this->h5pF->getOption(self::DISPLAY_OPTION_FRAME, TRUE)) { + $display_options[self::DISPLAY_OPTION_FRAME] = + isset($current_display_options[self::DISPLAY_OPTION_FRAME]) ? + $current_display_options[self::DISPLAY_OPTION_FRAME] : + TRUE; // Download - $export = $this->h5pF->getOption('export', H5PDisplayOptionBehaviour::ALWAYS_SHOW); + $export = $this->h5pF->getOption(self::DISPLAY_OPTION_DOWNLOAD, H5PDisplayOptionBehaviour::ALWAYS_SHOW); if ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON || $export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) { - $display_options['download'] = - isset($current_display_options['showDownload']) ? - $current_display_options['showDownload'] : + $display_options[self::DISPLAY_OPTION_DOWNLOAD] = + isset($current_display_options[self::DISPLAY_OPTION_DOWNLOAD]) ? + $current_display_options[self::DISPLAY_OPTION_DOWNLOAD] : ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON); } // Embed - $embed = $this->h5pF->getOption('embed', H5PDisplayOptionBehaviour::ALWAYS_SHOW); + $embed = $this->h5pF->getOption(self::DISPLAY_OPTION_EMBED, H5PDisplayOptionBehaviour::ALWAYS_SHOW); if ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON || $embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) { - $display_options['embed'] = - isset($current_display_options['showEmbed']) ? - $current_display_options['showEmbed'] : + $display_options[self::DISPLAY_OPTION_EMBED] = + isset($current_display_options[self::DISPLAY_OPTION_EMBED]) ? + $current_display_options[self::DISPLAY_OPTION_EMBED] : ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON); } // Copyright - if ($this->h5pF->getOption('copyright', TRUE)) { - $display_options['copyright'] = - isset($current_display_options['showCopyright']) ? - $current_display_options['showCopyright'] : + if ($this->h5pF->getOption(self::DISPLAY_OPTION_COPYRIGHT, TRUE)) { + $display_options[self::DISPLAY_OPTION_COPYRIGHT] = + isset($current_display_options[self::DISPLAY_OPTION_COPYRIGHT]) ? + $current_display_options[self::DISPLAY_OPTION_COPYRIGHT] : TRUE; } } @@ -2577,15 +2586,15 @@ class H5PCore { public function getDisplayOptionsForView($disable, $id) { $display_options = $this->getDisplayOptionsAsArray($disable); - if ($this->h5pF->getOption('frame', TRUE) == FALSE) { - $display_options['showFrame'] = false; + if ($this->h5pF->getOption(self::DISPLAY_OPTION_FRAME, TRUE) == FALSE) { + $display_options[self::DISPLAY_OPTION_FRAME] = false; } else { - $this->setDisplayOptionOverrides('export', H5PPermission::DOWNLOAD_H5P, $id, $display_options['showDownload']); - $this->setDisplayOptionOverrides('embed', H5PPermission::EMBED_H5P, $id, $display_options['showEmbed']); + $this->setDisplayOptionOverrides(self::DISPLAY_OPTION_DOWNLOAD, H5PPermission::DOWNLOAD_H5P, $id, $display_options[self::DISPLAY_OPTION_DOWNLOAD]); + $this->setDisplayOptionOverrides(self::DISPLAY_OPTION_EMBED, H5PPermission::EMBED_H5P, $id, $display_options[self::DISPLAY_OPTION_EMBED]); - if ($this->h5pF->getOption('copyright', TRUE) == FALSE) { - $display_options['showCopyright'] = false; + if ($this->h5pF->getOption(self::DISPLAY_OPTION_COPYRIGHT, TRUE) == FALSE) { + $display_options[self::DISPLAY_OPTION_COPYRIGHT] = false; } } @@ -2600,11 +2609,11 @@ class H5PCore { */ private function getDisplayOptionsAsArray($disable) { return array( - 'showFrame' => !($disable & H5PCore::DISABLE_FRAME), - 'showDownload' => !($disable & H5PCore::DISABLE_DOWNLOAD), - 'showEmbed' => !($disable & H5PCore::DISABLE_EMBED), - 'showCopyright' => !($disable & H5PCore::DISABLE_COPYRIGHT), - 'showAbout' => $this->h5pF->getOption('icon', TRUE), + self::DISPLAY_OPTION_FRAME => !($disable & H5PCore::DISABLE_FRAME), + self::DISPLAY_OPTION_DOWNLOAD => !($disable & H5PCore::DISABLE_DOWNLOAD), + self::DISPLAY_OPTION_EMBED => !($disable & H5PCore::DISABLE_EMBED), + self::DISPLAY_OPTION_COPYRIGHT => !($disable & H5PCore::DISABLE_COPYRIGHT), + self::DISPLAY_OPTION_ABOUT => $this->h5pF->getOption(self::DISPLAY_OPTION_ABOUT, TRUE), ); } diff --git a/js/h5p-action-bar.js b/js/h5p-action-bar.js index aba17e3..8e34eb7 100644 --- a/js/h5p-action-bar.js +++ b/js/h5p-action-bar.js @@ -44,17 +44,17 @@ H5P.ActionBar = (function ($, EventDispatcher) { }; // Register action bar buttons - if (displayOptions.showDownload) { + if (displayOptions.export) { // Add export button addActionButton('download', 'export'); } - if (displayOptions.showCopyright) { + if (displayOptions.copyright) { addActionButton('copyrights'); } - if (displayOptions.showEmbed) { + if (displayOptions.embed) { addActionButton('embed'); } - if (displayOptions.showAbout) { + if (displayOptions.icon) { // Add about H5P button icon H5P.jQuery('
        • ').appendTo($actions); hasActions = true; diff --git a/js/h5p.js b/js/h5p.js index 4af85e9..a080ebf 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -133,12 +133,12 @@ H5P.init = function (target) { * Create action bar */ var displayOptions = contentData.displayOptions; - if (displayOptions.showFrame) { + if (displayOptions.frame) { // Special handling of copyrights - if (displayOptions.showCopyright) { + if (displayOptions.copyright) { var copyrights = H5P.getCopyrights(instance, library.params, contentId); if (!copyrights) { - displayOptions.showCopyright = false; + displayOptions.copyright = false; } } @@ -163,7 +163,7 @@ H5P.init = function (target) { $actions.insertAfter($container); } - if (displayOptions.showFrame && actionBar.hasActions()) { + if (displayOptions.frame && actionBar.hasActions()) { $element.addClass('h5p-frame'); } else { From f6449a6043941456eb00b4c08ab802715764f414 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Tue, 20 Dec 2016 13:08:49 +0100 Subject: [PATCH 27/33] Improving confirmation dialog [HFP-375] --- styles/h5p-confirmation-dialog.css | 13 +++++++------ styles/h5p-core-button.css | 8 +++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/styles/h5p-confirmation-dialog.css b/styles/h5p-confirmation-dialog.css index 2923b17..7e5196f 100644 --- a/styles/h5p-confirmation-dialog.css +++ b/styles/h5p-confirmation-dialog.css @@ -5,7 +5,7 @@ left: 0; top: 0; - background: rgba(255, 255, 255, 0.85); + background: rgba(28, 34, 41, 0.9); opacity: 1; visibility: visible; -webkit-transition: opacity 0.1s, linear 0s, visibility 0s linear 0s; @@ -46,7 +46,7 @@ transform: translate(-50%, 0%); color: #555; - box-shadow: 0 0 6px 1px #ddd; + box-shadow: 0 0 6px 3px #424242; -webkit-transition: transform 0.1s ease-in; transition: transform 0.1s ease-in; @@ -61,7 +61,7 @@ .h5p-confirmation-dialog-header { padding: 1.5em; background: #fff; - color: #1a73d9; + color: #356593; } .h5p-confirmation-dialog-header-text { @@ -69,8 +69,9 @@ } .h5p-confirmation-dialog-body { + background: #fafbfc; + border-top: solid 1px #dde0e9; padding: 1.25em 1.5em; - background: #fafafa; } .h5p-confirmation-dialog-text { @@ -90,14 +91,14 @@ button.h5p-confirmation-dialog-exit { font-size: 2.5em; top: -0.9em; right: -1.15em; - color: #777; + color: #fff; cursor: pointer; text-decoration: none; } button.h5p-confirmation-dialog-exit:focus, button.h5p-confirmation-dialog-exit:hover { - color: #555; + color: #E4ECF5; } .h5p-confirmation-dialog-exit:before { diff --git a/styles/h5p-core-button.css b/styles/h5p-core-button.css index 3ba392e..eb4e08d 100644 --- a/styles/h5p-core-button.css +++ b/styles/h5p-core-button.css @@ -1,13 +1,15 @@ button.h5p-core-button:visited, button.h5p-core-button:link, button.h5p-core-button { + font-family: "Open Sans", sans-serif; + font-weight: 600; font-size: 1em; line-height: 1.2; padding: 0.5em 1.25em; border-radius: 2em; - background: #1a73d9; - color: #ffffff; + background: #488ac9; + color: #fff; cursor: pointer; border: none; @@ -22,7 +24,7 @@ button.h5p-core-button { } button.h5p-core-button:hover, button.h5p-core-button:focus { - background: #1356a3; + background: #3b71a5; color: #fff; text-decoration: none; -webkit-transition: initial; From 1341768c90ae243e1dfef8cba31d9ee04656abc1 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Tue, 20 Dec 2016 14:37:31 +0100 Subject: [PATCH 28/33] Fixed problem with empty actionbar [HFP-277] --- js/h5p.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index a080ebf..aa313b1 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -133,6 +133,7 @@ H5P.init = function (target) { * Create action bar */ var displayOptions = contentData.displayOptions; + var displayFrame = false; if (displayOptions.frame) { // Special handling of copyrights if (displayOptions.copyright) { @@ -160,15 +161,13 @@ H5P.init = function (target) { }); }); - $actions.insertAfter($container); + if (actionBar.hasActions()) { + displayFrame = true; + $actions.insertAfter($container); + } } - if (displayOptions.frame && actionBar.hasActions()) { - $element.addClass('h5p-frame'); - } - else { - $element.addClass('h5p-no-frame'); - } + $element.addClass(displayFrame ? 'h5p-frame' : 'h5p-no-frame'); // Keep track of when we started H5P.opened[contentId] = new Date(); From b91be29cec8500fd1221faae651b0d4930d92ad9 Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Tue, 20 Dec 2016 15:46:36 +0100 Subject: [PATCH 29/33] Add return statement to recursive function HFP-391 --- js/h5p.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/h5p.js b/js/h5p.js index 7e5c068..f493f06 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -1063,6 +1063,7 @@ H5P.findCopyrights = function (info, parameters, contentId) { } } else { + return; } } }; From 8dd766ecb8654b5a52b22233877034f3bfd3e830 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Tue, 20 Dec 2016 16:39:51 +0100 Subject: [PATCH 30/33] More contrast between confirmation dialog and background [HFP-375] --- styles/h5p-confirmation-dialog.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/h5p-confirmation-dialog.css b/styles/h5p-confirmation-dialog.css index 7e5196f..c7c8558 100644 --- a/styles/h5p-confirmation-dialog.css +++ b/styles/h5p-confirmation-dialog.css @@ -46,7 +46,7 @@ transform: translate(-50%, 0%); color: #555; - box-shadow: 0 0 6px 3px #424242; + box-shadow: 0 0 6px 6px rgba(10,10,10,0.3) -webkit-transition: transform 0.1s ease-in; transition: transform 0.1s ease-in; From 8f681a21403a4fad53336350f6fc3a42f0f936fd Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Tue, 20 Dec 2016 16:40:45 +0100 Subject: [PATCH 31/33] Fixing missing semicolon [HFP-375] --- styles/h5p-confirmation-dialog.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/h5p-confirmation-dialog.css b/styles/h5p-confirmation-dialog.css index c7c8558..4fd45c0 100644 --- a/styles/h5p-confirmation-dialog.css +++ b/styles/h5p-confirmation-dialog.css @@ -46,7 +46,7 @@ transform: translate(-50%, 0%); color: #555; - box-shadow: 0 0 6px 6px rgba(10,10,10,0.3) + box-shadow: 0 0 6px 6px rgba(10,10,10,0.3); -webkit-transition: transform 0.1s ease-in; transition: transform 0.1s ease-in; From e2634070d4bd373b56721ad3a27e4677df2ba4d3 Mon Sep 17 00:00:00 2001 From: thomasmars Date: Wed, 21 Dec 2016 11:34:51 +0100 Subject: [PATCH 32/33] Ignore overrideSettings parameter fields. HFP-391 --- js/h5p.js | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index f493f06..b00afea 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -97,7 +97,7 @@ H5P.init = function (target) { // element sizing corrected. Ref. https://connect.microsoft.com/IE/feedback/details/838286/ie-11-incorrectly-reports-dom-element-sizes-in-fullscreen-mode-when-fullscreened-element-is-within-an-iframe } - // Deprecated variable, kept to maintain backwards compatability + // Deprecated variable, kept to maintain backwards compatability if (H5P.canHasFullScreen === undefined) { /** * @deprecated since version 1.11 @@ -1037,6 +1037,28 @@ H5P.findCopyrights = function (info, parameters, contentId) { if (!parameters.hasOwnProperty(field)) { continue; // Do not check } + + /* + * TODO: Make parameters clean again + * Some content types adds jQuery or other objects to parameters + * in order to determine override settings for sub-content-types. + * For instance Question Set tells Multiple Choice that it should + * attach Multi Choice's confirmation dialog to a Question Set + * jQuery element, so that the confirmation dialog will not be restricted + * to the space confined by Multi Choice. + * Ideally this should not be added to parameters, we must make a better + * solution. We should likely be adding these to sub-content through + * functions/setters instead of passing them down as params. + * + * This solution is implemented as a hack that will ignore all parameters + * inside a "overrideSettings" field, this should suffice for now since + * all overridden objects are added to this field, however this is not very + * robust solution and will very likely lead to problems in the future. + */ + if (field === 'overrideSettings') { + continue; + } + var value = parameters[field]; if (value instanceof Array) { @@ -1062,9 +1084,6 @@ H5P.findCopyrights = function (info, parameters, contentId) { info.addMedia(copyrights); } } - else { - return; - } } }; From e00bdbd125920c26cb3b5aeee5f753a679705de9 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Wed, 21 Dec 2016 15:17:36 +0100 Subject: [PATCH 33/33] Making sure displayoptions.icon is a boolean [HFP-277] --- h5p.classes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 90026b4..ac10ebb 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2615,7 +2615,7 @@ class H5PCore { self::DISPLAY_OPTION_DOWNLOAD => !($disable & H5PCore::DISABLE_DOWNLOAD), self::DISPLAY_OPTION_EMBED => !($disable & H5PCore::DISABLE_EMBED), self::DISPLAY_OPTION_COPYRIGHT => !($disable & H5PCore::DISABLE_COPYRIGHT), - self::DISPLAY_OPTION_ABOUT => $this->h5pF->getOption(self::DISPLAY_OPTION_ABOUT, TRUE), + self::DISPLAY_OPTION_ABOUT => !!$this->h5pF->getOption(self::DISPLAY_OPTION_ABOUT, TRUE), ); }