예제 #1
0
파일: lib.php 프로젝트: dg711/moodle
 /**
  * Load blocks using the system context, rather than the user's context.
  *
  * This is needed because the My Moodle pages set the page context to the
  * user's context for access control, etc.  But the blocks for the system
  * pages are stored in the system context.
  */
 public function load_blocks($includeinvisible = null)
 {
     $origcontext = $this->page->context;
     $this->page->context = context_system::instance();
     parent::load_blocks($includeinvisible);
     $this->page->context = $origcontext;
 }
예제 #2
0
파일: lib.php 프로젝트: vuchannguyen/web
 /**
  * Load blocks using the system context, rather than the user's context.
  *
  * This is needed because the My Moodle pages set the page context to the
  * user's context for access control, etc.  But the blocks for the system
  * pages are stored in the system context.
  */
 public function load_blocks($includeinvisible = null)
 {
     $origcontext = $this->page->context;
     $this->page->context = get_context_instance(CONTEXT_SYSTEM);
     parent::load_blocks($includeinvisible);
     $this->page->context = $origcontext;
 }