Skip to content
Snippets Groups Projects
Commit bffdb471 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

fix ILIAS 4 CMS interface, fixes #252

parent f2d9f928
No related branches found
No related tags found
No related merge requests found
...@@ -35,8 +35,8 @@ class Course_ElearningController extends AuthenticatedController ...@@ -35,8 +35,8 @@ class Course_ElearningController extends AuthenticatedController
PageLayout::setTitle(Context::getHeaderLine(). " - " . _("Lernmodule")); PageLayout::setTitle(Context::getHeaderLine(). " - " . _("Lernmodule"));
checkObject(); // do we have an open object? checkObject(); // do we have an open object?
checkObjectModule('elearning_interface'); $module = checkObjectModule('ElearningInterface');
object_set_visit_module('elearning_interface'); object_set_visit_module($module->getPluginId());
$this->search_key = Request::get('search_key'); $this->search_key = Request::get('search_key');
$GLOBALS['search_key'] = $this->search_key; $GLOBALS['search_key'] = $this->search_key;
......
...@@ -149,8 +149,12 @@ class ConnectedCMS ...@@ -149,8 +149,12 @@ class ConnectedCMS
// check for SOAP-Interface // check for SOAP-Interface
if (in_array($this->CLASS_PREFIX, ['Ilias3','Ilias4','Ilias5'])) if (in_array($this->CLASS_PREFIX, ['Ilias3','Ilias4','Ilias5']))
{ {
$check = @get_headers($this->ABSOLUTE_PATH_ELEARNINGMODULES . 'login.php'); $ch = curl_init($this->ABSOLUTE_PATH_ELEARNINGMODULES . 'login.php');
if (strpos($check[0], '200') === false) { 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); $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 { } else {
...@@ -455,4 +459,4 @@ class ConnectedCMS ...@@ -455,4 +459,4 @@ class ConnectedCMS
public function deleteConnectedModules($object_id){ public function deleteConnectedModules($object_id){
return ObjectConnections::DeleteAllConnections($object_id, $this->cms_type); return ObjectConnections::DeleteAllConnections($object_id, $this->cms_type);
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment