Skip to content

Commit

Permalink
MDL-67067 core_h5p: Load cached assets by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihail Geshoski committed Oct 30, 2019
1 parent d769970 commit abf6d1c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions h5p/classes/core.php
Expand Up @@ -25,6 +25,7 @@
namespace core_h5p;

use H5PCore;
use H5PFrameworkInterface;
use stdClass;
use moodle_url;

Expand All @@ -41,6 +42,24 @@ class core extends \H5PCore {

protected $libraries;

/**
* Constructor for core_h5p/core.
*
* @param H5PFrameworkInterface $framework The frameworks implementation of the H5PFrameworkInterface
* @param string|\H5PFileStorage $path The H5P file storage directory or class
* @param string $url The URL to the file storage directory
* @param string $language The language code. Defaults to english
* @param boolean $export Whether export is enabled
*/
public function __construct(H5PFrameworkInterface $framework, $path, string $url, string $language = 'en',
bool $export = false) {

parent::__construct($framework, $path, $url, $language, $export);

// Aggregate the assets by default.
$this->aggregateAssets = true;
}

protected function getDependencyPath(array $dependency): string {
$library = $this->find_library($dependency);

Expand Down

0 comments on commit abf6d1c

Please sign in to comment.