|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Namespaces | |
| namespace | calendar |
Variables | |
| $eventid = required_param('id', PARAM_INT) | |
| $confirm = optional_param('confirm', false, PARAM_BOOL) | |
| $repeats = optional_param('repeats', false, PARAM_BOOL) | |
| $courseid = optional_param('course', 0, PARAM_INT) | |
| if(!$site=get_site()) | $event = calendar_event::load($eventid) |
| if($event->eventtype!== 'user'&&$event-> eventtype!== 'site') | $course = $DB->get_record('course', array('id'=>$courseid)) |
| if(!$course) if(!calendar_edit_event_allowed($event)) $event | timedurationuntil = $event->timestart + $event->timeduration |
| $viewcalendarurl = new moodle_url(CALENDAR_URL.'view.php', array('view'=>'upcoming')) | |
| if($confirm) | $title = get_string('deleteevent', 'calendar') |
| $strcalendar = get_string('calendar', 'calendar') | |
| $url = new moodle_url(CALENDAR_URL.'delete.php', array('id'=>$event->id, 'confirm'=>true)) | |
| $buttons = $OUTPUT->single_button($url, get_string('delete')) | |
| $repeatspan = '' | |
| $event | time = calendar_format_event_time($event, time(), null, false) |
| if (!empty($event->eventrepeats)&&$event->eventrepeats > 0) $buttons = $OUTPUT->single_button($url, get_string('delete')) |
Definition at line 103 of file delete.php.
| $confirm = optional_param('confirm', false, PARAM_BOOL) |
Definition at line 33 of file delete.php.
| if ($event->eventtype!== 'user'&&$event->eventtype!== 'site') $course = $DB->get_record('course', array('id'=>$courseid)) |
We are going to be picky here, and require that any event types other than group and site be associated with a course. This means any code that is using custom event types (and there are a few) will need to associate thier event with a course
Definition at line 54 of file delete.php.
| $courseid = optional_param('course', 0, PARAM_INT) |
Definition at line 35 of file delete.php.
| if (!$site=get_site()) $event = calendar_event::load($eventid) |
Definition at line 43 of file delete.php.
| $eventid = required_param('id', PARAM_INT) |
Definition at line 32 of file delete.php.
| $repeats = optional_param('repeats', false, PARAM_BOOL) |
Definition at line 34 of file delete.php.
| $repeatspan = '' |
Definition at line 106 of file delete.php.
| $strcalendar = get_string('calendar', 'calendar') |
Definition at line 92 of file delete.php.
| if ($confirm) $title = get_string('deleteevent', 'calendar') |
Definition at line 91 of file delete.php.
Definition at line 102 of file delete.php.
| $viewcalendarurl = new moodle_url(CALENDAR_URL.'view.php', array('view'=>'upcoming')) |
Definition at line 70 of file delete.php.
| string $ExpirationTime Expiration time = calendar_format_event_time($event, time(), null, false) |
Definition at line 123 of file delete.php.
| if (!$course) if (!calendar_edit_event_allowed($event)) $event timedurationuntil = $event->timestart + $event->timeduration |
Definition at line 66 of file delete.php.