MDL-27829 blocks: made the ability to add a block to all site administration pages work
This commit is contained in:
+2
-2
@@ -32,8 +32,8 @@
|
||||
*/
|
||||
function admin_page_type_list($pagetype, $parentcontext, $currentcontext) {
|
||||
$array = array(
|
||||
'admin-setting-*' => get_string('page-admin-setting-x', 'pagetype'),
|
||||
$pagetype => get_string('page-admin-setting', 'pagetype')
|
||||
'admin-*' => get_string('page-admin-x', 'pagetype'),
|
||||
$pagetype => get_string('page-admin-current', 'pagetype')
|
||||
);
|
||||
return $array;
|
||||
}
|
||||
@@ -99,8 +99,8 @@ class block_edit_form extends moodleform {
|
||||
$contextoptions = array();
|
||||
if ( ($parentcontext->contextlevel == CONTEXT_COURSE && $parentcontext->instanceid == SITEID) ||
|
||||
($parentcontext->contextlevel == CONTEXT_SYSTEM)) { // Home page
|
||||
if ($bits[0] == 'tag' || ($bits[0] == 'admin' && $bits[1] == 'setting')) {
|
||||
// tag and admin settings always use system context
|
||||
if ($bits[0] == 'tag' || $bits[0] == 'admin') {
|
||||
// tag and admin pages always use system context
|
||||
// the contexts options don't make differences, so we use
|
||||
// page type patterns only
|
||||
$mform->addElement('hidden', 'bui_contexts', BUI_CONTEXTS_ENTIRE_SITE);
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['page-admin-setting'] = 'The current admin setting page';
|
||||
$string['page-admin-setting-x'] = 'Any admin setting page';
|
||||
$string['page-admin-current'] = 'The current site administration page';
|
||||
$string['page-admin-x'] = 'Any site administration page';
|
||||
$string['page-course-view-x'] = 'Any type of course main page';
|
||||
$string['page-course-x'] = 'Any course page';
|
||||
$string['page-course-report-x'] = 'Any course report';
|
||||
|
||||
Reference in New Issue
Block a user