Merge branch 'wip-MDL-38593-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Dan Poltawski
2013-04-09 11:46:27 +08:00
12 changed files with 89 additions and 123 deletions
+3 -3
View File
@@ -1693,7 +1693,7 @@ class global_navigation extends navigation_node {
$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);
}
}
@@ -1713,7 +1713,7 @@ class global_navigation extends navigation_node {
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);
@@ -4089,7 +4089,7 @@ class settings_navigation extends navigation_node {
$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', ''));
}