|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Variables | |
| $userid = optional_param('userid', 0, PARAM_INT) | |
| $username = optional_param('username', '', PARAM_TEXT) | |
| $authtoken = required_param('authtoken', PARAM_ALPHANUM) | |
| $generateurl = optional_param('generateurl', '', PARAM_TEXT) | |
| if(empty($CFG-> enablecalendarexport)) | $checkuserid = !empty($userid) && $user = $DB->get_record('user', array('id' => $userid), 'id,password') |
| $checkusername = !empty($username) && $user = $DB->get_record('user', array('username' => $username), 'id,password') | |
| if(!$checkuserid &&!$checkusername) | $authuserid = !empty($userid) && $authtoken == sha1($userid . $user->password . $CFG->calendar_exportsalt) |
| $authusername = !empty($username) && $authtoken == sha1($username . $user->password . $CFG->calendar_exportsalt) | |
| if(!$authuserid &&!$authusername) | $what = optional_param('preset_what', 'all', PARAM_ALPHA) |
| $time = optional_param('preset_time', 'weeknow', PARAM_ALPHA) | |
| $now = usergetdate(time()) | |
| $allowed_what = array('all', 'courses') | |
| $allowed_time = array('weeknow', 'weeknext', 'monthnow', 'monthnext', 'recentupcoming') | |
| if(!empty($generateurl)) if(!empty($what)&&!empty($time)) | $events = calendar_get_events($timestart, $timeend, $users, $groups, array_keys($courses), false) |
| $ical = new iCalendar | |
| foreach($events as $event) | $serialized = $ical->serialize() |
| if(empty($serialized)) if(ini_get_bool('zlib.output_compression')) | $filename = 'icalexport.ics' |
| $allowed_time = array('weeknow', 'weeknext', 'monthnow', 'monthnext', 'recentupcoming') |
Definition at line 40 of file export_execute.php.
| $allowed_what = array('all', 'courses') |
Definition at line 39 of file export_execute.php.
| $authtoken = required_param('authtoken', PARAM_ALPHANUM) |
Definition at line 10 of file export_execute.php.
| if (!$checkuserid &&!$checkusername) $authuserid = !empty($userid) && $authtoken == sha1($userid . $user->password . $CFG->calendar_exportsalt) |
Definition at line 27 of file export_execute.php.
| $authusername = !empty($username) && $authtoken == sha1($username . $user->password . $CFG->calendar_exportsalt) |
Definition at line 29 of file export_execute.php.
| if (empty($CFG->enablecalendarexport)) $checkuserid = !empty($userid) && $user = $DB->get_record('user', array('id' => $userid), 'id,password') |
Definition at line 18 of file export_execute.php.
| $checkusername = !empty($username) && $user = $DB->get_record('user', array('username' => $username), 'id,password') |
Definition at line 20 of file export_execute.php.
| if (!empty($generateurl)) if (!empty($what)&&!empty($time)) $events = calendar_get_events($timestart, $timeend, $users, $groups, array_keys($courses), false) |
Definition at line 138 of file export_execute.php.
| if (empty($serialized)) if (ini_get_bool('zlib.output_compression')) $filename = 'icalexport.ics' |
Definition at line 182 of file export_execute.php.
| $generateurl = optional_param('generateurl', '', PARAM_TEXT) |
Definition at line 11 of file export_execute.php.
| $ical = new iCalendar |
Definition at line 140 of file export_execute.php.
| $now = usergetdate(time()) |
Definition at line 37 of file export_execute.php.
Definition at line 171 of file export_execute.php.
| $time = optional_param('preset_time', 'weeknow', PARAM_ALPHA) |
Definition at line 35 of file export_execute.php.
| $userid = optional_param('userid', 0, PARAM_INT) |
Definition at line 8 of file export_execute.php.
| $username = optional_param('username', '', PARAM_TEXT) |
Definition at line 9 of file export_execute.php.
| if (!$authuserid &&!$authusername) $what = optional_param('preset_what', 'all', PARAM_ALPHA) |
Definition at line 34 of file export_execute.php.