mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-35077 fix stats report navigation links
This commit is contained in:
parent
569f1ad63b
commit
6910d97d8b
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die;
|
|||
*/
|
||||
function report_stats_extend_navigation_course($navigation, $course, $context) {
|
||||
global $CFG;
|
||||
if (!empty($CFG->enablestats)) {
|
||||
if (empty($CFG->enablestats)) {
|
||||
return;
|
||||
}
|
||||
if (has_capability('report/stats:view', $context)) {
|
||||
|
@ -54,7 +54,7 @@ function report_stats_extend_navigation_course($navigation, $course, $context) {
|
|||
*/
|
||||
function report_stats_extend_navigation_user($navigation, $user, $course) {
|
||||
global $CFG;
|
||||
if (!empty($CFG->enablestats)) {
|
||||
if (empty($CFG->enablestats)) {
|
||||
return;
|
||||
}
|
||||
if (report_stats_can_access_user_report($user, $course)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue