Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/calendar/lib.php File Reference

Go to the source code of this file.

Data Structures

class  calendar_event
class  calendar_information

Enumerations

enum  CALENDAR_DEFAULT_UPCOMING_LOOKAHEAD
enum  CALENDAR_DEFAULT_UPCOMING_MAXEVENTS
enum  CALENDAR_DEFAULT_STARTING_WEEKDAY
enum  CALENDAR_DEFAULT_WEEKEND
enum  CALENDAR_URL
enum  CALENDAR_TF_24
enum  CALENDAR_TF_12
enum  CALENDAR_EVENT_GLOBAL
enum  CALENDAR_EVENT_COURSE
enum  CALENDAR_EVENT_GROUP
enum  CALENDAR_EVENT_USER
enum  CALENDAR_STARTING_WEEKDAY

Functions

 calendar_get_days ()
 calendar_get_starting_weekday ()
 calendar_get_mini ($courses, $groups, $users, $cal_month=false, $cal_year=false)
 calendar_get_popup ($is_today, $event_timestart, $popupcontent='')
 calendar_get_upcoming ($courses, $groups, $users, $daysinfuture, $maxevents, $fromtime=0)
 calendar_add_event_metadata ($event)
 calendar_print_event ($event, $showactions=true)
 calendar_get_events ($tstart, $tend, $users, $groups, $courses, $withduration=true, $ignorehidden=true)
 calendar_top_controls ($type, $data)
 calendar_filter_controls (moodle_url $returnurl)
 calendar_day_representation ($tstamp, $now=false, $usecommonwords=true)
 calendar_time_representation ($time)
 calendar_get_link_href ($linkbase, $d, $m, $y)
 calendar_get_link_tag ($text, $linkbase, $d, $m, $y)
 calendar_get_link_previous ($text, $linkbase, $d, $m, $y, $accesshide=false)
 calendar_get_link_next ($text, $linkbase, $d, $m, $y, $accesshide=false)
 calendar_wday_name ($englishname)
 calendar_days_in_month ($month, $year)
 calendar_get_block_upcoming ($events, $linkhref=NULL)
 calendar_add_month ($month, $year)
 calendar_sub_month ($month, $year)
 calendar_events_by_day ($events, $month, $year, &$eventsbyday, &$durationbyday, &$typesbyday, &$courses)
 calendar_get_module_cached (&$coursecache, $modulename, $instance)
 calendar_get_course_cached (&$coursecache, $courseid)
 calendar_set_filters (array $courseeventsfrom, $ignorefilters=false)
 calendar_edit_event_allowed ($event)
 calendar_get_default_courses ()
 calendar_preferences_button (stdClass $course)
 calendar_format_event_time ($event, $now, $linkparams=null, $usecommonwords=true, $showtime=0)
 calendar_print_month_selector ($name, $selected)
 calendar_show_event_type ($type, $user=null)
 calendar_set_event_type_display ($type, $display=null, $user=null)
 calendar_get_allowed_types (&$allowed, $course=null)
 calendar_user_can_add_event ($course)
 calendar_add_event_allowed ($event)

Enumeration Type Documentation

Definition at line 44 of file lib.php.

Definition at line 42 of file lib.php.

Definition at line 43 of file lib.php.

Definition at line 47 of file lib.php.

Definition at line 53 of file lib.php.

Definition at line 52 of file lib.php.

Definition at line 54 of file lib.php.

Definition at line 55 of file lib.php.

CALENDAR_STARTING_WEEKDAY has since been deprecated please call calendar_get_starting_weekday() instead

Deprecated:

Definition at line 61 of file lib.php.

Definition at line 50 of file lib.php.

Definition at line 49 of file lib.php.

Definition at line 48 of file lib.php.


Function Documentation

Check wether the current user is permitted to add events

Parameters:
object$event
Returns:
bool

Definition at line 1590 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 515 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_add_month ( month,
year 
)

Definition at line 1083 of file lib.php.

Here is the caller graph for this function:

calendar_day_representation ( tstamp,
now = false,
usecommonwords = true 
)

Definition at line 900 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_days_in_month ( month,
year 
)

Definition at line 1044 of file lib.php.

Here is the caller graph for this function:

Definition at line 1295 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_events_by_day ( events,
month,
year,
&$  eventsbyday,
&$  durationbyday,
&$  typesbyday,
&$  courses 
)

Definition at line 1101 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 838 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_format_event_time ( event,
now,
linkparams = null,
usecommonwords = true,
showtime = 0 
)

Definition at line 1381 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_get_allowed_types ( &$  allowed,
course = null 
)

Definition at line 1541 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_get_block_upcoming ( events,
linkhref = NULL 
)

Definition at line 1048 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_get_course_cached ( &$  coursecache,
courseid 
)

Definition at line 1197 of file lib.php.

Here is the caller graph for this function:

Return the days of the week

Returns:
array

Definition at line 68 of file lib.php.

Here is the caller graph for this function:

Returns the default courses to display on the calendar when there isn't a specific course to display.

moodle_database $DB

Returns:
array Array of courses to display

Definition at line 1344 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_get_events ( tstart,
tend,
users,
groups,
courses,
withduration = true,
ignorehidden = true 
)

Get calendar events

Parameters:
int$tstartStart time of time range for events
int$tendEnd time of time range for events
array/int/boolean$users array of users, user id or boolean for all/no user events
array/int/boolean$groups array of groups, group id or boolean for all/no group events
array/int/boolean$courses array of courses, course id or boolean for all/no course events
boolean$withdurationwhether only events starting within time range selected or events in progress/already started selected as well
boolean$ignorehiddenwhether to select only visible events or all events
Returns:
array of selected events or an empty array if there aren't any (or there was an error)

Definition at line 598 of file lib.php.

Here is the caller graph for this function:

calendar_get_link_href ( linkbase,
d,
m,
y 
)

Adds day, month, year arguments to a URL and returns a moodle_url object.

Parameters:
string | moodle_url$linkbase
int$d
int$m
int$y
Returns:
moodle_url

Definition at line 966 of file lib.php.

Here is the caller graph for this function:

calendar_get_link_next ( text,
linkbase,
d,
m,
y,
accesshide = false 
)

Build and return a next month HTML link, with an arrow.

Parameters:
string$textThe text label.
string | moodle_url$linkbaseThe URL stub.
int$d$m $y Day of month, month and year numbers.
bool$accesshideDefault visible, or hide from all except screenreaders.
Returns:
string HTML string.

Definition at line 1032 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_get_link_previous ( text,
linkbase,
d,
m,
y,
accesshide = false 
)

Build and return a previous month HTML link, with an arrow.

Parameters:
string$textThe text label.
string | moodle_url$linkbaseThe URL stub.
int$d$m $y Day of month, month and year numbers.
bool$accesshideDefault visible, or hide from all except screenreaders.
Returns:
string HTML string.

Definition at line 1015 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_get_link_tag ( text,
linkbase,
d,
m,
y 
)

This function has been deprecated as of Moodle 2.0... DO NOT USE!!!!!

Deprecated:
Since:
2.0
Parameters:
string$text
string | moodle_url$linkbase
int | null$d
int | null$m
int | null$y
Returns:
string HTML link

Definition at line 998 of file lib.php.

Here is the call graph for this function:

calendar_get_mini ( courses,
groups,
users,
cal_month = false,
cal_year = false 
)

Generates the HTML for a miniature calendar

core_renderer $OUTPUT

Parameters:
array$courses
array$groups
array$users
int$cal_month
int$cal_year
Returns:
string

Definition at line 106 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_get_module_cached ( &$  coursecache,
modulename,
instance 
)

Definition at line 1187 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_get_popup ( is_today,
event_timestart,
popupcontent = '' 
)

calendar_get_popup, called at multiple points in from calendar_get_mini. Copied and modified from calendar_get_mini. moodle_page $PAGE

Parameters:
$is_todaybool, false except when called on the current day.
$event_timestartmixed, $events[$eventid]->timestart, OR false if there are no events.
$popupcontentstring.
Returns:
$popup string, contains onmousover and onmouseout events.

Definition at line 386 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Gets the first day of the week

Used to be define('CALENDAR_STARTING_WEEKDAY', blah);

Returns:
int

Definition at line 79 of file lib.php.

Here is the caller graph for this function:

calendar_get_upcoming ( courses,
groups,
users,
daysinfuture,
maxevents,
fromtime = 0 
)

Definition at line 410 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_preferences_button ( stdClass $  course)

Definition at line 1370 of file lib.php.

Here is the call graph for this function:

calendar_print_event ( event,
showactions = true 
)

Prints a calendar event

Deprecated:
2.0

Definition at line 576 of file lib.php.

Here is the call graph for this function:

calendar_print_month_selector ( name,
selected 
)

Definition at line 1470 of file lib.php.

Here is the call graph for this function:

calendar_set_event_type_display ( type,
display = null,
user = null 
)

Sets the display of the event type given $display. If $display = true the event type will be shown. If $display = false the event type will NOT be shown. If $display = null the current value will be toggled and saved.

Parameters:
CALENDAR_EVENT_GLOBAL | CALENDAR_EVENT_COURSE | CALENDAR_EVENT_GROUP | CALENDAR_EVENT_USER$type
true | false | null$display
stdClass | int | null$user

Definition at line 1509 of file lib.php.

Here is the call graph for this function:

calendar_set_filters ( array courseeventsfrom,
ignorefilters = false 
)

Returns the courses to load events for, the

moodle_database $DB

Parameters:
array$courseeventsfromAn array of courses to load calendar events for
bool$ignorefilters
Returns:
array An array of courses, groups, and user to load calendar events for based upon filters

Definition at line 1218 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_show_event_type ( type,
user = null 
)

Checks to see if the requested type of event should be shown for the given user.

Parameters:
CALENDAR_EVENT_GLOBAL | CALENDAR_EVENT_COURSE | CALENDAR_EVENT_GROUP | CALENDAR_EVENT_USER$typeThe type to check the display for (default is to display all)
stdClass | int | null$userThe user to check for - by default the current user
Returns:
bool True if the tyep should be displayed false otherwise

Definition at line 1486 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_sub_month ( month,
year 
)

Definition at line 1092 of file lib.php.

Here is the caller graph for this function:

Definition at line 944 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_top_controls ( type,
data 
)

Definition at line 687 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

see if user can add calendar entries at all used to print the "New Event" button

Returns:
bool

Definition at line 1576 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

calendar_wday_name ( englishname)

Definition at line 1040 of file lib.php.

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations