mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
Merge branch 'MDL-75569-master' of https://github.com/justusdieckmann/moodle
This commit is contained in:
commit
7c79ff41b0
@ -128,13 +128,18 @@ class manage_categories_action_bar implements \renderable {
|
||||
* @return array
|
||||
*/
|
||||
protected function get_search_form(): array {
|
||||
return [
|
||||
'action' => new moodle_url('/course/management.php'),
|
||||
$searchform = [
|
||||
'btnclass' => 'btn-primary',
|
||||
'inputname' => 'search',
|
||||
'searchstring' => get_string('searchcourses'),
|
||||
'query' => $this->searchvalue
|
||||
];
|
||||
if (\core_course_category::has_capability_on_any(['moodle/category:manage', 'moodle/course:create'])) {
|
||||
$searchform['action'] = new moodle_url('/course/management.php');
|
||||
} else {
|
||||
$searchform['action'] = new moodle_url('/course/search.php');
|
||||
}
|
||||
return $searchform;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user