|
|
@ -1,4 +1,4 @@ |
|
|
|
<?php //$Id: agenda.inc.php 11873 2007-04-04 19:46:04Z pcool $
|
|
|
|
<?php //$Id: agenda.inc.php 12220 2007-05-01 22:19:23Z yannoo $
|
|
|
|
/* |
|
|
|
/* |
|
|
|
============================================================================== |
|
|
|
============================================================================== |
|
|
|
Dokeos - elearning and course management software |
|
|
|
Dokeos - elearning and course management software |
|
|
@ -147,8 +147,8 @@ function display_minimonthcalendar($agendaitems, $month, $year, $monthName) |
|
|
|
$dayone = getdate(mktime(0, 0, 0, $month, 1, $year)); |
|
|
|
$dayone = getdate(mktime(0, 0, 0, $month, 1, $year)); |
|
|
|
//Start the week on monday |
|
|
|
//Start the week on monday |
|
|
|
$startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6; |
|
|
|
$startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6; |
|
|
|
$backwardsURL = $_SERVER['PHP_SELF']."?coursePath=".$_GET['coursePath']."&courseCode=".$_GET['courseCode']."&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); |
|
|
|
$backwardsURL = $_SERVER['PHP_SELF']."?".api_get_cidreq()."&coursePath=".$_GET['coursePath']."&courseCode=".$_GET['courseCode']."&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); |
|
|
|
$forewardsURL = $_SERVER['PHP_SELF']."?coursePath=".$_GET['coursePath']."&courseCode=".$_GET['courseCode']."&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); |
|
|
|
$forewardsURL = $_SERVER['PHP_SELF']."?".api_get_cidreq()."&coursePath=".$_GET['coursePath']."&courseCode=".$_GET['courseCode']."&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); |
|
|
|
|
|
|
|
|
|
|
|
echo "<table id=\"smallcalendar\">\n", |
|
|
|
echo "<table id=\"smallcalendar\">\n", |
|
|
|
"<tr class=\"title\">\n", |
|
|
|
"<tr class=\"title\">\n", |
|
|
@ -185,7 +185,7 @@ function display_minimonthcalendar($agendaitems, $month, $year, $monthName) |
|
|
|
echo "\t<td ".$class.">"; |
|
|
|
echo "\t<td ".$class.">"; |
|
|
|
if ($agendaitems[$curday] <> "") |
|
|
|
if ($agendaitems[$curday] <> "") |
|
|
|
{ |
|
|
|
{ |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?action=view&view=day&day=".$curday."&month=".$month."&year=".$year."\">".$dayheader."</a>"; |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&action=view&view=day&day=".$curday."&month=".$month."&year=".$year."\">".$dayheader."</a>"; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
@ -233,8 +233,8 @@ function display_monthcalendar($month, $year) |
|
|
|
//Start the week on monday |
|
|
|
//Start the week on monday |
|
|
|
$startdayofweek = $dayone['wday']<>0 ? ($dayone['wday']-1) : 6; |
|
|
|
$startdayofweek = $dayone['wday']<>0 ? ($dayone['wday']-1) : 6; |
|
|
|
|
|
|
|
|
|
|
|
$backwardsURL = $_SERVER['PHP_SELF']."?origin=$origin&month=".($month==1 ? 12 : $month-1)."&year=".($month==1 ? $year-1 : $year); |
|
|
|
$backwardsURL = $_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=$origin&month=".($month==1 ? 12 : $month-1)."&year=".($month==1 ? $year-1 : $year); |
|
|
|
$forewardsURL = $_SERVER['PHP_SELF']."?origin=$origin&month=".($month==12 ? 1 : $month+1)."&year=".($month==12 ? $year+1 : $year); |
|
|
|
$forewardsURL = $_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=$origin&month=".($month==12 ? 1 : $month+1)."&year=".($month==12 ? $year+1 : $year); |
|
|
|
|
|
|
|
|
|
|
|
$maand_array_maandnummer=$month-1; |
|
|
|
$maand_array_maandnummer=$month-1; |
|
|
|
|
|
|
|
|
|
|
@ -270,7 +270,7 @@ function display_monthcalendar($month, $year) |
|
|
|
|
|
|
|
|
|
|
|
$dayheader = "$curday"; |
|
|
|
$dayheader = "$curday"; |
|
|
|
if (in_array($curday,$data)) |
|
|
|
if (in_array($curday,$data)) |
|
|
|
{ $dayheader="<a href='".$_SERVER['PHP_SELF']."?origin=$origin&month=$month&year=$year&day=$curday#$curday'>".$curday."</a>"; } |
|
|
|
{ $dayheader="<a href='".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=$origin&month=$month&year=$year&day=$curday#$curday'>".$curday."</a>"; } |
|
|
|
|
|
|
|
|
|
|
|
if (($curday==$today['mday'])&&($year ==$today['year'])&&($month == $today[mon])) |
|
|
|
if (($curday==$today['mday'])&&($year ==$today['year'])&&($month == $today[mon])) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1032,7 +1032,7 @@ function change_visibility($tool,$id) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function display_courseadmin_links() |
|
|
|
function display_courseadmin_links() |
|
|
|
{ |
|
|
|
{ |
|
|
|
echo "<li><a href='".$_SERVER['PHP_SELF']."?action=add&origin=".$_GET['origin']."'><img src=\"../img/view_more_stats.gif\" alt=\"".get_lang('MoreStats')."\" border=\"0\" /> ".get_lang("AgendaAdd")."</a><br /></li>"; |
|
|
|
echo "<li><a href='".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&action=add&origin=".$_GET['origin']."'><img src=\"../img/view_more_stats.gif\" alt=\"".get_lang('MoreStats')."\" border=\"0\" /> ".get_lang("AgendaAdd")."</a><br /></li>"; |
|
|
|
if (empty ($_SESSION['toolgroup'])) |
|
|
|
if (empty ($_SESSION['toolgroup'])) |
|
|
|
{ |
|
|
|
{ |
|
|
|
echo "<li>".get_lang(UserGroupFilter)."<br/>"; |
|
|
|
echo "<li>".get_lang(UserGroupFilter)."<br/>"; |
|
|
@ -1054,21 +1054,21 @@ function display_student_links() |
|
|
|
global $show; |
|
|
|
global $show; |
|
|
|
if ($_SESSION['sort'] == 'DESC') |
|
|
|
if ($_SESSION['sort'] == 'DESC') |
|
|
|
{ |
|
|
|
{ |
|
|
|
echo "<li><a href='".$_SERVER['PHP_SELF']."?sort=asc&origin=".$_GET['origin']."'>".Display::return_icon('calendar_up.gif',get_lang('AgendaSortChronologicallyUp')).' '.get_lang("AgendaSortChronologicallyUp")."</a></li>"; |
|
|
|
echo "<li><a href='".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&sort=asc&origin=".$_GET['origin']."'>".Display::return_icon('calendar_up.gif',get_lang('AgendaSortChronologicallyUp')).' '.get_lang("AgendaSortChronologicallyUp")."</a></li>"; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
echo "<li><a href='".$_SERVER['PHP_SELF']."?sort=desc&origin=".$_GET['origin']."'>".Display::return_icon('calendar_down.gif',get_lang('AgendaSortChronologicallyDown')).' '.get_lang("AgendaSortChronologicallyDown")."</a></li>"; |
|
|
|
echo "<li><a href='".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&sort=desc&origin=".$_GET['origin']."'>".Display::return_icon('calendar_down.gif',get_lang('AgendaSortChronologicallyDown')).' '.get_lang("AgendaSortChronologicallyDown")."</a></li>"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// showing the link to show all items or only those of the current month |
|
|
|
// showing the link to show all items or only those of the current month |
|
|
|
if ($_SESSION['show']=="showcurrent") |
|
|
|
if ($_SESSION['show']=="showcurrent") |
|
|
|
{ |
|
|
|
{ |
|
|
|
echo "<li><a href='".$_SERVER['PHP_SELF']."?action=showall&origin=".$_GET['origin']."'>".Display::return_icon('calendar_select.gif').' '.get_lang("ShowAll")."</a></li>"; |
|
|
|
echo "<li><a href='".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&action=showall&origin=".$_GET['origin']."'>".Display::return_icon('calendar_select.gif').' '.get_lang("ShowAll")."</a></li>"; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
echo "<li><a href='".$_SERVER['PHP_SELF']."?action=showcurrent&origin=".$_GET['origin']."'>".Display::return_icon('calendar_month.gif').' '.get_lang("ShowCurrent")."</a></li>"; |
|
|
|
echo "<li><a href='".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&action=showcurrent&origin=".$_GET['origin']."'>".Display::return_icon('calendar_month.gif').' '.get_lang("ShowCurrent")."</a></li>"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1567,11 +1567,11 @@ function display_agenda_items() |
|
|
|
if (is_allowed_to_edit() OR api_get_course_setting('allow_user_edit_agenda')) |
|
|
|
if (is_allowed_to_edit() OR api_get_course_setting('allow_user_edit_agenda')) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// edit |
|
|
|
// edit |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?origin=".$_GET['origin']."&action=edit&id=".$myrow['id']."\">", |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=".$_GET['origin']."&action=edit&id=".$myrow['id']."\">", |
|
|
|
"<img src=\"../img/edit.gif\" border=\"0\" alt=\"".get_lang("ModifyCalendarItem")."\" /></a>", |
|
|
|
"<img src=\"../img/edit.gif\" border=\"0\" alt=\"".get_lang("ModifyCalendarItem")."\" /></a>", |
|
|
|
"<a href=\"".$_SERVER['PHP_SELF']."?origin=".$_GET['origin']."&action=delete&id=".$myrow['id']."\" onclick=\"javascript:if(!confirm('".addslashes(htmlentities(get_lang("ConfirmYourChoice")))."')) return false;\">", |
|
|
|
"<a href=\"".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=".$_GET['origin']."&action=delete&id=".$myrow['id']."\" onclick=\"javascript:if(!confirm('".addslashes(htmlentities(get_lang("ConfirmYourChoice")))."')) return false;\">", |
|
|
|
"<img src=\"../img/delete.gif\" border=\"0\" alt=\"".get_lang("Delete")."\"/></a>"; |
|
|
|
"<img src=\"../img/delete.gif\" border=\"0\" alt=\"".get_lang("Delete")."\"/></a>"; |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?origin=".$_GET['origin']."&action=announce&id=".$myrow['id']."\">". |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=".$_GET['origin']."&action=announce&id=".$myrow['id']."\">". |
|
|
|
"<img src=\"../img/announce_add.gif\" border=\"0\" alt=\"".get_lang("AddAnnouncement")."\"/></a>"; |
|
|
|
"<img src=\"../img/announce_add.gif\" border=\"0\" alt=\"".get_lang("AddAnnouncement")."\"/></a>"; |
|
|
|
if ($myrow['visibility']==1) |
|
|
|
if ($myrow['visibility']==1) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1581,7 +1581,7 @@ function display_agenda_items() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$image_visibility="invisible"; |
|
|
|
$image_visibility="invisible"; |
|
|
|
} |
|
|
|
} |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?origin=".$_GET['origin']."&action=showhide&id=".$myrow['id']."\">", |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=".$_GET['origin']."&action=showhide&id=".$myrow['id']."\">", |
|
|
|
"<img src=\"../img/".$image_visibility.".gif\" border=\"0\" alt=\"".get_lang("Visible")."\" /></a>"; |
|
|
|
"<img src=\"../img/".$image_visibility.".gif\" border=\"0\" alt=\"".get_lang("Visible")."\" /></a>"; |
|
|
|
} |
|
|
|
} |
|
|
|
echo "</td>"; |
|
|
|
echo "</td>"; |
|
|
@ -1762,9 +1762,9 @@ function display_one_agenda_item($agenda_id) |
|
|
|
if (is_allowed_to_edit()) |
|
|
|
if (is_allowed_to_edit()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// edit |
|
|
|
// edit |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?origin=".$_GET['origin']."&action=edit&id=".$myrow['id']."\">", |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=".$_GET['origin']."&action=edit&id=".$myrow['id']."\">", |
|
|
|
"<img src=\"../img/edit.gif\" border=\"0\" alt=\"".get_lang("ModifyCalendarItem")."\" /></a>", |
|
|
|
"<img src=\"../img/edit.gif\" border=\"0\" alt=\"".get_lang("ModifyCalendarItem")."\" /></a>", |
|
|
|
"<a href=\"".$_SERVER['PHP_SELF']."?origin=".$_GET['origin']."&action=delete&id=".$myrow['id']."\" onclick=\"javascript:if(!confirm('".addslashes(htmlentities(get_lang("ConfirmYourChoice")))."')) return false;\">", |
|
|
|
"<a href=\"".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=".$_GET['origin']."&action=delete&id=".$myrow['id']."\" onclick=\"javascript:if(!confirm('".addslashes(htmlentities(get_lang("ConfirmYourChoice")))."')) return false;\">", |
|
|
|
"<img src=\"../img/delete.gif\" border=\"0\" alt=\"".get_lang("Delete")."\" /></a>"; |
|
|
|
"<img src=\"../img/delete.gif\" border=\"0\" alt=\"".get_lang("Delete")."\" /></a>"; |
|
|
|
if ($myrow['visibility']==1) |
|
|
|
if ($myrow['visibility']==1) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1774,7 +1774,7 @@ function display_one_agenda_item($agenda_id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$image_visibility="invisible"; |
|
|
|
$image_visibility="invisible"; |
|
|
|
} |
|
|
|
} |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?origin=".$_GET['origin']."&action=showhide&id=".$myrow['id']."\">", |
|
|
|
echo "<a href=\"".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=".$_GET['origin']."&action=showhide&id=".$myrow['id']."\">", |
|
|
|
"<img src=\"../img/".$image_visibility.".gif\" border=\"0\" alt=\"".get_lang("Visible")."\" /></a><br /><br />"; |
|
|
|
"<img src=\"../img/".$image_visibility.".gif\" border=\"0\" alt=\"".get_lang("Visible")."\" /></a><br /><br />"; |
|
|
|
} |
|
|
|
} |
|
|
|
echo "</td>"; |
|
|
|
echo "</td>"; |
|
|
|