From 431df0d9703bf0eb0391d6168edec871c96f1a95 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 18 Mar 2010 14:28:23 -0500 Subject: [PATCH] Minor - cosmetic changes --- main/calendar/agenda.inc.php | 15 ++----- main/calendar/agenda.php | 23 +---------- main/calendar/calendar.php | 23 +---------- main/calendar/download.php | 30 ++------------ main/calendar/ical_export.php | 3 +- main/calendar/myagenda.inc.php | 72 ++++++++++++++++------------------ main/calendar/myagenda.php | 59 +++++++++------------------- main/calendar/print.php | 23 +++++------ 8 files changed, 73 insertions(+), 175 deletions(-) mode change 100644 => 100755 main/calendar/ical_export.php diff --git a/main/calendar/agenda.inc.php b/main/calendar/agenda.inc.php index 1498f49321..5f37df3164 100755 --- a/main/calendar/agenda.inc.php +++ b/main/calendar/agenda.inc.php @@ -1,11 +1,10 @@ '; /* -============================================================================== FUNCTIONS -============================================================================== */ /** diff --git a/main/calendar/agenda.php b/main/calendar/agenda.php index a5b0fa809e..968dbbe6f3 100755 --- a/main/calendar/agenda.php +++ b/main/calendar/agenda.php @@ -1,26 +1,5 @@ diff --git a/main/calendar/myagenda.inc.php b/main/calendar/myagenda.inc.php index f07ce0594d..558201e0d7 100755 --- a/main/calendar/myagenda.inc.php +++ b/main/calendar/myagenda.inc.php @@ -1,13 +1,13 @@ , Ghent University @author: Toon Van Hoecke , Ghent University @author: Eric Remy (initial version) @version: 2.2 alpha @description: this file generates a general agenda of all items of the courses the user is registered for -============================================================================== + version info: ------------- -> version 2.2 : Patrick Cool, patrick.cool@ugent.be, november 2004 @@ -55,8 +55,7 @@ function get_myagendaitems($courses_dbs, $month, $year) $items = array (); // get agenda-items for every course - foreach ($courses_dbs as $key => $array_course_info) - { + foreach ($courses_dbs as $key => $array_course_info) { //databases of the courses $TABLEAGENDA = Database :: get_course_table(TABLE_AGENDA, $array_course_info["db"]); $TABLE_ITEMPROPERTY = Database :: get_course_table(TABLE_ITEM_PROPERTY, $array_course_info["db"]); @@ -66,17 +65,16 @@ function get_myagendaitems($courses_dbs, $month, $year) if ($array_course_info['status'] == '1') { //echo "course admin"; - $sqlquery = "SELECT - DISTINCT agenda.*, ip.visibility, ip.to_group_id, ip.insert_user_id, ip.ref - FROM ".$TABLEAGENDA." agenda, - ".$TABLE_ITEMPROPERTY." ip - WHERE agenda.id = ip.ref - AND MONTH(agenda.start_date)='".$month."' - AND YEAR(agenda.start_date)='".$year."' - AND ip.tool='".TOOL_CALENDAR_EVENT."' - AND ip.visibility='1' - GROUP BY agenda.id - ORDER BY start_date "; + $sqlquery = "SELECT DISTINCT agenda.*, ip.visibility, ip.to_group_id, ip.insert_user_id, ip.ref + FROM ".$TABLEAGENDA." agenda, + ".$TABLE_ITEMPROPERTY." ip + WHERE agenda.id = ip.ref + AND MONTH(agenda.start_date)='".$month."' + AND YEAR(agenda.start_date)='".$year."' + AND ip.tool='".TOOL_CALENDAR_EVENT."' + AND ip.visibility='1' + GROUP BY agenda.id + ORDER BY start_date "; } // if the user is not an administrator of that course else @@ -84,31 +82,29 @@ function get_myagendaitems($courses_dbs, $month, $year) //echo "GEEN course admin"; if (is_array($group_memberships) && count($group_memberships)>0) { - $sqlquery = "SELECT - agenda.*, ip.visibility, ip.to_group_id, ip.insert_user_id, ip.ref - FROM ".$TABLEAGENDA." agenda, - ".$TABLE_ITEMPROPERTY." ip - WHERE agenda.id = ip.ref - AND MONTH(agenda.start_date)='".$month."' - AND YEAR(agenda.start_date)='".$year."' - AND ip.tool='".TOOL_CALENDAR_EVENT."' - AND ( ip.to_user_id='".$_user['user_id']."' OR ip.to_group_id IN (0, ".implode(", ", $group_memberships).") ) - AND ip.visibility='1' - ORDER BY start_date "; + $sqlquery = "SELECT agenda.*, ip.visibility, ip.to_group_id, ip.insert_user_id, ip.ref + FROM ".$TABLEAGENDA." agenda, + ".$TABLE_ITEMPROPERTY." ip + WHERE agenda.id = ip.ref + AND MONTH(agenda.start_date)='".$month."' + AND YEAR(agenda.start_date)='".$year."' + AND ip.tool='".TOOL_CALENDAR_EVENT."' + AND ( ip.to_user_id='".$_user['user_id']."' OR ip.to_group_id IN (0, ".implode(", ", $group_memberships).") ) + AND ip.visibility='1' + ORDER BY start_date "; } else { - $sqlquery = "SELECT - agenda.*, ip.visibility, ip.to_group_id, ip.insert_user_id, ip.ref - FROM ".$TABLEAGENDA." agenda, - ".$TABLE_ITEMPROPERTY." ip - WHERE agenda.id = ip.ref - AND MONTH(agenda.start_date)='".$month."' - AND YEAR(agenda.start_date)='".$year."' - AND ip.tool='".TOOL_CALENDAR_EVENT."' - AND ( ip.to_user_id='".$_user['user_id']."' OR ip.to_group_id='0') - AND ip.visibility='1' - ORDER BY start_date "; + $sqlquery = "SELECT agenda.*, ip.visibility, ip.to_group_id, ip.insert_user_id, ip.ref + FROM ".$TABLEAGENDA." agenda, + ".$TABLE_ITEMPROPERTY." ip + WHERE agenda.id = ip.ref + AND MONTH(agenda.start_date)='".$month."' + AND YEAR(agenda.start_date)='".$year."' + AND ip.tool='".TOOL_CALENDAR_EVENT."' + AND ( ip.to_user_id='".$_user['user_id']."' OR ip.to_group_id='0') + AND ip.visibility='1' + ORDER BY start_date "; } } diff --git a/main/calendar/myagenda.php b/main/calendar/myagenda.php index 6c933145c8..4e5ee9b8a2 100755 --- a/main/calendar/myagenda.php +++ b/main/calendar/myagenda.php @@ -1,30 +1,13 @@ , Ghent University @author: Toon Van Hoecke , Ghent University @author: Eric Remy (initial version) @version: 2.2 alpha @description: this file generates a general agenda of all items of the courses the user is registered for -============================================================================== + version info: ------------- -> version 2.3 : Yannick Warnier, yannick.warnier@dokeos.com 2008 @@ -55,11 +38,9 @@ The tool was initially called master-calendar as it collects all the calendar items of all the courses one is subscribed to. It was very soon integrated in Dokeos as this was a really basic and very usefull tool. +**/ -/* ============================================================================== - HEADER -============================================================================== */ - +// HEADER // name of the language file that needs to be included $language_file = 'agenda'; @@ -91,9 +72,9 @@ $htmlHeadXtra[] = "