ÿØÿà 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 script allows the number of sections in a course to be increased * or decreased, redirecting to the course page. * * @package core_course * @copyright 2012 Dan Poltawski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.3 */ require_once(__DIR__.'/../config.php'); require_once($CFG->dirroot.'/course/lib.php'); $courseid = required_param('courseid', PARAM_INT); $increase = optional_param('increase', null, PARAM_BOOL); $insertsection = optional_param('insertsection', null, PARAM_INT); // Insert section at position; 0 means at the end. $numsections = optional_param('numsections', 1, PARAM_INT); // Number of sections to insert. $returnurl = optional_param('returnurl', null, PARAM_LOCALURL); // Where to return to after the action. $sectionreturn = optional_param('sectionreturn', null, PARAM_INT); // Section to return to, ignored if $returnurl is specified. $course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST); $courseformatoptions = course_get_format($course)->get_format_options(); $PAGE->set_url('/course/changenumsections.php', array('courseid' => $courseid)); // Authorisation checks. require_login($course); require_capability('moodle/course:update', context_course::instance($course->id)); require_sesskey(); $desirednumsections = 0; $courseformat = course_get_format($course); $lastsectionnumber = $courseformat->get_last_section_number(); $maxsections = $courseformat->get_max_sections(); if (isset($courseformatoptions['numsections']) && $increase !== null) { $desirednumsections = $courseformatoptions['numsections'] + 1; } else if (course_get_format($course)->uses_sections() && $insertsection !== null) { // Count the sections in the course. $desirednumsections = $lastsectionnumber + $numsections; } if ($desirednumsections > $maxsections) { // Increase in number of sections is not allowed. \core\notification::warning(get_string('maxsectionslimit', 'moodle', $maxsections)); $increase = null; $insertsection = null; $numsections = 0; if (!$returnurl) { $returnurl = course_get_url($course); } } if (isset($courseformatoptions['numsections']) && $increase !== null) { if ($increase) { // Add an additional section. $courseformatoptions['numsections']++; course_create_sections_if_missing($course, $courseformatoptions['numsections']); } else { // Remove a section. $courseformatoptions['numsections']--; } // Don't go less than 0, intentionally redirect silently (for the case of // double clicks). if ($courseformatoptions['numsections'] >= 0) { update_course((object)array('id' => $course->id, 'numsections' => $courseformatoptions['numsections'])); } if (!$returnurl) { $returnurl = course_get_url($course); $returnurl->set_anchor('changenumsections'); } } else if (course_get_format($course)->uses_sections() && $insertsection !== null) { if ($insertsection) { // Inserting sections at any position except in the very end requires capability to move sections. require_capability('moodle/course:movesections', context_course::instance($course->id)); } $sections = []; for ($i = 0; $i < max($numsections, 1); $i ++) { $sections[] = course_create_section($course, $insertsection); } if (!$returnurl) { $returnurl = course_get_url($course, $sections[0]->section, ($sectionreturn !== null) ? ['sr' => $sectionreturn] : []); } } // Redirect to where we were.. redirect($returnurl);