-
Bug
-
Resolution: Fixed
-
Major
-
4.3 regressions, 4.3
when editing enrol instances (https://m.corvi.schule/enrol/instances.php) clicking on the "eye" icon creates the following error:
core_communication\api::load_by_instance(): Argument #1 ($context) must be of type core\context, string given, called in [dirroot]/lib/enrollib.php on line 2747
I checked the corresponding files. In lib/enrollib.php load_by_instance is called with 3 parameters:
{{$communication = \core_communication\api::load_by_instance(
'core_course',
'coursecommunication',
$courseid
);}}
but the declaration declaration of load_by_instance in communication/classes/api.php expects:
{{public static function load_by_instance(
context $context,
string $component,
string $instancetype,
int $instanceid,
?string $provider = null,
{{): self
}}}}
I am no expert in moodle coding, but the last parameter being optional there seems to be one parameter (context?) missing.
Best regards (and thanks to the communications team for the marvellous work)
Thomas
- is a regression caused by
-
MDL-79581 Communication API not storing contextid
-
- Closed
-