Skip to content

Commit

Permalink
Ensuring correct sortorder at the beginning of the category when crea…
Browse files Browse the repository at this point in the history
…ting courses.
  • Loading branch information
martinlanghoff committed Jan 25, 2005
1 parent eda2728 commit 5967289
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions course/edit.php
Expand Up @@ -77,6 +77,11 @@
//For topics and weeks formats (default built in the function)
$form->blockinfo = blocks_get_default_blocks();
}

// 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
$section = NULL;
Expand Down

0 comments on commit 5967289

Please sign in to comment.