r108616 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108615‎ | r108616 | r108617 >
Date:14:36, 11 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
work on student and term pagers
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPStudentPager.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPTermPager.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/includes/EPStudentPager.php
@@ -34,6 +34,9 @@
3535 return array(
3636 'id',
3737 'user_id',
 38+ 'first_enroll',
 39+ 'last_active',
 40+ 'active_enroll',
3841 );
3942 }
4043
@@ -68,12 +71,15 @@
6972
7073 $value = Linker::userLink( $value, $name ) . Linker::userToolLinks( $value, $name );
7174 break;
 75+ case 'first_enroll': case 'last_active':
 76+ htmlspecialchars( $this->getLanguage()->date( $value ) );
 77+ break;
 78+ case 'active_enroll':
 79+ $value = wfMsgHtml( $value === '1' ? 'epstudentpager-yes' : 'epstudentpager-no' );
 80+ break;
7281 case '_courses_current':
73 - $value = 'foo'; // TODO
 82+ $value = $this->getLanguage()->pipeList( $this->currentObject->getCurrentCourses() );
7483 break;
75 - case '_courses_passed':
76 - $value = 'bar'; // TODO
77 - break;
7884 }
7985
8086 return $value;
@@ -86,6 +92,9 @@
8793 protected function getSortableFields() {
8894 return array(
8995 'id',
 96+ 'first_enroll',
 97+ 'last_active',
 98+ 'active_enroll',
9099 );
91100 }
92101
@@ -113,7 +122,6 @@
114123 $fields = parent::getFieldNames();
115124
116125 $fields['_courses_current'] = 'current-courses';
117 - $fields['_courses_passed'] = 'passed-courses';
118126
119127 return $fields;
120128 }
Index: trunk/extensions/EducationProgram/includes/EPTermPager.php
@@ -74,9 +74,10 @@
7575 );
7676 break;
7777 case 'year':
 78+ $value = htmlspecialchars( $value );
7879 break;
7980 case 'start': case 'end':
80 - $value = $this->getLanguage()->date( $value );
 81+ $value = htmlspecialchars( $this->getLanguage()->date( $value ) );
8182 break;
8283 case '_status':
8384 $value = htmlspecialchars( EPTerm::getStatusMessage( $this->currentObject->getStatus() ) );
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -170,6 +170,11 @@
171171 'epstudentpager-header-id' => 'Id',
172172 'epstudentpager-header-current-courses' => 'Current courses',
173173 'epstudentpager-header-passed-courses' => 'Passed courses',
 174+ 'epstudentpager-header-first-enroll' => 'First enrollment',
 175+ 'epstudentpager-header-last-active' => 'Last active',
 176+ 'epstudentpager-header-active-enroll' => 'Currently enrolled',
 177+ 'epstudentpager-yes' => 'Yes',
 178+ 'epstudentpager-no' => 'No',
174179
175180 // Special:EditInstitution
176181 'editinstitution-text' => 'Enter the institution details below and click submit to save your changes.',

Follow-up revisions

RevisionCommit summaryAuthorDate
r108619follow up to r108616, fixed stuff fed to lang->pipelist and added some utilit...jeroendedauw14:52, 11 January 2012

Status & tagging log