|
@@ -18,8 +18,6 @@ $interbreadcrumb[] = array(
|
|
|
'name' => get_lang('Agenda')
|
|
|
);
|
|
|
|
|
|
-$tpl = new Template(get_lang('Events'));
|
|
|
-
|
|
|
$agenda = new Agenda();
|
|
|
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
|
|
|
$agenda->type = $type;
|
|
@@ -31,10 +29,13 @@ $events = $agenda->get_events(
|
|
|
null,
|
|
|
'array'
|
|
|
);
|
|
|
+
|
|
|
+$this_section = SECTION_MYAGENDA;
|
|
|
+
|
|
|
if (!empty($GLOBALS['_cid']) && $GLOBALS['_cid'] != -1) {
|
|
|
// Agenda is inside a course tool
|
|
|
$url = api_get_self() . '?' . api_get_cidreq();
|
|
|
-
|
|
|
+ $this_section = SECTION_COURSES;
|
|
|
} else {
|
|
|
// Agenda is out of the course tool (e.g personal agenda)
|
|
|
$url = false;
|
|
@@ -43,6 +44,8 @@ if (!empty($GLOBALS['_cid']) && $GLOBALS['_cid'] != -1) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+$tpl = new Template(get_lang('Events'));
|
|
|
+
|
|
|
$tpl->assign('agenda_events', $events);
|
|
|
|
|
|
$actions = $agenda->displayActions('list');
|