blob: 8c153a800c00168531757c76454533e00b3d99d8 (
plain)
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
|
<?php
/**
* This class represents the avatar of a course.
*
* @author Marcus Lunzenauer (mlunzena@uos)
* @copyright (c) Authors
* @license GPL2 or any later version
* @since 1.10
*/
class CourseAvatar extends Avatar
{
public const AVATAR_TYPE = 'course';
/**
* Returns the CSS class to use for this avatar image.
*
* @param string one of the constants Avatar::(NORMAL|MEDIUM|SMALL)
*
* @return string CSS class to use for the avatar
*/
protected function getCssClass($size)
{
return "course-avatar-{$size} course-{$this->user_id}";
}
/**
* Return the default title of the avatar.
* @return string the default title
*/
public function getDefaultTitle()
{
return Seminar::GetInstance($this->user_id)->name;
}
/**
* Return if avatar is visible to the current user.
* @return boolean: true if visible
*/
protected function checkAvatarVisibility()
{
//no special conditions for visibility of course-avatars yet
return true;
}
}
|