From 565aee1ed1f092a93226ee5a0e7a424fa0f1933f Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Tue, 28 May 2019 15:02:00 +1200 Subject: [PATCH] Fix #392 Remove deprecated coursecat calls. --- absentee.php | 2 +- coursesummary.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/absentee.php b/absentee.php index 245acbd..9badad8 100644 --- a/absentee.php +++ b/absentee.php @@ -35,7 +35,7 @@ $sort = optional_param('tsort', 'timesent', PARAM_ALPHA); if (!empty($category)) { $context = context_coursecat::instance($category); - $coursecat = coursecat::get($category); + $coursecat = core_course_category::get($category); $courses = $coursecat->get_courses(array('recursive' => true, 'idonly' => true)); $PAGE->set_category_by_id($category); require_login(); diff --git a/coursesummary.php b/coursesummary.php index 55e4566..3d2bf51 100644 --- a/coursesummary.php +++ b/coursesummary.php @@ -27,7 +27,6 @@ require_once($CFG->libdir.'/adminlib.php'); require_once($CFG->dirroot.'/mod/attendance/lib.php'); require_once($CFG->dirroot.'/mod/attendance/locallib.php'); require_once($CFG->libdir.'/tablelib.php'); -require_once($CFG->libdir.'/coursecatlib.php'); $category = optional_param('category', 0, PARAM_INT); $download = optional_param('download', '', PARAM_ALPHA); @@ -47,7 +46,7 @@ if (empty($category)) { $courses = array(); // Show all courses. } else { $context = context_coursecat::instance($category); - $coursecat = coursecat::get($category); + $coursecat = core_course_category::get($category); $courses = $coursecat->get_courses(array('recursive' => true, 'idonly' => true)); } // Check permissions.