aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/course/avatar.php
blob: b5b34d2c1dde8d53eaadb058b02b09c31a46ebd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?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);
    }
}