blob: 9063b51b658e2aa57d482368165cc35721effc73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
class Course_AvatarController extends AuthenticatedController
{
public function index_action()
{
$this->course_id = Context::getId();
if (!$GLOBALS['perm']->have_studip_perm('tutor', $this->course_id)) {
throw new AccessDeniedException(_("Sie haben keine Berechtigung diese " .
"Veranstaltung zu verändern."));
}
PageLayout::setTitle(Context::getHeaderLine() . ' - ' . _('Veranstaltungsbild ändern'));
Navigation::activateItem('/course/admin/avatar');
$avatar = CourseAvatar::getAvatar($this->course_id);
$this->avatar_url = $avatar->getURL(Avatar::NORMAL);
if ($GLOBALS['perm']->have_studip_perm('admin', $this->course_id)) {
$widget = new CourseManagementSelectWidget();
Sidebar::get()->addWidget($widget);
}
}
}
|