MediaWiki r110977 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r110976‎ | r110977 (on ViewVC)‎ | r110978 >
Date:23:08, 8 February 2012
Author:jeroendedauw
Status:deferred
Tags:educationprogram, nodeploy 
Comment:
added nav links to ambassador profiles
Modified paths:

Diff [purge]

Index: trunk/extensions/EducationProgram/includes/EPUtils.php
@@ -190,9 +190,19 @@
191191
192192 $items[wfMsg( 'ep-nav-cas' )] = SpecialPage::getTitleFor( 'CampusAmbassadors' );
193193
194 - if ( EPStudent::has( array( 'user_id' => $context->getUser()->getId() ) ) ) {
 194+ $user = $context->getUser();
 195+
 196+ if ( EPStudent::has( array( 'user_id' => $user->getId() ) ) ) {
195197 $items[wfMsg( 'ep-nav-mycourses' )] = SpecialPage::getTitleFor( 'MyCourses' );
196198 }
 199+
 200+ if ( $user->isAllowed( 'ep-online' ) && EPOA::newFromUser( $user )->hasCourse() ) {
 201+ $items[wfMsg( 'ep-nav-oaprofile' )] = SpecialPage::getTitleFor( 'OnlineAmbassadorProfile' );
 202+ }
 203+
 204+ if ( $user->isAllowed( 'ep-campus' ) && EPCA::newFromUser( $user )->hasCourse() ) {
 205+ $items[wfMsg( 'ep-nav-caprofile' )] = SpecialPage::getTitleFor( 'CampusAmbassadorProfile' );
 206+ }
197207
198208 return $items;
199209 }
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -49,6 +49,8 @@
5050 'ep-nav-mentors' => 'Ambassador list',
5151 'ep-nav-cas' => 'Campus Ambassadors',
5252 'ep-nav-oas' => 'Online Ambassadors',
 53+ 'ep-nav-oaprofile' => 'Online Ambassador profile',
 54+ 'ep-nav-caprofile' => 'Campus Ambassador profile',
5355
5456 // Logging
5557 'log-name-institution' => 'Education Program institution log',

Status & tagging log

  • 23:17, 8 February 2012 Reedy (Talk | contribs) changed the status of r110977 [removed: new added: deferred]
  • 23:09, 8 February 2012 MarkAHershberger (Talk | contribs) changed the tags for r110977 [added: educationprogram,nodeploy]
Personal tools
Namespaces

Variants
Views
Actions
Navigation
Support
Download
Development
Communication
Toolbox