Browse Source

Merge branch 'CT7396' of https://github.com/danbarretodev/chamilo-lms into danbarretodev-CT7396

Yannick Warnier 10 years ago
parent
commit
75501255b3
2 changed files with 8 additions and 2 deletions
  1. 7 1
      main/calendar/agenda_js.php
  2. 1 1
      main/calendar/agenda_list.php

+ 7 - 1
main/calendar/agenda_js.php

@@ -41,7 +41,13 @@ if (api_is_platform_admin() && ($type == 'admin' || $type == 'platform')) {
 }
 
 if (isset($_REQUEST['cidReq']) && !empty($_REQUEST['cidReq'])) {
-    $type = 'course';
+    if ($_REQUEST['cidReq'] < 1) {
+        // When is out of the course tool (e.g My agenda)
+        header('Location: ' . api_get_self());
+        exit;
+    } else {
+        $type = 'course';
+    }
 }
 
 $agenda = new Agenda();

+ 1 - 1
main/calendar/agenda_list.php

@@ -14,7 +14,7 @@ require_once 'agenda.lib.php';
 require_once 'agenda.inc.php';
 
 $interbreadcrumb[] = array(
-    'url' => api_get_path(WEB_CODE_PATH)."calendar/agenda_js.php?".api_get_cidreq(),
+    'url' => api_get_path(WEB_CODE_PATH) . "calendar/agenda_js.php",
     'name' => get_lang('Agenda')
 );