mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-71274 analytics: Don't generate insight for hidden courses
Hidden courses can be used for training but we do not want to generate insights for them because students do not have access to hidden courses. This was fixed in MDL-66806 for "Students at risk" model. Fixed for "Students who have not accessed the course recently" in this issue.
This commit is contained in:
parent
a5f0b354e7
commit
8732ddd5d3
1 changed files with 4 additions and 0 deletions
|
@ -103,6 +103,10 @@ class no_recent_accesses extends course_enrolments {
|
||||||
return get_string('nocoursestudents', 'course');
|
return get_string('nocoursestudents', 'course');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$fortraining && !$course->get_course_data()->visible) {
|
||||||
|
return get_string('hiddenfromstudents');
|
||||||
|
}
|
||||||
|
|
||||||
if ($course->get_end() && $course->get_end() < $course->get_start()) {
|
if ($course->get_end() && $course->get_end() < $course->get_start()) {
|
||||||
return get_string('errorendbeforestart', 'course');
|
return get_string('errorendbeforestart', 'course');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue