aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-02-14 09:41:45 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-02-14 09:41:45 +0000
commit5b10cf620f58eee2d365cffb44e18c83eb722db6 (patch)
treed59a65e121da9a601181325977a431962fecd9f9 /app
parent10e3c80b73802f1d70f7b4b3c8ad4ef71f4799be (diff)
fixes #3562
Closes #3562 Merge request studip/studip!2444
Diffstat (limited to 'app')
-rw-r--r--app/controllers/course/contentmodules.php2
-rw-r--r--app/views/course/contentmodules/rename.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/course/contentmodules.php b/app/controllers/course/contentmodules.php
index 7a54ee1..adb3055 100644
--- a/app/controllers/course/contentmodules.php
+++ b/app/controllers/course/contentmodules.php
@@ -134,7 +134,7 @@ class Course_ContentmodulesController extends AuthenticatedController
Navigation::getItem('/course/admin')->setActive(true);
$this->render_json([
'tabs' => $template->render(),
- 'position' => $active_tool->position
+ 'position' => isset($active_tool) ? $active_tool->position : null,
]);
}
diff --git a/app/views/course/contentmodules/rename.php b/app/views/course/contentmodules/rename.php
index c7f4ef7..f2ee248 100644
--- a/app/views/course/contentmodules/rename.php
+++ b/app/views/course/contentmodules/rename.php
@@ -8,11 +8,11 @@
<input type="text"
name="displayname"
value="<?= $tool && $tool['metadata'] ? htmlReady($tool['metadata']['displayname']) : ''?>"
- placeholder="<?= htmlReady($metadata['displayname']) ?>">
+ placeholder="<?= htmlReady($metadata['displayname'] ?? '') ?>">
</label>
<div>
- <?= htmlReady(sprintf(_('Ursprünglicher Werkzeugname ist "%s".'), $metadata['displayname'])) ?>
+ <?= htmlReady(sprintf(_('Ursprünglicher Werkzeugname ist "%s".'), $metadata['displayname'] ?? '')) ?>
</div>
</fieldset>
<div data-dialog-button>