Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-79767

"Eye" icon (activate/deactivate) not working in Moodle 4.3

XMLWordPrintable

      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

            pholden Paul Holden
            thoschi Thomas Schröder
            Huong Nguyen Huong Nguyen
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 53 minutes
                53m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.