MDL-27829 blocks: made the ability to add a block to all site administration pages work

This commit is contained in:
Andrew Davis (andyjdavis)
2011-07-01 17:11:10 +08:00
parent 346a32a75b
commit 2f9bdadfd2
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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;
}
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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';