mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
19 lines
565 B
PHP
19 lines
565 B
PHP
<?php
|
|
|
|
if (!defined('MOODLE_INTERNAL')) {
|
|
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
|
|
}
|
|
|
|
if (has_capability('coursereport/stats:view', $context)) {
|
|
if (!empty($CFG->enablestats)) {
|
|
echo '<p>';
|
|
echo '<a href="'.$CFG->wwwroot.'/course/report/stats/index.php?course='.$course->id.'">'.get_string('stats').'</a>';
|
|
echo '</p>';
|
|
} else {
|
|
echo '<p>';
|
|
echo get_string('statsoff');
|
|
echo '</p>';
|
|
}
|
|
}
|
|
|