Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/9-intervenant-missing' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Nouuu committed Oct 1, 2020
2 parents cac5a38 + a9d676e commit a783bef
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ function showAgenda(array $agenda)
echo trim($room_str, ", ");
}

echo ", Intervenant : " . $course->teacher;
if (!empty($course->teacher) && strlen($course->teacher) > 1) {
echo ", Intervenant : " . $course->teacher;
}

printf(PHP_EOL);
}
Expand Down Expand Up @@ -120,8 +122,9 @@ function getCourseResume(Course $course): string
$str .= trim($room_str, ", ");
}

$str .= ", Intervenant : " . $course->teacher;

if (!empty($course->teacher) && strlen($course->teacher) > 1) {
$str .= ", Intervenant : " . $course->teacher;
}
return $str;
}

Expand Down Expand Up @@ -238,7 +241,9 @@ function addEvents(Google_Client $client, array $agenda)

$description = "";


if (!empty($course->teacher) && strlen($course->teacher) > 1) {
$description .= "<span>Intervenant : " . $course->teacher . "</span><br>";
}

if (!empty($course->rooms)) {
$description .= "<span>Salle(s) :<ul>";
Expand All @@ -248,7 +253,7 @@ function addEvents(Google_Client $client, array $agenda)
}
$description .= "</ul></span>";
}
$description .= "<span>Intervenant : " . $course->teacher . "</span>";

$event->setDescription($description);

$start = new Google_Service_Calendar_EventDateTime();
Expand Down

0 comments on commit a783bef

Please sign in to comment.