MDL-59063 analytics: Finished courses can't be used for prediction
This commit is contained in:
@@ -292,6 +292,7 @@ $string['counteditems'] = '{$a->count} {$a->items}';
|
||||
$string['country'] = 'Country';
|
||||
$string['course'] = 'Course';
|
||||
$string['courseadministration'] = 'Course administration';
|
||||
$string['coursealreadyfinished'] = 'Course already finished';
|
||||
$string['courseapprovedemail'] = 'Your requested course, {$a->name}, has been approved and you have been made a {$a->teacher}. To access your new course, go to {$a->url}';
|
||||
$string['courseapprovedemail2'] = 'Your requested course, {$a->name}, has been approved. To access your new course, go to {$a->url}';
|
||||
$string['courseapprovedfailed'] = 'Failed to save the course as approved!';
|
||||
|
||||
@@ -158,6 +158,11 @@ class course_dropout extends \core_analytics\local\target\binary {
|
||||
return get_string('coursetoolong', 'analytics');
|
||||
}
|
||||
|
||||
// Finished courses can not be used to get predictions.
|
||||
if (!$fortraining && $course->is_finished()) {
|
||||
return get_string('coursealreadyfinished');
|
||||
}
|
||||
|
||||
// Ongoing courses data can not be used to train.
|
||||
if ($fortraining && !$course->is_finished()) {
|
||||
return get_string('coursenotyetfinished');
|
||||
|
||||
Reference in New Issue
Block a user