Browse Source

Fix course color in agenda.

Julio Montoya 9 years ago
parent
commit
82646cefe8
1 changed files with 17 additions and 2 deletions
  1. 17 2
      main/inc/lib/agenda.lib.php

+ 17 - 2
main/inc/lib/agenda.lib.php

@@ -911,16 +911,31 @@ class Agenda
                 break;
             case 'course':
                 $session_id = $this->sessionId;
+                $courseInfo = api_get_course_info_by_id($course_id);
+
                 // Session coach can see all events inside a session.
                 if (api_is_coach()) {
+
+                    // Own course
+                    $this->getCourseEvents(
+                        $start,
+                        $end,
+                        $courseInfo,
+                        $groupId,
+                        $session_id,
+                        $user_id
+                    );
+
+                    // Others
                     $this->getSessionEvents(
                         $start,
                         $end,
                         api_get_session_id(),
-                        $user_id
+                        $user_id,
+                        $this->eventOtherSessionColor
                     );
                 } else {
-                    $courseInfo = api_get_course_info_by_id($course_id);
+
                     $this->getCourseEvents(
                         $start,
                         $end,