Merged from MOODLE_14_STABLE - Ensuring correct sortorder at the beginning of the category when creating courses.
This commit is contained in:
@@ -84,6 +84,10 @@
|
||||
} else {
|
||||
$form->timecreated = time();
|
||||
|
||||
// place at beginning of category
|
||||
fix_course_sortorder();
|
||||
$form->sortorder = get_field_sql("SELECT min(sortorder)-1 FROM {$CFG->prefix}course WHERE category=$form->category");
|
||||
|
||||
if ($newcourseid = insert_record('course', $form)) { // Set up new course
|
||||
|
||||
// Setup the blocks
|
||||
|
||||
Reference in New Issue
Block a user