From 18ddfc1e98077685f10e7979e65eb1e1caaca608 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Mon, 10 May 2010 09:02:09 +0000 Subject: [PATCH] navigation MDL-22399 Added logs link to activity settings --- lib/navigationlib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 58dd32abcbc..c6ec01274f4 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -2595,6 +2595,11 @@ class settings_navigation extends navigation_node { $modulenode->add(get_string('filters', 'admin'), $url, self::TYPE_SETTING); } + if (has_capability('coursereport/log:view', get_context_instance(CONTEXT_COURSE, $this->page->cm->course))) { + $url = new moodle_url('/course/report/log/index.php', array('chooselog'=>'1','id'=>$this->page->cm->course,'modid'=>$this->page->cm->id)); + $modulenode->add(get_string('logs'), $url, self::TYPE_SETTING); + } + // Add a backup link $featuresfunc = $this->page->activityname.'_supports'; if ($featuresfunc(FEATURE_BACKUP_MOODLE2) && has_capability('moodle/backup:backupactivity', $this->page->cm->context)) {