MDL-73981 tool_uploadcourse: Validate enrolment role from csv.

This commit is contained in:
Ilya Tregubov
2022-05-05 07:39:50 +06:00
parent 81e5d425c4
commit c1ebec7cbc
7 changed files with 235 additions and 38 deletions
@@ -219,6 +219,10 @@ class tool_uploadcourse_processor {
$data = array_merge($data, $course->get_data(), array('id' => $course->get_id()));
$tracker->output($this->linenb, true, $status, $data);
if ($course->has_errors()) {
$errors++;
$tracker->output($this->linenb, false, $course->get_errors(), $data);
}
} else {
$errors++;
$tracker->output($this->linenb, false, $course->get_errors(), $data);