MDL-69573 core_course: Make MAX_COURSES_IN_CATEGORY configurable

This commit is contained in:
Nathan Nguyen
2020-09-30 16:04:55 +10:00
parent 8b026809c5
commit 85f136094b
6 changed files with 138 additions and 11 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ function xmldb_main_install() {
$cat = new stdClass();
$cat->name = get_string('miscellaneous');
$cat->depth = 1;
$cat->sortorder = MAX_COURSES_IN_CATEGORY;
$cat->sortorder = get_max_courses_in_category();
$cat->timemodified = time();
$catid = $DB->insert_record('course_categories', $cat);
$DB->set_field('course_categories', 'path', '/'.$catid, array('id'=>$catid));