MDL-43526 course: links to restore from management and admin structure.
This commit is contained in:
committed by
Dan Poltawski
parent
812cc702ad
commit
39bd07f732
@@ -2395,6 +2395,14 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate {
|
||||
return $this->has_manage_capability();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the user is able to restore a course into this category as a new course.
|
||||
* @return bool
|
||||
*/
|
||||
public function can_restore_courses_into() {
|
||||
return has_capability('moodle/course:create', $this->get_context());
|
||||
}
|
||||
|
||||
/**
|
||||
* Resorts the sub categories of this category by the given field.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user