Merge branch 'MDL-66806_master' of git://github.com/dmonllao/moodle
This commit is contained in:
@@ -115,6 +115,10 @@ abstract class course_enrolments extends \core_analytics\local\target\binary {
|
||||
return get_string('coursenotyetstarted', 'course');
|
||||
}
|
||||
|
||||
if (!$fortraining && !$course->get_course_data()->visible) {
|
||||
return get_string('hiddenfromstudents');
|
||||
}
|
||||
|
||||
if (!$this->students = $course->get_students()) {
|
||||
return get_string('nocoursestudents', 'course');
|
||||
}
|
||||
|
||||
@@ -130,6 +130,27 @@ class core_analytics_targets_testcase extends advanced_testcase {
|
||||
],
|
||||
'isvalid' => get_string('completionnotenabledforcourse', 'completion')
|
||||
],
|
||||
'coursehiddentraining' => [
|
||||
'params' => [
|
||||
'enablecompletion' => 1,
|
||||
'startdate' => mktime(0, 0, 0, $month - 1, 24, $year - 1),
|
||||
'enddate' => mktime(0, 0, 0, $month - 1, 23, $year),
|
||||
'students' => true,
|
||||
'visible' => '0',
|
||||
],
|
||||
'isvalid' => true,
|
||||
],
|
||||
'coursehiddenprediction' => [
|
||||
'params' => [
|
||||
'enablecompletion' => 1,
|
||||
'startdate' => mktime(0, 0, 0, $month - 1, 24, $year),
|
||||
'enddate' => mktime(0, 0, 0, $month - 1, 23, $year + 1),
|
||||
'students' => true,
|
||||
'visible' => '0',
|
||||
],
|
||||
'isvalid' => get_string('hiddenfromstudents'),
|
||||
'fortraining' => false
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user