Skip to content

Commit

Permalink
Merge branch 'wip-MDL-36215-m24' of git://github.com/samhemelryk/mood…
Browse files Browse the repository at this point in the history
…le into MOODLE_24_STABLE
  • Loading branch information
stronk7 committed Mar 5, 2013
2 parents 00d4e02 + 49f853b commit 29f07d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/navigationlib.php
Expand Up @@ -2439,16 +2439,19 @@ public function add_course_essentials($coursenode, stdClass $course) {
$participants = $coursenode->add(get_string('participants'), new moodle_url('/user/index.php?id='.$course->id), self::TYPE_CONTAINER, get_string('participants'), 'participants');
$currentgroup = groups_get_course_group($course, true);
if ($course->id == $SITE->id) {
$filtervar = 'courseid';
$filterselect = '';
} else if ($course->id && !$currentgroup) {
$filtervar = 'courseid';
$filterselect = $course->id;
} else {
$filtervar = 'groupid';
$filterselect = $currentgroup;
}
$filterselect = clean_param($filterselect, PARAM_INT);
if (($CFG->bloglevel == BLOG_GLOBAL_LEVEL or ($CFG->bloglevel == BLOG_SITE_LEVEL and (isloggedin() and !isguestuser())))
and has_capability('moodle/blog:view', context_system::instance())) {
$blogsurls = new moodle_url('/blog/index.php', array('courseid' => $filterselect));
$blogsurls = new moodle_url('/blog/index.php', array($filtervar => $filterselect));
$participants->add(get_string('blogscourse','blog'), $blogsurls->out());
}
if (!empty($CFG->enablenotes) && (has_capability('moodle/notes:manage', $this->page->context) || has_capability('moodle/notes:view', $this->page->context))) {
Expand Down

0 comments on commit 29f07d9

Please sign in to comment.