Skip to content

Commit 7afcc40

Browse files
Merge pull request #58 from catalyst/fix-class-namespace-tests
chore: fix namespacing issues in 4.2+
2 parents 0b5552c + c27efc2 commit 7afcc40

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

.github/workflows/ci.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# .github/workflows/ci.yml
2+
name: ci
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
ci:
8+
uses: catalyst/catalyst-moodle-workflows/.github/workflows/ci.yml@main

classes/external/log_drain.php

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
namespace mod_hvp\external;
1818

19+
defined('MOODLE_INTERNAL') || die();
20+
require_once($CFG->dirroot . '/lib/externallib.php');
21+
22+
// Note - external API has moved to namespaced classes in 4.2+ due to MDL-76583. Including externallib.php file
23+
// aliases the classes to maintain compatibility with 4.0+.
1924
use external_api;
2025
use external_function_parameters;
2126
use external_multiple_structure;

classes/external/submit_mobile_finished.php

+8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@
1616

1717
namespace mod_hvp\external;
1818

19+
defined('MOODLE_INTERNAL') || die();
20+
require_once($CFG->dirroot . '/lib/externallib.php');
21+
22+
// Note - context -> \core\context in 4.2+ due to MDL-74936. However, it is aliased so keep it this way
23+
// to maintain 4.0+ compatibility.
1924
use context;
25+
26+
// Note - external API has moved to namespaced classes in 4.2+ due to MDL-76583. Including externallib.php file
27+
// aliases the classes to maintain compatibility with 4.0+.
2028
use external_api;
2129
use external_function_parameters;
2230
use external_single_structure;

version.php

+1
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@
2929
$plugin->component = 'mod_hvp';
3030
$plugin->maturity = MATURITY_STABLE;
3131
$plugin->release = '1.26.1';
32+
$plugin->supported = [400, 404];

0 commit comments

Comments
 (0)