diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecd6546a..fdf41486 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,3 +6,8 @@ on: [push, pull_request] jobs: ci: uses: catalyst/catalyst-moodle-workflows/.github/workflows/ci.yml@main + with: + disable_mustache: true + disable_phpdoc: true + disable_phplint: true + disable_phpcpd: true diff --git a/classes/local/bundled_mobile_handler.php b/classes/local/bundled_mobile_handler.php index 89e7e952..8062c1ac 100644 --- a/classes/local/bundled_mobile_handler.php +++ b/classes/local/bundled_mobile_handler.php @@ -283,6 +283,8 @@ private function ensure_h5p_core_fonts_stored() { $corefonts = [ 'h5p-core-28.ttf', + 'h5p-core-29.ttf', + 'h5p-core-30.ttf', ]; $fs = get_file_storage(); @@ -299,11 +301,18 @@ private function ensure_h5p_core_fonts_stored() { if ($fs->file_exists($record->contextid, $record->component, $record->filearea, $record->itemid, $record->filepath, $record->filename)) { - return; + continue; + } + + $filepath = $CFG->dirroot . '/mod/hvp/library/fonts/' . $font; + + // If file itself doesn't exist, skip (likely, the library has updated or renamed the font). + if (!file_exists($filepath)) { + continue; } // Else store file. - $fs->create_file_from_pathname($record, $CFG->dirroot . '/mod/hvp/library/fonts/' . $font); + $fs->create_file_from_pathname($record, $filepath); } } diff --git a/lib.php b/lib.php index 3e176a79..c938bc93 100644 --- a/lib.php +++ b/lib.php @@ -564,3 +564,13 @@ function hvp_get_coursemodule_info($coursemodule) { return $info; } + +/** + * Whether the activity is branded. + * This information is used, for instance, to decide if a filter should be applied to the icon or not. + * + * @return bool True if the activity is branded, false otherwise. + */ +function hvp_is_branded(): bool { + return true; +}