Just cleaning up this log report in the nav menu
authorMartin Dougiamas <martin@moodle.com>
Thu, 29 Apr 2010 16:59:58 +0000 (16:59 +0000)
committerMartin Dougiamas <martin@moodle.com>
Thu, 29 Apr 2010 16:59:58 +0000 (16:59 +0000)
course/report/log/index.php
course/report/log/lib.php

index 88d315f..f6f2032 100644 (file)
         echo $OUTPUT->heading(get_string('chooselogs') .':');
 
         print_log_selector_form($course, $user, $date, $modname, $modid, $modaction, $group, $showcourses, $showusers, $logformat);
+
+        $livelogs = get_string('livelogs');
+        $url = new moodle_url('/course/report/log/live.php', array('id'=>$course->id));
+        $link = new action_link($url, $livelogs, new popup_action('click', $url, 'livelog', array('height' => 500, 'width' => 800)));
+
+        echo $OUTPUT->render($link);
     }
 
     echo $OUTPUT->footer();
index c9beb58..7d1c920 100644 (file)
@@ -553,10 +553,4 @@ function log_report_extend_navigation($navigation, $course, $context) {
         $url = new moodle_url('/course/report/log/index.php', array('id'=>$course->id));
         $navigation->add(get_string('log:view', 'coursereport_log'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('i/report', ''));
     }
-    if (has_capability('coursereport/log:viewlive', $context)) {
-        $livelogs = get_string('livelogs');
-        $url = new moodle_url('/course/report/log/live.php', array('id'=>$course->id));
-        $link = new action_link($url, $livelogs, new popup_action('click', $url, 'livelog', array('height' => 500, 'width' => 800)));
-        $navigation->add($livelogs, $link, navigation_node::TYPE_SETTING, null, null, new pix_icon('i/report', ''));
-    }
-}
\ No newline at end of file
+}