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

chore: fix namespacing issues in 4.2+ #58

Merged
merged 3 commits into from
Aug 19, 2024
Merged
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
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# .github/workflows/ci.yml
name: ci

on: [push, pull_request]

jobs:
ci:
uses: catalyst/catalyst-moodle-workflows/.github/workflows/ci.yml@main
5 changes: 5 additions & 0 deletions classes/external/log_drain.php
Original file line number Diff line number Diff line change
@@ -16,6 +16,11 @@

namespace mod_hvp\external;

defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/lib/externallib.php');

// Note - external API has moved to namespaced classes in 4.2+ due to MDL-76583. Including externallib.php file
// aliases the classes to maintain compatibility with 4.0+.
use external_api;
use external_function_parameters;
use external_multiple_structure;
8 changes: 8 additions & 0 deletions classes/external/submit_mobile_finished.php
Original file line number Diff line number Diff line change
@@ -16,7 +16,15 @@

namespace mod_hvp\external;

defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/lib/externallib.php');

// Note - context -> \core\context in 4.2+ due to MDL-74936. However, it is aliased so keep it this way
// to maintain 4.0+ compatibility.
use context;

// Note - external API has moved to namespaced classes in 4.2+ due to MDL-76583. Including externallib.php file
// aliases the classes to maintain compatibility with 4.0+.
use external_api;
use external_function_parameters;
use external_single_structure;
1 change: 1 addition & 0 deletions version.php
Original file line number Diff line number Diff line change
@@ -29,3 +29,4 @@
$plugin->component = 'mod_hvp';
$plugin->maturity = MATURITY_STABLE;
$plugin->release = '1.26.1';
$plugin->supported = [400, 404];

Unchanged files with check annotations Beta

return {
init: function () {
// Moodle complains if you pass in settings through init (js_call_amd) since they are too large
const settings = H5PSettings;

Check failure on line 5 in amd/src/contenthubregistration.js

GitHub Actions / ci / MOODLE_404_STABLE - mariadb - php 8.1 - mod_hvp

'H5PSettings' is not defined

Check failure on line 5 in amd/src/contenthubregistration.js

GitHub Actions / ci / MOODLE_404_STABLE - pgsql - php 8.3 - mod_hvp

'H5PSettings' is not defined

Check failure on line 5 in amd/src/contenthubregistration.js

GitHub Actions / ci / MOODLE_404_STABLE - mariadb - php 8.3 - mod_hvp

'H5PSettings' is not defined

Check failure on line 5 in amd/src/contenthubregistration.js

GitHub Actions / ci / MOODLE_404_STABLE - pgsql - php 8.1 - mod_hvp

'H5PSettings' is not defined
settings.container = document.getElementById('h5p-hub-registration');
H5PHub.createRegistrationUI(settings);

Check failure on line 7 in amd/src/contenthubregistration.js

GitHub Actions / ci / MOODLE_404_STABLE - mariadb - php 8.1 - mod_hvp

'H5PHub' is not defined

Check failure on line 7 in amd/src/contenthubregistration.js

GitHub Actions / ci / MOODLE_404_STABLE - pgsql - php 8.3 - mod_hvp

'H5PHub' is not defined

Check failure on line 7 in amd/src/contenthubregistration.js

GitHub Actions / ci / MOODLE_404_STABLE - mariadb - php 8.3 - mod_hvp

'H5PHub' is not defined

Check failure on line 7 in amd/src/contenthubregistration.js

GitHub Actions / ci / MOODLE_404_STABLE - pgsql - php 8.1 - mod_hvp

'H5PHub' is not defined
},
};
});