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

This reverts commit 6ae2ce8802, reversing
changes made to 04334d635f.
This commit is contained in:
Dan Poltawski
2014-11-27 09:35:35 +00:00
parent f9ed85a8e5
commit d6ff91bb4f
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);
}
}