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:
@@ -103,6 +103,10 @@ class no_recent_accesses extends course_enrolments {
|
||||
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()) {
|
||||
return get_string('errorendbeforestart', 'course');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user