Skip to content

Commit

Permalink
MDL-27829 blocks: made the ability to add a block to all site adminis…
Browse files Browse the repository at this point in the history
…tration pages work
  • Loading branch information
andyjdavis committed Jul 1, 2011
1 parent 346a32a commit 2f9bdad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions admin/lib.php
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions blocks/edit_form.php
Expand Up @@ -99,8 +99,8 @@ function definition() {
$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);
Expand Down
4 changes: 2 additions & 2 deletions lang/en/pagetype.php
Expand Up @@ -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';
Expand Down

0 comments on commit 2f9bdad

Please sign in to comment.