ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ.. /** * This file is part of the Calendar section Moodle * It is responsible for deleting a calendar entry + optionally its repeats * * @copyright 2009 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @package calendar */ require_once('../config.php'); require_once($CFG->dirroot.'/calendar/event_form.php'); require_once($CFG->dirroot.'/calendar/lib.php'); require_once($CFG->dirroot.'/course/lib.php'); require_once($CFG->dirroot.'/calendar/renderer.php'); $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); $PAGE->set_url('/calendar/delete.php', array('id'=>$eventid)); if(!$site = get_site()) { redirect(new moodle_url('/admin/index.php')); } $event = calendar_event::load($eventid); /** * 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 */ if ($event->eventtype !== 'user' && $event->eventtype !== 'site') { $courseid = $event->courseid; } $course = $DB->get_record('course', array('id'=>$courseid)); require_login($course); if (!$course) { $PAGE->set_context(context_system::instance()); //TODO: wrong } $title = get_string('deleteevent', 'calendar'); // Check the user has the required capabilities to delete an event if (!calendar_delete_event_allowed($event)) { throw new \moodle_exception('nopermissions', 'error', $PAGE->url, $title); } // Count the repeats, do we need to consider the possibility of deleting repeats $event->timedurationuntil = $event->timestart + $event->timeduration; $event->count_repeats(); // Is used several times, and sometimes with modification if required $viewcalendarurl = new moodle_url(CALENDAR_URL.'view.php', array('view'=>'upcoming')); $viewcalendarurl->param('time', $event->timestart, '%Y'); // If confirm is set (PARAM_BOOL) then we have confirmation of initention to delete if ($confirm) { // Confirm the session key to stop CSRF if (!confirm_sesskey()) { throw new \moodle_exception('confirmsesskeybad'); } // Delete the event and possibly repeats $event->delete($repeats); // If the event has an associated course then we need to include it in the redirect link if (!empty($event->courseid) && $event->courseid > 0) { $viewcalendarurl->param('course', $event->courseid); } // And redirect redirect($viewcalendarurl); } // Prepare the page to show the confirmation form $strcalendar = get_string('calendar', 'calendar'); $PAGE->navbar->add($strcalendar, $viewcalendarurl); $PAGE->navbar->add($title); $PAGE->set_title($strcalendar.': '.$title); $PAGE->set_heading($COURSE->fullname); if ($course) { $PAGE->set_secondary_navigation(false); } echo $OUTPUT->header(); echo $OUTPUT->box_start('eventlist'); // Delete this event button is always shown $url = new moodle_url(CALENDAR_URL.'delete.php', array('id'=>$event->id, 'confirm'=>true)); $buttons = $OUTPUT->single_button($url, get_string('delete')); // And add the cancel button. $buttons .= $OUTPUT->single_button($viewcalendarurl, get_string('cancel')); // And show the buttons and notes. echo $OUTPUT->box_start('generalbox', 'notice'); echo html_writer::tag('p', get_string('confirmeventdelete', 'calendar', format_string($event->name))); // If there are repeated events then add a Delete Repeated button. if (!empty($event->eventrepeats) && $event->eventrepeats > 0) { $url = new moodle_url(CALENDAR_URL.'delete.php', array('id'=>$event->repeatid, 'confirm'=>true, 'repeats'=>true)); $buttons .= $OUTPUT->single_button($url, get_string('deleteall')); echo html_writer::tag('p', get_string('youcandeleteallrepeats', 'calendar', $event->eventrepeats)); } echo $OUTPUT->box($buttons, 'buttons'); echo $OUTPUT->box_end(); echo $OUTPUT->box_end(); echo $OUTPUT->footer();