Skip to content
Browse files

MDL-40088 fixed bug with not visible course section

  • Loading branch information...
1 parent 1430866 commit 86882b6dfe4a9309ac7e4b5e0bedda2f5f56880e @marinaglancy marinaglancy committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 course/edit_form.php
View
2 course/edit_form.php
@@ -81,7 +81,7 @@ function definition() {
$displaylist = coursecat::make_categories_list('moodle/course:create');
if (!isset($displaylist[$course->category])) {
//always keep current
- $displaylist[$course->category] = coursecat::get($course->category)->get_formatted_name();
+ $displaylist[$course->category] = coursecat::get($course->category, MUST_EXIST, true)->get_formatted_name();
}
$mform->addElement('select', 'category', get_string('coursecategory'), $displaylist);
$mform->addHelpButton('category', 'coursecategory');

0 comments on commit 86882b6

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