More agenda fixes

skala
Julio Montoya 14 years ago
parent 7474a49e34
commit d6c29c0dcb
  1. 7
      main/admin/calendar.lib.php
  2. 10
      main/calendar/agenda.inc.php
  3. 9
      main/calendar/myagenda.inc.php

@ -474,12 +474,11 @@ function display_student_links() {
Display::return_icon('month_empty.png',get_lang('MonthView'),'','32').'</a>';
if ($_SESSION['sort'] == 'DESC') {
echo '<a href="'.api_get_self().'?sort=asc&amp;origin='.Security::remove_XSS($_GET['origin']).'">'.Display::return_icon('calendar_normal.png',get_lang('AgendaSortChronologicallyUp'),'','32').'</a>';
}
else {
echo '<a href="'.api_get_self().'?sort=desc&amp;origin='.Security::remove_XSS($_GET['origin']).'"> '.Display::return_icon('calendar_inverse.png',get_lang('AgendaSortChronologicallyDown'),'','32').'</a>';
} else {
//echo '<a href="'.api_get_self().'?sort=desc&amp;origin='.Security::remove_XSS($_GET['origin']).'"> '.Display::return_icon('calendar_inverse.png',get_lang('AgendaSortChronologicallyDown'),'','32').'</a>';
}
} else {
echo '<a href="'.api_get_self().'?action=view&amp;view=list">'.Display::return_icon('appointments.png', get_lang('ListView'),'','32').'</a>';
echo '<a href="'.api_get_self().'?action=view&amp;view=list">'.Display::return_icon('week.png', get_lang('ListView'),'','32').'</a>';
}
}

@ -4703,6 +4703,14 @@ function get_global_agenda_items($agendaitems, $day = "", $month = "", $year = "
$hour = $agendatime[0];
$minute = $agendatime[1];
$second = $agendatime[2];
$start_time = api_convert_and_format_date($item['start_date'], TIME_NO_SEC_FORMAT);
$end_time = '';
if ($item['end_date'] != '0000-00-00 00:00:00') {
$end_time = ' - '.api_convert_and_format_date($item['end_date'], DATE_TIME_FORMAT_LONG);
}
// if the student has specified a course we a add a link to that course
if ($item['course'] <> "") {
$url = api_get_path(WEB_CODE_PATH)."admin/agenda.php?cidReq=".urlencode($item['course'])."&amp;day=$day&amp;month=$month&amp;year=$year#$day"; // RH //Patrick Cool: to highlight the relevant agenda item
@ -4716,7 +4724,7 @@ function get_global_agenda_items($agendaitems, $day = "", $month = "", $year = "
// This is the array construction for the WEEK or MONTH view
//Display the Agenda global in the tab agenda (administrator)
$agendaitems[$day] .= "<i>$hour:$minute</i>&nbsp;-&nbsp;";
$agendaitems[$day] .= "<i>$start_time $end_time</i>&nbsp;-&nbsp;";
$agendaitems[$day] .= "<b>".get_lang('GlobalEvent')."</b>";
$agendaitems[$day] .= "<div>".$item['title']."</div><br>";
} else {

@ -107,8 +107,11 @@ function get_myagendaitems($courses_dbs, $month, $year) {
$items[$agendaday]=array();
}
$time = api_convert_and_format_date($item['start_date'], TIME_NO_SEC_FORMAT);
$end_time = api_convert_and_format_date($item['end_date'], DATE_TIME_FORMAT_LONG);
$URL = api_get_path(WEB_CODE_PATH)."calendar/agenda.php?cidReq=".urlencode($array_course_info["code"])."&amp;day=$agendaday&amp;month=$month&amp;year=$year#$agendaday"; // RH //Patrick Cool: to highlight the relevant agenda item
$end_time = '';
if ($item['end_date'] != '0000-00-00 00:00:00') {
$end_time = '&nbsp;-&nbsp;<i>'.api_convert_and_format_date($item['end_date'], DATE_TIME_FORMAT_LONG).'</i>';
}
$URL = api_get_path(WEB_CODE_PATH)."calendar/agenda.php?cidReq=".urlencode($array_course_info["code"])."&amp;day=$agendaday&amp;month=$month&amp;year=$year#$agendaday";
if ($setting_agenda_link == 'coursecode') {
$title=$array_course_info['title'];
$agenda_link = api_substr($title, 0, 14);
@ -118,7 +121,7 @@ function get_myagendaitems($courses_dbs, $month, $year) {
if(!isset($items[$agendaday][$item['start_date']])) {
$items[$agendaday][$item['start_date']] = '';
}
$items[$agendaday][$item['start_date']] .= "<i>".$time."</i>"."&nbsp;-&nbsp;<i>".$end_time."</i>&nbsp;";
$items[$agendaday][$item['start_date']] .= "<i>$time</i> $end_time &nbsp;";
$item['title'] = '<strong>'.$item['title'].'</strong>';
$items[$agendaday][$item['start_date']] .= '<br />'."<a href=\"$URL\" title=\"".Security::remove_XSS($array_course_info['title'])."\">".$agenda_link."</a> ".Security::remove_XSS($item['title'])."<br /> ";
$items[$agendaday][$item['start_date']] .= '<br/>';

Loading…
Cancel
Save