Skip to content

Commit c6bf939

Browse files
committed
Fix course information retrieval
If some of the course information could not be retrieved from the EvaSys system, do not abort the whole retrieval process but instead skip the respective course and continue with the other courses. This is especially problematic for Moodle courses which are connected with several EvaSys courses. Without this patch the block displays "course missing" for all of the connected courses even if only one of the courses does not exist in EvaSys.
1 parent 9cc7313 commit c6bf939

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

classes/evasys_synchronizer.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,15 @@ private function get_course_information() {
7474
foreach ($this->get_allocated_courses() as $course) {
7575
$soapresult = $this->soapclient->GetCourse($course, 'PUBLIC', true, true);
7676
if (is_soap_fault($soapresult)) {
77-
// var_dump("soap verbindung nicht funktioniert");
78-
// This happens e.g. if there is no corresponding course in EvaSys.
79-
return null;
77+
// This happens e.g. if there is no corresponding course in
78+
// EvaSys.
79+
$result[$course] = null;
80+
} else {
81+
$result[$course] = $soapresult;
8082
}
81-
$result[$course] = $soapresult;
83+
8284
}
83-
return $result;
85+
return $result;
8486
}
8587

8688
/**

0 commit comments

Comments
 (0)