dokeos
[ class tree: dokeos ] [ index: dokeos ] [ all elements ]

Procedural File: agenda.inc.php

Source Location: /main/calendar/agenda.inc.php



Page Details:



Tags:

filesource:  Source Code for this file








add_month [line 3739]

int add_month( int $timestamp, [int $num = 1])

Adds x months to a UNIX timestamp



Tags:

return:  The new timestamp


Parameters

int   $timestamp   The timestamp
int   $num   The number of years to add
[ Top ]



add_week [line 3729]

int add_week( int $timestamp, [int $num = 1])

Adds x weeks to a UNIX timestamp



Tags:

return:  The new timestamp


Parameters

int   $timestamp   The timestamp
int   $num   The number of weeks to add
[ Top ]



add_year [line 3759]

int add_year( int $timestamp, [int $num = 1])

Adds x years to a UNIX timestamp



Tags:

return:  The new timestamp


Parameters

int   $timestamp   The timestamp
int   $num   The number of years to add
[ Top ]



agenda_add_item [line 3775]

int agenda_add_item( array $course_info, string $title, string $content, string $db_start_date, string $db_end_date, [array $to = array()], [int $parent_id = null])

Adds an agenda item in the database. Similar to store_new_agenda_item() except it takes parameters



Tags:

return:  The new item's DB ID


Parameters

array   $course_info   Course info
string   $title   Event title
string   $content   Event content/description
string   $db_start_date   Start date
string   $db_end_date   End date
array   $to   List of groups to which this event is added
int   $parent_id   Parent id (optional)
[ Top ]



agenda_add_repeat_item [line 3837]

boolean agenda_add_repeat_item( array $course_info, int $orig_id, string $type, int $end, array $orig_dest)

Adds a repetitive item to the database



Tags:

return:  False if error, True otherwise


Parameters

array   $course_info   Course info
int   $orig_id   The original event's id
string   $type   Type of repetition
int   $end   Timestamp of end of repetition (repeating until that date)
array   $orig_dest   Original event's destination
[ Top ]



agenda_import_ical [line 3933]

boolean agenda_import_ical( array $course_info, $file)

Import an iCal file into the database



Tags:

return:  True on success, false otherwise


Parameters

array   $course_info   Course info
   $file  
[ Top ]



calculate_start_end_of_week [line 2642]

void calculate_start_end_of_week( $week_number, $year)

This function calculates the startdate of the week (monday)

and the enddate of the week (sunday) and returns it as an array




Parameters

   $week_number  
   $year  
[ Top ]



change_visibility [line 1048]

void change_visibility( $tool, $id)

This functions swithes the visibility a course resource using the visible field in 'last_tooledit' values: 0 = invisible



Parameters

   $tool  
   $id  
[ Top ]



construct_not_selected_select_form [line 542]

html construct_not_selected_select_form( [ $group_list = null], [ $user_list = null], [ $to_already_selected = array()])

this function shows the form with the user that were not selected



Tags:

return:  code


Parameters

   $group_list  
   $user_list  
   $to_already_selected  
[ Top ]



construct_selected_select_form [line 583]

html construct_selected_select_form( [ $group_list = null], [ $user_list = null], $to_already_selected)

This function shows the form with the user that were selected



Tags:

return:  code


Parameters

   $group_list  
   $user_list  
   $to_already_selected  
[ Top ]



delete_agenda_item [line 1277]

void delete_agenda_item( integer $id)

This is the function that deletes an agenda item.

The agenda item is no longer fycically deleted but the visibility in the item_property table is set to 2 which means that it is invisible for the student AND course admin. Only the platform administrator can see it. This will in a later stage allow the platform administrator to recover resources that were mistakenly deleted by the course administrator




Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


Parameters

integer   $id   the id of the agenda item wa are deleting
[ Top ]



display_agenda_items [line 1350]

void display_agenda_items( )

Displays all the agenda items



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
author:  Yannick Warnier <yannick.warnier@dokeos.com> - cleanup


[ Top ]



display_courseadmin_links [line 1075]

void display_courseadmin_links( )

The links that allows the course administrator to add a new agenda item, to filter on groups or users



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


[ Top ]



display_daycalendar [line 2671]

void display_daycalendar( $agendaitems, $day, $month, $year, $weekdaynames, $monthName)

Show the mini calendar of the given month



Parameters

   $agendaitems  
   $day  
   $month  
   $year  
   $weekdaynames  
   $monthName  
[ Top ]



display_minimonthcalendar [line 143]

html display_minimonthcalendar( array $agendaitems, $month, $year, $monthName, integer $month:, integer $year:, string $monthName:)

show the mini calender of the given month



Tags:

return:  code
todo:  refactor this so that $monthName is no longer needed as a parameter


Parameters

integer   $month:   the integer value of the month we are viewing
integer   $year:   the 4-digit year indication e.g. 2005
string   $monthName:   the language variable for the mont name
array   $agendaitems   an array containing all the agenda items for the given month
   $month  
   $year  
   $monthName  
[ Top ]



display_monthcalendar [line 220]

html display_monthcalendar( $month, $year, integer $month:, integer $year:)

show the calender of the given month



Tags:

return:  code


Parameters

integer   $month:   the integer value of the month we are viewing
integer   $year:   the 4-digit year indication e.g. 2005
   $month  
   $year  
[ Top ]



display_one_agenda_item [line 1758]

void display_one_agenda_item( $agenda_id)

Displays only 1 agenda item. This is used when an agenda item is added to the learning path.



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


Parameters

   $agenda_id  
[ Top ]



display_student_links [line 1094]

void display_student_links( )

The links that allows the student AND course administrator to show all agenda items and sort up/down



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


[ Top ]



display_upcoming_events [line 2568]

void display_upcoming_events( )



[ Top ]



display_weekcalendar [line 2744]

void display_weekcalendar( $agendaitems, $month, $year, $weekdaynames, $monthName)

Display the weekly view of the calendar



Parameters

   $agendaitems  
   $month  
   $year  
   $weekdaynames  
   $monthName  
[ Top ]



get_agendaitems [line 2483]

void get_agendaitems( $month, $year)



Parameters

   $month  
   $year  
[ Top ]



get_agenda_item [line 1134]

an get_agenda_item( integer $id)

get all the information of the agenda_item from the database



Tags:

return:  associative array that contains all the information of the agenda item. The keys are the database fields
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


Parameters

integer   $id   the id of the agenda item we are getting all the information of
[ Top ]



get_calendar_items [line 63]

array get_calendar_items( $month, $year, integer $month:, integer $year:)

Retrieves all the agenda items from the table



Tags:

author:  Yannick Warnier <yannick.warnier@dokeos.com> - cleanup


Parameters

integer   $month:   the integer value of the month we are viewing
integer   $year:   the 4-digit year indication e.g. 2005
   $month  
   $year  
[ Top ]



get_course_groups [line 481]

array get_course_groups( )

this function gets all the groups of the course



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


[ Top ]



get_course_users [line 436]

array: get_course_users( )

this function gets all the users of the current course



Tags:

return:  associative array where the key is the id of the user and the value is an array containing
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


[ Top ]



get_day_agendaitems [line 2831]

void get_day_agendaitems( $courses_dbs, $month, $year, $day)

Show the monthcalender of the given month



Parameters

   $courses_dbs  
   $month  
   $year  
   $day  
[ Top ]



get_repeated_events_day_view [line 3068]

array get_repeated_events_day_view( string $course_info, [int $start = 0], [int $end = 0], array $params)

Get repeated events of a course between two dates (timespan of a day).

Returns an array containing the events




Tags:

return:  [int] => [course_id,parent_event_id,start_date,end_date,title,description]


Parameters

string   $course_info   Course info array (as returned by api_get_course_info())
int   $start   UNIX timestamp of span start. Defaults 0, later transformed into today's start
int   $end   UNIX timestamp. Defaults to 0, later transformed into today's end
array   $params   A set of parameters to alter the SQL query
[ Top ]



get_repeated_events_list_view [line 3496]

array get_repeated_events_list_view( string $course_info, [int $start = 0], [int $end = 0], array $params)

Get repeated events of a course between two dates (1 year timespan). Used for the list display.

This is virtually unlimited but by default it shortens to 100 years from now (even a birthday shouldn't be useful more than this time - except for turtles) Returns an array containing the events




Tags:

return:  [int] => [course_id,parent_event_id,start_date,end_date,title,description]


Parameters

string   $course_info   Course info array (as returned by api_get_course_info())
int   $start   UNIX timestamp of span start. Defaults 0, later transformed into today's start
int   $end   UNIX timestamp. Defaults to 0, later transformed into today's end
array   $params   A set of parameters to alter the SQL query
[ Top ]



get_repeated_events_month_view [line 3318]

array get_repeated_events_month_view( string $course_info, [int $start = 0], [int $end = 0], array $params)

Get repeated events of a course between two dates (timespan of a month).

Returns an array containing the events




Tags:

return:  [int] => [course_id,parent_event_id,start_date,end_date,title,description]


Parameters

string   $course_info   Course info array (as returned by api_get_course_info())
int   $start   UNIX timestamp of span start. Defaults 0, later transformed into today's start
int   $end   UNIX timestamp. Defaults to 0, later transformed into today's end
array   $params   A set of parameters to alter the SQL query
[ Top ]



get_repeated_events_week_view [line 3190]

array get_repeated_events_week_view( string $course_info, [int $start = 0], [int $end = 0], array $params)

Get repeated events of a course between two dates (timespan of a week).

Returns an array containing the events




Tags:

return:  [int] => [course_id,parent_event_id,start_date,end_date,title,description]


Parameters

string   $course_info   Course info array (as returned by api_get_course_info())
int   $start   UNIX timestamp of span start. Defaults 0, later transformed into today's start
int   $end   UNIX timestamp. Defaults to 0, later transformed into today's end
array   $params   A set of parameters to alter the SQL query
[ Top ]



get_week_agendaitems [line 2946]

void get_week_agendaitems( $courses_dbs, $month, $year, [ $week = ''])

Return agenda items of the week



Parameters

   $courses_dbs  
   $month  
   $year  
   $week  
[ Top ]



is_repeated_event [line 3706]

boolean is_repeated_event( string $id, [int $course = null])

Tells if an agenda item is repeated



Tags:

return:  True if repeated, false otherwise


Parameters

string   $id   Course database
int   $course   The agenda item
[ Top ]



load_edit_users [line 1014]

void load_edit_users( $tool, $id)

This tools loads all the users and all the groups who have received a specific item (in this case an agenda item)



Parameters

   $tool  
   $id  
[ Top ]



save_edit_agenda_item [line 1253]

void save_edit_agenda_item( $id, $title, $content, $start_date, $end_date)

This function stores the Agenda Item in the table calendar_event and updates the item_property table also (after an edit)



Parameters

   $id  
   $title  
   $content  
   $start_date  
   $end_date  
[ Top ]



sent_to [line 808]

array sent_to( $tool, $id)

returns all the users and all the groups a specific Agenda item has been sent to



Parameters

   $tool  
   $id  
[ Top ]



sent_to_form [line 852]

html sent_to_form( $sent_to_array, array $sent_to_array:)

constructs the form to display all the groups and users the message has been sent to



Parameters

array   $sent_to_array:   a 2 dimensional array containing the groups and the users the first level is a distinction between groups and users: $sent_to_array['groups'] and $sent_to_array['users'] $sent_to_array['groups'] (resp. $sent_to_array['users']) is also an array containing all the id's of the groups (resp. users) who have received this message.
   $sent_to_array  
[ Top ]



separate_users_groups [line 775]

array separate_users_groups( $to)

This function separates the users from the groups

users have a value USER:XXX (with XXX the dokeos id groups have a value GROUP:YYY (with YYY the group id)




Parameters

   $to  
[ Top ]



showhide_agenda_item [line 1327]

void showhide_agenda_item( integer $id)

Makes an agenda item visible or invisible for a student



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


Parameters

integer   $id   id the id of the agenda item we are changing the visibility of
[ Top ]



show_add_form [line 1963]

void show_add_form( [integer $id = ''])

Show the form for adding a new agenda item. This is the same function that is used whenever we are editing an agenda item. When the id parameter is empty (default behaviour), then we show an empty form, else we are editing and we have to retrieve the information that is in the database and use this information in the forms.



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


Parameters

integer   $id   id, the id of the agenda item we are editing. By default this is empty which means that we are adding an agenda item.
[ Top ]



show_group_filter_form [line 933]

void show_group_filter_form( )

This function displays a dropdown list that allows the course administrator do view the calendar items of one specific group



[ Top ]



show_to_form [line 506]

html show_to_form( $to_already_selected)

this function shows the form for sending a message to a specific group or user.



Tags:

return:  code


Parameters

   $to_already_selected  
[ Top ]



show_user_filter_form [line 955]

void show_user_filter_form( )

This function displays a dropdown list that allows the course administrator do view the calendar items of one specific group



[ Top ]



show_user_group_filter_form [line 977]

void show_user_group_filter_form( )

This function displays a dropdown list that allows the course administrator do view the calendar items of one specific group



[ Top ]



store_agenda_item_as_announcement [line 705]

integer store_agenda_item_as_announcement( integer $item_id)

Stores the given agenda item as an announcement (unlinked copy)



Tags:

return:  New announcement item's ID


Parameters

integer   $item_id   Agenda item's ID
[ Top ]



store_edited_agenda_item [line 1188]

void store_edited_agenda_item( )

This is the function that updates an agenda item. It does 3 things

  1. storethe start_date, end_date, title and message in the calendar_event table
  2. store the groups/users who this message is meant for in the item_property table
  3. modify the attachments (if needed)




Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


[ Top ]



store_new_agenda_item [line 625]

integer store_new_agenda_item( )

This function stores the Agenda Item in the table calendar_event and updates the item_property table also



Tags:

return:  the id of the last added agenda item


[ Top ]



to_javascript [line 318]

javascript to_javascript( )

returns all the javascript that is required for easily selecting the target people/groups this goes into the $htmlHeadXtra[] array



Tags:

return:  code


[ Top ]



user_group_filter_javascript [line 416]

javascript user_group_filter_javascript( )

returns the javascript for setting a filter. This is a jump menu



Tags:

return:  code


[ Top ]



Documentation generated on Thu, 12 Jun 2008 12:55:17 -0500 by phpDocumentor 1.4.1