Skip to content

Commit

Permalink
Fix Moodle Code Checker warning
Browse files Browse the repository at this point in the history
Fix Moodle Code Checker warning
  • Loading branch information
paulandm committed Oct 1, 2024
1 parent 079efb4 commit 7fd8e0d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes/task/send_ical_notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,10 @@ private function create_ical_object($zoomevent, $zoom, $user) {
$noreplyuser = \core_user::get_noreply_user();
$icalevent->add_property('organizer', 'mailto:' . $noreplyuser->email, ['cn' => $SITE->fullname]);
// Need to strip out the double quotations around the 'organizer' values - probably a bug in the core code.
$icalevent->properties['ORGANIZER'][0]->value = substr($icalevent->properties['ORGANIZER'][0]->value, 1, -1);
$icalevent->properties['ORGANIZER'][0]->parameters['CN'] = substr($icalevent->properties['ORGANIZER'][0]->parameters['CN'], 1, -1);
$organizervalue = $icalevent->properties['ORGANIZER'][0]->value;
$icalevent->properties['ORGANIZER'][0]->value = substr($organizervalue, 1, -1);
$organizercnparam = $icalevent->properties['ORGANIZER'][0]->parameters['CN'];
$icalevent->properties['ORGANIZER'][0]->parameters['CN'] = substr($organizercnparam, 1, -1);

// Add the event to the iCal file.
$ical->add_component($icalevent);
Expand Down

0 comments on commit 7fd8e0d

Please sign in to comment.