Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

45 bug fixes #68

Open
wants to merge 3 commits into
base: stable-catalyst-400
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 11 additions & 2 deletions classes/local/bundled_mobile_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
}
}

Expand Down
10 changes: 10 additions & 0 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Loading