Browse Source

Fix #392 Remove deprecated coursecat calls.

MOODLE_36_STABLE
Dan Marsden 6 years ago
parent
commit
565aee1ed1
  1. 2
      absentee.php
  2. 3
      coursesummary.php

2
absentee.php

@ -35,7 +35,7 @@ $sort = optional_param('tsort', 'timesent', PARAM_ALPHA);
if (!empty($category)) { if (!empty($category)) {
$context = context_coursecat::instance($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)); $courses = $coursecat->get_courses(array('recursive' => true, 'idonly' => true));
$PAGE->set_category_by_id($category); $PAGE->set_category_by_id($category);
require_login(); require_login();

3
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/lib.php');
require_once($CFG->dirroot.'/mod/attendance/locallib.php'); require_once($CFG->dirroot.'/mod/attendance/locallib.php');
require_once($CFG->libdir.'/tablelib.php'); require_once($CFG->libdir.'/tablelib.php');
require_once($CFG->libdir.'/coursecatlib.php');
$category = optional_param('category', 0, PARAM_INT); $category = optional_param('category', 0, PARAM_INT);
$download = optional_param('download', '', PARAM_ALPHA); $download = optional_param('download', '', PARAM_ALPHA);
@ -47,7 +46,7 @@ if (empty($category)) {
$courses = array(); // Show all courses. $courses = array(); // Show all courses.
} else { } else {
$context = context_coursecat::instance($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)); $courses = $coursecat->get_courses(array('recursive' => true, 'idonly' => true));
} }
// Check permissions. // Check permissions.

Loading…
Cancel
Save