Skip to content
Snippets Groups Projects
Commit 3b0a598f authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

remove bogus code from renaming tools, re #4633

Merge request studip/studip!3449
parent bcc397de
No related branches found
No related tags found
No related merge requests found
......@@ -215,7 +215,7 @@ class Course_ContentmodulesController extends AuthenticatedController
$this->module = PluginManager::getInstance()->getPluginById($module_id);
$this->metadata = $this->module->getMetadata();
$this->original_name = $this->metadata['diplayname'] ?? $this->module->getMetadata()['displayname'];
$this->original_name = $this->metadata['displayname'] ?? $this->module->getPluginName();
PageLayout::setTitle(_('Werkzeug umbenennen'));
$this->tool = ToolActivation::find([$context->id, $module_id]);
......
......@@ -3,7 +3,6 @@
* @var Course_ContentmodulesController $controller
* @var StudipModule $module
* @var string $original_name
* @var array $metadata
* @var ToolActivation $tool
*/
?>
......@@ -16,7 +15,7 @@
<?= _('Neuer Name des Werkzeugs') ?>
<input type="text"
name="displayname"
value="<?= htmlReady($tool['metadata']['displayname'] ?? '') ?>"
value="<?= htmlReady($tool->metadata['displayname'] ?? '') ?>"
placeholder="<?= htmlReady($original_name) ?>">
</label>
......@@ -26,7 +25,7 @@
</fieldset>
<div data-dialog-button>
<?= \Studip\Button::create(_('Speichern'))?>
<? if (!empty($tool['metadata']['displayname'])) : ?>
<? if (!empty($tool->metadata['displayname'])) : ?>
<?= \Studip\Button::create(_('Namen löschen'), 'delete') ?>
<? endif ?>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment