Merge branch 'wip-MDL-32191-m26' of git://github.com/samhemelryk/moodle
authorDan Poltawski <dan@moodle.com>
Wed, 21 Aug 2013 02:44:04 +0000 (10:44 +0800)
committerDan Poltawski <dan@moodle.com>
Wed, 21 Aug 2013 02:44:04 +0000 (10:44 +0800)
1  2 
lib/navigationlib.php

diff --combined lib/navigationlib.php
@@@ -2744,7 -2744,7 +2744,7 @@@ class global_navigation_for_ajax extend
                  $this->load_category($this->instanceid, self::TYPE_MY_CATEGORY);
                  break;
              case self::TYPE_COURSE :
 -                $course = $DB->get_record('course', array('id' => $this->instanceid), '*', MUST_EXIST);
 +                $course = get_course($this->instanceid);
                  require_course_login($course, true, null, false, true);
                  $this->page->set_context(context_course::instance($course->id));
                  $coursenode = $this->add_course($course);
@@@ -3742,7 -3742,7 +3742,7 @@@ class settings_navigation extends navig
              require_once($file);
          }
  
-         $modulenode = $this->add(get_string('pluginadministration', $this->page->activityname));
+         $modulenode = $this->add(get_string('pluginadministration', $this->page->activityname), null, self::TYPE_SETTING, null, 'modulesettings');
          $modulenode->force_open();
  
          // Settings for the module
      protected function load_block_settings() {
          global $CFG;
  
-         $blocknode = $this->add($this->context->get_context_name());
+         $blocknode = $this->add($this->context->get_context_name(), null, self::TYPE_SETTING, null, 'blocksettings');
          $blocknode->force_open();
  
          // Assign local roles