Revert "Merge branch 'MDL-43127-master' of git://github.com/FMCorz/moodle"

This reverts commit 4e75dd78e6, reversing
changes made to f376c2ffd7.
This commit is contained in:
Dan Poltawski
2014-11-27 09:33:52 +00:00
parent e6f5a4b268
commit 853b6cff9b
7 changed files with 18 additions and 233 deletions
+2 -11
View File
@@ -207,7 +207,6 @@ class tool_uploadcourse_processor {
$course = $this->get_course($data);
if ($course->prepare()) {
$course->proceed();
$outcome = 1;
$status = $course->get_statuses();
if (array_key_exists('coursecreated', $status)) {
@@ -218,19 +217,11 @@ class tool_uploadcourse_processor {
$deleted++;
}
// Errors can occur even though the course preparation returned true, often because
// some checks could not be done in course::prepare() because it requires the course to exist.
if ($course->has_errors()) {
$status += $course->get_errors();
$errors++;
$outcome = 2;
}
$data = array_merge($data, $course->get_data(), array('id' => $course->get_id()));
$tracker->output($this->linenb, $outcome, $status, $data);
$tracker->output($this->linenb, true, $status, $data);
} else {
$errors++;
$tracker->output($this->linenb, 0, $course->get_errors(), $data);
$tracker->output($this->linenb, false, $course->get_errors(), $data);
}
}