mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MDL-30340 blocks - add back 'any page' support to course cats
Added the * option that is not affected by the 'varying-pagetype' problem that has been detected and issued @ MDL-30564. So now, it's (back) possible to define coursecat blocks to be spread over children coursecats/courses/modules (contexts).
This commit is contained in:
parent
b2221ee59c
commit
458fdc5280
1 changed files with 12 additions and 1 deletions
|
@ -35,5 +35,16 @@ function admin_page_type_list($pagetype, $parentcontext, $currentcontext) {
|
|||
'admin-*' => get_string('page-admin-x', 'pagetype'),
|
||||
$pagetype => get_string('page-admin-current', 'pagetype')
|
||||
);
|
||||
// Add the missing * (any page) option for them. MDL-30340
|
||||
// TODO: These pages are really 'pagetype-varying' - MDL-30564 -
|
||||
// and some day we should stop behaving that way, so proper pagetypes
|
||||
// can be specified for it (like course-category-* or so).
|
||||
// Luckly... the option we are introducing '*' is independent
|
||||
// of that varying behavior, so will work.
|
||||
if ($pagetype == 'admin-course-category') {
|
||||
$array += array(
|
||||
'*' => get_string('page-x', 'pagetype')
|
||||
);
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue