Skip to content
Browse files

Merge branch 'MDL-34765-22' of git://github.com/FMCorz/moodle into MO…

…ODLE_22_STABLE
  • Loading branch information...
2 parents 4340e2f + a309129 commit ccbf68066bd381b0a5e240e992fedb923fad2d73 Sam Hemelryk committed Sep 11, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 course/category.php
View
4 course/category.php
@@ -27,6 +27,7 @@
require_once("../config.php");
require_once($CFG->dirroot.'/course/lib.php');
+require_once($CFG->libdir.'/textlib.class.php');
$id = required_param('id', PARAM_INT); // Category id
$page = optional_param('page', 0, PARAM_INT); // which page to show
@@ -75,7 +76,8 @@
// Process any category actions.
if ($canmanage && $resort && $sesskeyprovided) {
// Resort the category if requested
- if ($courses = get_courses($category->id, "fullname ASC", 'c.id,c.fullname,c.sortorder')) {
+ if ($courses = get_courses($category->id, 'c.id,c.fullname,c.sortorder')) {
+ collatorlib::asort_objects_by_property($courses, 'fullname', collatorlib::SORT_NATURAL);
$i = 1;
foreach ($courses as $course) {
$DB->set_field('course', 'sortorder', $category->sortorder+$i, array('id'=>$course->id));

0 comments on commit ccbf680

Please sign in to comment.
Something went wrong with that request. Please try again.