$select_month = ''; if (!empty($_GET['year'])) { $select_year = (int) $_GET['year']; } if (!empty($_GET['month'])) { $select_month = (int) $_GET['month']; } if (empty($select_year) && empty($select_month)) { $today = getdate(); $select_year = $today['year']; $select_month = $today['mon']; } echo '<div class="actions">'; if (api_is_allowed_to_edit(false, true) or api_get_course_setting('allow_user_edit_agenda') && !api_is_anonymous()) { display_student_links(); display_courseadmin_links(); } echo '</div><br /><br />'; echo '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>'; // THE LEFT PART if (empty($_GET['origin']) or $_GET['origin'] != 'learnpath') { echo '<td width="220" height="19" valign="top">'; // the small calendar $MonthName = $MonthsLong[$select_month - 1]; $agenda_items = get_calendar_items($select_month, $select_year); if (api_get_setting('display_mini_month_calendar') == 'true') { display_minimonthcalendar($agenda_items, $select_month, $select_year, $MonthName); } if (api_get_setting('display_upcoming_events') == 'true') { display_upcoming_events(); }
$region_value = api_get_language_isocode(); if ($region_value == 'en') { $region_value = 'en-GB'; } $tpl->assign('region_value', $region_value); $export_icon = '../img/export.png'; $export_icon_low = '../img/export_low_fade.png'; $export_icon_high = '../img/export_high_fade.png'; $tpl->assign('export_ical_confidential_icon', Display::return_icon($export_icon_high, get_lang('ExportiCalConfidential'))); $actions = null; if (api_is_allowed_to_edit(false, true) or api_get_course_setting('allow_user_edit_agenda') && !api_is_anonymous() && api_is_allowed_to_session_edit(false, true) or $is_group_tutor) { if ($type == 'course') { if (isset($_GET['user_id'])) { $filter = $_GET['user_id']; } $actions = display_courseadmin_links($filter); } $tpl->assign('actions', $actions); } //Calendar Type : course, admin, personal $tpl->assign('type', $type); $type_event_class = $type . '_event'; $type_label = get_lang(ucfirst($type) . 'Calendar'); if ($type == 'course' && !empty($group_id)) { $type_event_class = 'group_event'; $type_label = get_lang('GroupCalendar'); } if ($type == 'course' && !empty($session_id)) { $type_event_class = 'session_event'; $type_label = get_lang('SessionCalendar'); }