aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/ilias_interface.php10
-rw-r--r--app/controllers/course/ilias_interface.php8
-rw-r--r--app/controllers/my_ilias_accounts.php2
3 files changed, 12 insertions, 8 deletions
diff --git a/app/controllers/admin/ilias_interface.php b/app/controllers/admin/ilias_interface.php
index 9f1e244..4703cff 100644
--- a/app/controllers/admin/ilias_interface.php
+++ b/app/controllers/admin/ilias_interface.php
@@ -383,9 +383,13 @@ class Admin_IliasInterfaceController extends AuthenticatedController
$this->ilias_configs[$index]['category_to_desktop'] = Request::get('ilias_category_to_desktop');
$this->ilias_configs[$index]['workgroup_category_name'] = Request::get('ilias_workgroup_category_name');
- foreach ($this->modules_available as $module_index => $module_name) {
- if (Request::get('ilias_modules_'.$module_index)) {
- $this->ilias_configs[$index]['modules'][$module_index] = $module_name;
+ if (!empty($this->ilias_interface_config['create_objects'])) {
+ foreach ($this->modules_available as $module_index => $module_name) {
+ if (Request::get('ilias_modules_'.$module_index)) {
+ $this->ilias_configs[$index]['modules'][$module_index] = $module_name;
+ } else {
+ unset($this->ilias_configs[$index]['modules'][$module_index]);
+ }
}
}
diff --git a/app/controllers/course/ilias_interface.php b/app/controllers/course/ilias_interface.php
index c0c8b02..c631790 100644
--- a/app/controllers/course/ilias_interface.php
+++ b/app/controllers/course/ilias_interface.php
@@ -89,13 +89,13 @@ class Course_IliasInterfaceController extends AuthenticatedController
if (($this->module_count == 0) && (!$this->courses)) {
if (Context::isInstitute()) {
- if ($this->ilias_interface_config['create_objects']) {
+ if (!empty($this->ilias_interface_config['create_objects'])) {
PageLayout::postInfo(_('Momentan sind dieser Einrichtung keine Lernobjekte zugeordnet.'));
} else {
PageLayout::postInfo(_('Momentan sind dieser Einrichtung keine ILIAS-Kurse zugeordnet.'));
}
} else {
- if ($this->ilias_interface_config['create_objects']) {
+ if (!empty($this->ilias_interface_config['create_objects'])) {
PageLayout::postInfo(_('Momentan sind dieser Veranstaltung keine Lernobjekte zugeordnet.'));
} else {
PageLayout::postInfo(_('Momentan ist dieser Veranstaltung kein ILIAS-Kurs zugeordnet.'));
@@ -113,7 +113,7 @@ class Course_IliasInterfaceController extends AuthenticatedController
Icon::create('add')
)->asDialog();
}
- if ($this->author_permission && $this->ilias_interface_config['create_objects']) {
+ if ($this->author_permission && !empty($this->ilias_interface_config['create_objects']) && !empty($this->ilias_interface_config['create_category'])) {
$widget->addLink(
_('Meine Lernobjekte'),
$this->url_for('course/ilias_interface/add_object/my_modules'),
@@ -249,7 +249,7 @@ class Course_IliasInterfaceController extends AuthenticatedController
*/
public function add_object_action($mode = 'search', $index = '')
{
- if ($this->ilias_interface_config['create_objects']) {
+ if (!empty($this->ilias_interface_config['create_objects'])) {
PageLayout::setTitle(_('Lernobjekt hinzufügen'));
} else {
PageLayout::setTitle(_('Neuen ILIAS-Kurs anlegen'));
diff --git a/app/controllers/my_ilias_accounts.php b/app/controllers/my_ilias_accounts.php
index 3b8716b..bbb7ecf 100644
--- a/app/controllers/my_ilias_accounts.php
+++ b/app/controllers/my_ilias_accounts.php
@@ -567,7 +567,7 @@ class MyIliasAccountsController extends AuthenticatedController
$this->ilias = new ConnectedIlias($index);
$token = $this->ilias->user->getToken();
$session_id = $this->ilias->soap_client->loginUser($this->ilias->user->getUsername(), $token);
- if ($this->ilias->ilias_config['category_create_on_add_module'] && $GLOBALS['perm']->have_perm($this->ilias->ilias_config['author_perm']) && ($target == 'new') && ! $module_id) {
+ if (!empty($this->ilias->ilias_interface_config['create_category']) && !empty($this->ilias->ilias_config['category_create_on_add_module']) && $GLOBALS['perm']->have_perm($this->ilias->ilias_config['author_perm']) && ($target == 'new') && ! $module_id) {
$this->ilias->newUserCategory();
$module_id = $this->ilias->user->category;
}