1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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';
}
}
|