r114567 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114566‎ | r114567 | r114568 >
Date:18:24, 28 March 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
do not use real names after all
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.settings.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPRoleObject.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/EducationProgram.settings.php
@@ -64,6 +64,7 @@
6565 'fallbackFlag' => 'Nuvola unknown flag.svg',
6666 'courseDescPage' => 'MediaWiki:Course description',
6767 'courseOrgDescPage' => '$2/$1', // $1 = org name, $2 = courseDescPage setting
 68+ 'useStudentRealNames' => false,
6869 );
6970 }
7071
Index: trunk/extensions/EducationProgram/includes/EPRoleObject.php
@@ -95,14 +95,15 @@
9696 }
9797
9898 /**
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.
100100 *
101101 * @since 0.1
102102 *
103103 * @return string
104104 */
105105 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();
107108 }
108109
109110 /**

Status & tagging log