diff --git a/app/controllers/course/elearning.php b/app/controllers/course/elearning.php index 8993bb689a99207f7d7acac9607226a9bd6bfc01..3b1055a154fa5950d57255f539c2fa487c3dddab 100644 --- a/app/controllers/course/elearning.php +++ b/app/controllers/course/elearning.php @@ -35,8 +35,8 @@ class Course_ElearningController extends AuthenticatedController PageLayout::setTitle(Context::getHeaderLine(). " - " . _("Lernmodule")); checkObject(); // do we have an open object? - checkObjectModule('elearning_interface'); - object_set_visit_module('elearning_interface'); + $module = checkObjectModule('ElearningInterface'); + object_set_visit_module($module->getPluginId()); $this->search_key = Request::get('search_key'); $GLOBALS['search_key'] = $this->search_key; diff --git a/lib/elearning/ConnectedCMS.class.php b/lib/elearning/ConnectedCMS.class.php index 72457617690cbc23b2b14bf5706b7efe56fdc0a8..b18c071f1e454840bc6faa68e5e83150aa2f0ad1 100644 --- a/lib/elearning/ConnectedCMS.class.php +++ b/lib/elearning/ConnectedCMS.class.php @@ -149,8 +149,12 @@ class ConnectedCMS // check for SOAP-Interface if (in_array($this->CLASS_PREFIX, ['Ilias3','Ilias4','Ilias5'])) { - $check = @get_headers($this->ABSOLUTE_PATH_ELEARNINGMODULES . 'login.php'); - if (strpos($check[0], '200') === false) { + $ch = curl_init($this->ABSOLUTE_PATH_ELEARNINGMODULES . 'login.php'); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_exec($ch); + + if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) !== 200) { $msg["path"]["error"] = sprintf(_("Die Verbindung zum System \"%s\" konnte nicht hergestellt werden. Der Pfad \"$this->ABSOLUTE_PATH_ELEARNINGMODULES\" ist ungültig."), $this->name); } else { @@ -455,4 +459,4 @@ class ConnectedCMS public function deleteConnectedModules($object_id){ return ObjectConnections::DeleteAllConnections($object_id, $this->cms_type); } -} \ No newline at end of file +}