From 8820d1eb11e558d5dc1b8fa6e6b3802b076a07c7 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 29 Jul 2024 15:14:14 +0100 Subject: [PATCH] Replace deprecated coursecatlib.php --- extras.php | 10 +--------- settings_extras.php | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/extras.php b/extras.php index b998c9d0..b4c8759e 100644 --- a/extras.php +++ b/extras.php @@ -97,15 +97,7 @@ $output .= $OUTPUT->box($coursesearchform, 'generalbox', 'course_search_options'); - $displaylist = array(); - $parentlist = array(); - require_once($CFG->dirroot."/course/lib.php"); - if (file_exists($CFG->libdir.'/coursecatlib.php')) { - require_once($CFG->libdir.'/coursecatlib.php'); - $displaylist = coursecat::make_categories_list(''); - } else { - make_categories_list($displaylist, $parentlist, ''); - } + $displaylist = core_course_category::make_categories_list(''); $categoryselectlabel = html_writer::label(get_string('selectcoursecategory', 'turnitintooltwo'), 'create_course_category'); $categoryselect = html_writer::select($displaylist, 'create_course_category', '', array(), diff --git a/settings_extras.php b/settings_extras.php index 0f26f30a..dee67e30 100644 --- a/settings_extras.php +++ b/settings_extras.php @@ -328,7 +328,6 @@ $output .= $OUTPUT->box($coursesearchform, 'generalbox', 'course_search_options'); $displaylist = core_course_category::make_categories_list(''); - $parentlist = array(); $categoryselectlabel = html_writer::label(get_string('selectcoursecategory', 'turnitintooltwo'), 'create_course_category');