From 2bb5a64adfa449fb1f4a6383eafe48b76daed5d9 Mon Sep 17 00:00:00 2001 From: Moritz Strohm Date: Thu, 3 Apr 2025 13:22:17 +0200 Subject: changed view --- app/controllers/course/lti.php | 10 ++-- app/views/course/lti/share_as_tool.php | 94 +++++++++++++++++----------------- 2 files changed, 53 insertions(+), 51 deletions(-) diff --git a/app/controllers/course/lti.php b/app/controllers/course/lti.php index 1060168..0987e3b 100644 --- a/app/controllers/course/lti.php +++ b/app/controllers/course/lti.php @@ -996,10 +996,12 @@ class Course_LtiController extends StudipController $this->share_as_tool = CourseConfig::get($this->course_id)->SHARE_COURSE_AS_LTI_TOOL; $this->lti_entry_point = CourseConfig::get($this->course_id)->LTI_TOOL_ENTRY_POINT; $this->plugin_data = $this->getPluginData($this->course_id); - $this->platforms = LtiPlatform::findBySQL( - "`range_id` = :course_id ORDER BY `name` ASC", - ['course_id' => $this->course_id] - ); + if ($this->share_as_tool) { + $this->platforms = LtiPlatform::findBySQL( + "`range_id` = :course_id ORDER BY `name` ASC", + ['course_id' => $this->course_id] + ); + } } public function save_share_as_tool_settings_action() diff --git a/app/views/course/lti/share_as_tool.php b/app/views/course/lti/share_as_tool.php index fb26c98..143988e 100644 --- a/app/views/course/lti/share_as_tool.php +++ b/app/views/course/lti/share_as_tool.php @@ -5,6 +5,7 @@ * @var bool $share_as_tool * @var array $plugin_data * @var int $lti_entry_point + * @var ?LtiPlatform[] $platforms */ ?>
@@ -53,51 +54,50 @@
-
-

-
- - - - - - - - - - - url_for('course/lti/add_platform', ['cid' => $this->course_id])) ?> - - - - - - - - - - -
name) ?>responsible_person?->getFullName() ?? _('unbekannt')) ?> - addLink( - $controller->url_for('course/lti/edit_platform/' . $platform->id), - Icon::create('edit'), - ['data-dialog' => 'reload-on-close'] - ); - $menu->addLink( - $controller->url_for('course/lti/delete_platform/' . $platform->id), - Icon::create('trash'), - ['data-confirm' => studip_interpolate( - _('Soll die Plattform %{name} wirklich gelöscht werden?'), - ['name' => $platform->name] - )] - ); - $menu->render(); - ?> -
- - - + +
+

+
+ + + + + + + + + + + + + + + + + + +
name) ?>responsible_person?->getFullName() ?? _('unbekannt')) ?> + addLink( + $controller->url_for('course/lti/edit_platform/' . $platform->id), + Icon::create('edit'), + ['data-dialog' => 'reload-on-close'] + ); + $menu->addLink( + $controller->url_for('course/lti/delete_platform/' . $platform->id), + Icon::create('trash'), + ['data-confirm' => studip_interpolate( + _('Soll die Plattform %{name} wirklich gelöscht werden?'), + ['name' => $platform->name] + )] + ); + $menu->render(); + ?> +
+ + + +
-
+ -- cgit v1.0