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
)) {
10 echo '<a href="'.$CFG->wwwroot
.'/course/report/stats/index.php?course='.$course->id
.'">'.get_string('stats').'</a>';
14 echo get_string('statsoff');