Index: trunk/extensions/EducationProgram/EducationProgram.settings.php |
— | — | @@ -64,6 +64,7 @@ |
65 | 65 | 'fallbackFlag' => 'Nuvola unknown flag.svg', |
66 | 66 | 'courseDescPage' => 'MediaWiki:Course description', |
67 | 67 | 'courseOrgDescPage' => '$2/$1', // $1 = org name, $2 = courseDescPage setting |
| 68 | + 'useStudentRealNames' => false, |
68 | 69 | ); |
69 | 70 | } |
70 | 71 | |
Index: trunk/extensions/EducationProgram/includes/EPRoleObject.php |
— | — | @@ -95,14 +95,15 @@ |
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
99 | | - * Returns the name of the instroctor, using their real name when available. |
| 99 | + * Returns the name of the user, possibly using their real name when available. |
100 | 100 | * |
101 | 101 | * @since 0.1 |
102 | 102 | * |
103 | 103 | * @return string |
104 | 104 | */ |
105 | 105 | public function getName() { |
106 | | - return $this->getUser()->getRealName() === '' ? $this->getUser()->getName() : $this->getUser()->getRealName(); |
| 106 | + return !EPSettings::get( 'useStudentRealNames' ) || $this->getUser()->getRealName() === '' ? |
| 107 | + $this->getUser()->getName() : $this->getUser()->getRealName(); |
107 | 108 | } |
108 | 109 | |
109 | 110 | /** |