diff options
| author | Michaela Brückner <brueckner@data-quest.de> | 2025-06-24 13:01:56 +0200 |
|---|---|---|
| committer | Michaela Brückner <brueckner@data-quest.de> | 2025-06-24 13:01:56 +0200 |
| commit | 9360ea5d075fddbbec3dedb51e064b13d9f05343 (patch) | |
| tree | 04e2ed1099af5300ac230df79a49ff6b34d4256c /app/controllers | |
| parent | 885302f3c38d2c96eda74db2e7fb4063055dca3f (diff) | |
re #4754
Merge request studip/studip!3796
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/admin/ilias_interface.php | 6 | ||||
| -rw-r--r-- | app/controllers/course/ilias_interface.php | 20 |
2 files changed, 20 insertions, 6 deletions
diff --git a/app/controllers/admin/ilias_interface.php b/app/controllers/admin/ilias_interface.php index dfb8f0a..ee069c4 100644 --- a/app/controllers/admin/ilias_interface.php +++ b/app/controllers/admin/ilias_interface.php @@ -104,6 +104,8 @@ class Admin_IliasInterfaceController extends AuthenticatedController $this->ilias_interface_config['cache'] = Request::bool('ilias_interface_cache', false); $this->ilias_interface_config['allow_change_course'] = Request::get('ilias_interface_allow_change_course'); $this->ilias_interface_config['allow_add_own_course'] = Request::get('ilias_interface_allow_add_own_course'); + $this->ilias_interface_config['create_category'] = (boolean)Request::get('ilias_interface_create_category'); + $this->ilias_interface_config['create_objects'] = (boolean)Request::get('ilias_interface_create_objects'); //store config entry Config::get()->store('ILIAS_INTERFACE_BASIC_SETTINGS', $this->ilias_interface_config); @@ -433,14 +435,14 @@ class Admin_IliasInterfaceController extends AuthenticatedController } if (array_key_exists($ilias_role, $this->global_roles)) { $this->ilias_configs[$index]['additional_roles'][$studip_role][$ilias_role] = [ - 'id' => $this->global_roles[$ilias_role]['id'], + 'id' => $this->global_roles[$ilias_role]['id'], 'name' => $this->global_roles[$ilias_role]['name']]; PageLayout::postSuccess(sprintf(_('ILIAS-Rolle %s wird Stud.IP-Rechtestufe %s zugewiesen.'), $this->global_roles[$ilias_role]['name'], $studip_role)); } else { PageLayout::postError(_('ILIAS-Rolle nicht gefunden.')); } } - } + } //store config entry Config::get()->store('ILIAS_INTERFACE_SETTINGS', $this->ilias_configs); diff --git a/app/controllers/course/ilias_interface.php b/app/controllers/course/ilias_interface.php index d79ed0b..13307bf 100644 --- a/app/controllers/course/ilias_interface.php +++ b/app/controllers/course/ilias_interface.php @@ -89,9 +89,17 @@ class Course_IliasInterfaceController extends AuthenticatedController if (($this->module_count == 0) && (!$this->courses)) { if (Context::isInstitute()) { - PageLayout::postInfo(_('Momentan sind dieser Einrichtung keine Lernobjekte zugeordnet.')); + if ($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 { - PageLayout::postInfo(_('Momentan sind dieser Veranstaltung keine Lernobjekte zugeordnet.')); + if ($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.')); + } } } @@ -105,7 +113,7 @@ class Course_IliasInterfaceController extends AuthenticatedController Icon::create('add') )->asDialog(); } - if ($this->author_permission) { + if ($this->author_permission && $this->ilias_interface_config['create_objects']) { $widget->addLink( _('Meine Lernobjekte'), $this->url_for('course/ilias_interface/add_object/my_modules'), @@ -241,7 +249,11 @@ class Course_IliasInterfaceController extends AuthenticatedController */ public function add_object_action($mode = 'search', $index = '') { - PageLayout::setTitle(_('Lernobjekt hinzufügen')); + if ($this->ilias_interface_config['create_objects']) { + PageLayout::setTitle(_('Lernobjekt hinzufügen')); + } else { + PageLayout::setTitle(_('Neuen ILIAS-Kurs anlegen')); + } if (!$this->edit_permission) { throw new AccessDeniedException(); |
