mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-78443 course: Missing require for course_request
This commit is contained in:
parent
4ed782dd03
commit
72f269a05b
@ -3091,6 +3091,9 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
|
||||
* @return bool
|
||||
*/
|
||||
public function can_request_course() {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/course/lib.php');
|
||||
|
||||
return course_request::can_request($this->get_context());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user