X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=course%2Flib.php;h=9f2bb262b7148b9282b54a32ee6cb27188df361e;hp=a5e17f36e5a1e18cb219a43dcdc331978cad771f;hb=9052fc4489844e0e8d17f6c684b984a88fd8fcd4;hpb=2afd7d0277477f35c170b71df758ab96bd364ba6 diff --git a/course/lib.php b/course/lib.php index a5e17f36e5a..9f2bb262b71 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1581,38 +1581,6 @@ function delete_mod_from_section($modid, $sectionid) { return false; } -/** - * Moves a section up or down by 1. CANNOT BE USED DIRECTLY BY AJAX! - * - * @param object $course course object - * @param int $section Section number (not id!!!) - * @param int $move (-1 or 1) - * @return boolean true if section moved successfully - * @todo MDL-33379 remove this function in 2.5 - */ -function move_section($course, $section, $move) { - debugging('This function will be removed before 2.5 is released please use move_section_to', DEBUG_DEVELOPER); - -/// Moves a whole course section up and down within the course - global $USER; - - if (!$move) { - return true; - } - - $sectiondest = $section + $move; - - // compartibility with course formats using field 'numsections' - $courseformatoptions = course_get_format($course)->get_format_options(); - if (array_key_exists('numsections', $courseformatoptions) && - $sectiondest > $courseformatoptions['numsections'] or $sectiondest < 1) { - return false; - } - - $retval = move_section_to($course, $section, $sectiondest); - return $retval; -} - /** * Moves a section within a course, from a position to another. * Be very careful: $section and $destination refer to section number,