timeline: if a section is set to hidden and the user is not capable of editing a...
[moodle-blog-course-format.git] / course / report / stats / mod.php
blobe1257b4a9f356af256cdb11d8ff70987cdbd6ddd
1 <?php //$Id$
3 if (!defined('MOODLE_INTERNAL')) {
4 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
7 if (has_capability('coursereport/stats:view', $context)) {
8 if (!empty($CFG->enablestats)) {
9 echo '<p>';
10 echo '<a href="'.$CFG->wwwroot.'/course/report/stats/index.php?course='.$course->id.'">'.get_string('stats').'</a>';
11 echo '</p>';
12 } else {
13 echo '<p>';
14 echo get_string('statsoff');
15 echo '</p>';