Skip to content

Commit cb282fc

Browse files
committed
chore: fix namespacing issues in 4.2+
1 parent 0b5552c commit cb282fc

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

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 the 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;

0 commit comments

Comments
 (0)