]> git.mjollnir.org Git - moodle.git/commitdiff
moodle_page: MDL-12212 eliminate page::edit_always
authortjhunt <tjhunt>
Wed, 6 May 2009 08:56:44 +0000 (08:56 +0000)
committertjhunt <tjhunt>
Wed, 6 May 2009 08:56:44 +0000 (08:56 +0000)
lib/blocklib.php
lib/pagelib.php

index 2f864206da722255fcc8dbad37c543fcefa71934..282e67092c8c9833e6b200c725cfa3348d2bb8dc 100644 (file)
@@ -276,7 +276,7 @@ function blocks_print_group(&$page, &$pageblocks, $position) {
             $obj = $instance->obj;
         }
 
-        $editalways = $page->edit_always();
+        $editalways = false;
 
 
         if (($isediting  && empty($instance->pinned)) || !empty($editalways)) {
@@ -827,13 +827,6 @@ function blocks_get_pinned($page) {
     global $DB;
 
     $visible = true;
-
-    if (method_exists($page,'edit_always')) {
-        if ($page->edit_always()) {
-            $visible = false;
-        }
-    }
-
     $select = "pagetype = ?";
     $params = array($page->pagetype);
 
index e23e5241cbb2d3e17aeff8fe414eac7aee9dc92b..abde579d0c73fbd5fe54c7394e8d344d6c190691 100644 (file)
@@ -777,15 +777,8 @@ class page_base extends moodle_page {
     function init_full() {
         $this->full_init_done = true;
     }
-
-
-    // is this  page always editable, regardless of anything else?
-    function edit_always() {
-        return (has_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM)) &&  defined('ADMIN_STICKYBLOCKS'));
-    }
 }
 
-
 /**
  * Class that models the behavior of a moodle course
  *