Merge branch 'MDL-78443-401' of https://github.com/jleyva/moodle into MOODLE_401_STABLE

This commit is contained in:
Ilya Tregubov 2023-06-27 11:01:44 +08:00
commit aa44a1643e
No known key found for this signature in database
GPG Key ID: 0F58186F748E55C1

View File

@ -3098,6 +3098,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());
}