2 if (!defined('AT_INCLUDE_PATH')) { exit; }
\r
3 if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }
\r
5 define('AT_PRIV_CALENDAR', $this->getPrivilege());
\r
7 // if this module is to be made available to students on the Home or Main Navigation
\r
8 $_student_tool = 'calendar/index.php';
\r
10 // register this module as a calendar source, must implement calendar_get_entries()
\r
11 // register_hook('calendar_source', this);
\r
14 - reading list (start and end dates)
\r
15 - tests (start and end dates)
\r
16 - assignments (due and late submission dates)
\r
17 - announcements (post date)
\r
18 - calendar (implements course, group, multiple calendars for system as well as the display of the calendar)
\r
20 each above module implements in module_calendar.php
\r
21 mixed calendar_get_entries(int $start_timestamp, int $end_timestamp, mixed $owner_type, mixed $owner_id);
\r
23 loop through all registered modules calling their run_hook('calendar_source', $owner_type, $owner_id) method,
\r
24 which then includes and runs the calendar_get_entries() function.
\r
26 the calendar display doesn't have to know which modules implement calendar_get_entries().
\r