Skip to content

Commit

Permalink
Sort courses after deletion; fixes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
mackensen committed Apr 3, 2017
1 parent c25be57 commit 82e0887
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/task/delete_courses_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public function execute() {

// Delete all courses.
$this->delete_courses_in_category($courses);
fix_course_sortorder();
}

/**
Expand Down Expand Up @@ -96,6 +95,8 @@ protected function delete_courses_in_category($courses) {
if ($coursedb = $DB->get_record('course', array('id' => $course->id))) {
if (!delete_course($coursedb, false)) {
mtrace("Failed to delete course {$course->id}");
} else {
fix_course_sortorder();
}
}
$lock->release();
Expand Down

0 comments on commit 82e0887

Please sign in to comment.