Skip to content

Commit

Permalink
Replace deprecated coursecatlib.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-tii committed Jul 29, 2024
1 parent 04bf5cb commit 8820d1e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
10 changes: 1 addition & 9 deletions extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
1 change: 0 additions & 1 deletion settings_extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 8820d1e

Please sign in to comment.