diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
|---|---|---|
| committer | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
| commit | 4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch) | |
| tree | 5c07151ae61276d334e88f6309c30d439a85c12e /lib/modules/FeedbackModule.php | |
| parent | da0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff) | |
| parent | 97a188592c679890a25c37ab78463add76a52ff7 (diff) | |
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/modules/FeedbackModule.php')
| -rw-r--r-- | lib/modules/FeedbackModule.php | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/lib/modules/FeedbackModule.php b/lib/modules/FeedbackModule.php new file mode 100644 index 0000000..2fc657d --- /dev/null +++ b/lib/modules/FeedbackModule.php @@ -0,0 +1,71 @@ +<?php + +/** + * FeedbackModule.php - Feedback Elements for Stud.IP as Module. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * @author Nils Gehrke <nils.gehrke@uni-goettingen.de> + * @license https://www.gnu.org/licenses/gpl-2.0.html GPL version 2 + */ +class FeedbackModule extends CorePlugin implements StudipModule, SystemPlugin +{ + /** + * {@inheritdoc} + */ + public function getInfoTemplate($course_id) + { + return null; + } + + /** + * {@inheritdoc} + */ + public function getIconNavigation($course_id, $last_visit, $user_id) + { + return null; + } + + /** + * {@inheritdoc} + */ + public function getTabNavigation($course_id) + { + if (Feedback::hasAdminPerm($course_id)) { + $navigation = new Navigation(_('Feedback')); + $navigation->addSubNavigation('index', new Navigation(_('Übersicht'), 'dispatch.php/course/feedback')); + return ['feedback' => $navigation]; + } + + return []; + } + /** + * {@inheritdoc} + */ + public function getMetadata() + { + return [ + 'summary' => _('Einholen von Feedback zu Inhaltselementen'), + 'description' => _('Ermöglicht das Anlegen von Feedback-Elementen an verschiedenen Inhalten, sodass Nutzer dort ein Feedback zum Inhalt geben können. Dies kann aus einer Punkt- bzw. Sternbewertung bestehen oder nur aus einem Kommentar.'), + 'category' => _('Kommunikation und Zusammenarbeit'), + 'keywords' => _('Anlegen von Feedback-Elementen an verschiedenen Stellen; Auswahl verschiedener Feedback-Modi, wie Sternbewertung; Übersicht über alle Feedback-Elemente einer Veranstaltung'), + 'icon' => Icon::create('star', Icon::ROLE_INFO), + 'icon_clickable' => Icon::create('star', Icon::ROLE_CLICKABLE), + 'screenshots' => [ + 'path' => 'assets/images/plus/screenshots/Feedback', + 'pictures' => [ + ['source' => 'FeedbackIndex.png', 'title' => 'Übersichtsseite des Feedbacktools'], + ['source' => 'FeedbackAnDatei.png', 'title' => 'Inhaltselement an einer Datei'] + ] + ] + ]; + } + + public function isActivatableForContext(Range $context) + { + return $context->getRangeType() === 'course'; + } +} |
