Merge branch 'wip-MDL-38593-master' of git://github.com/marinaglancy/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 9 Apr 2013 03:46:27 +0000 (11:46 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 9 Apr 2013 03:46:27 +0000 (11:46 +0800)
1  2 
lib/navigationlib.php

diff --combined lib/navigationlib.php
@@@ -1693,7 -1693,7 +1693,7 @@@ class global_navigation extends navigat
                  $excessivecategories = $DB->get_records_sql($sql, $params);
                  foreach ($categories as &$category) {
                      if (array_key_exists($category->key, $excessivecategories) && !$this->can_add_more_courses_to_category($category)) {
-                         $url = new moodle_url('/course/category.php', array('id'=>$category->key));
+                         $url = new moodle_url('/course/index.php', array('categoryid' => $category->key));
                          $category->add(get_string('viewallcourses'), $url, self::TYPE_SETTING);
                      }
                  }
          if (array_key_exists($category->id, $this->addedcategories)) {
              return;
          }
-         $url = new moodle_url('/course/category.php', array('id' => $category->id));
+         $url = new moodle_url('/course/index.php', array('categoryid' => $category->id));
          $context = context_coursecat::instance($category->id);
          $categoryname = format_string($category->name, true, array('context' => $context));
          $categorynode = $parent->add($categoryname, $url, $nodetype, $categoryname, $category->id);
              $participants = $coursenode->add(get_string('participants'), null, self::TYPE_CONTAINER, get_string('participants'), 'participants');
          }
  
 -        // View course reports
 -        if (has_capability('moodle/site:viewreports', $this->page->context)) { // basic capability for listing of reports
 -            $reportnav = $coursenode->add(get_string('reports'), null, self::TYPE_CONTAINER, null, null, new pix_icon('i/stats', ''));
 -            $coursereports = get_plugin_list('coursereport'); // deprecated
 -            foreach ($coursereports as $report=>$dir) {
 -                $libfile = $CFG->dirroot.'/course/report/'.$report.'/lib.php';
 -                if (file_exists($libfile)) {
 -                    require_once($libfile);
 -                    $reportfunction = $report.'_report_extend_navigation';
 -                    if (function_exists($report.'_report_extend_navigation')) {
 -                        $reportfunction($reportnav, $course, $this->page->context);
 -                    }
 -                }
 -            }
 -
 -            $reports = get_plugin_list_with_function('report', 'extend_navigation_course', 'lib.php');
 -            foreach ($reports as $reportfunction) {
 -                $reportfunction($reportnav, $course, $this->page->context);
 -            }
 -        }
 -
          // Badges.
          if ($CFG->enablebadges && has_capability('moodle/badges:viewbadges', $this->page->context)) {
              $url = new moodle_url($CFG->wwwroot . '/badges/view.php',
@@@ -4089,7 -4110,7 +4089,7 @@@ class settings_navigation extends navig
          $onmanagepage = $this->page->url->compare(new moodle_url('/course/manage.php'), URL_MATCH_BASE);
  
          if (can_edit_in_category($this->context->instanceid) && !$onmanagepage) {
-             $url = new moodle_url('/course/manage.php', array('id' => $this->context->instanceid));
+             $url = new moodle_url('/course/manage.php', array('categoryid' => $this->context->instanceid));
              $editstring = get_string('managecategorythis');
              $categorynode->add($editstring, $url, self::TYPE_SETTING, null, null, new pix_icon('i/edit', ''));
          }