r109853 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109852‎ | r109853 | r109854 >
Date:21:36, 23 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added status and student count fields to course pages
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialCourse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/specials/SpecialCourse.php
@@ -107,10 +107,16 @@
108108 htmlspecialchars( $masterCourse )
109109 );
110110
111 - $stats['year'] = htmlspecialchars( $this->getLanguage()->formatNum( $course->getField( 'year' ), true ) );
112 - $stats['start'] = htmlspecialchars( $this->getLanguage()->timeanddate( $course->getField( 'start' ), true ) );
113 - $stats['end'] = htmlspecialchars( $this->getLanguage()->timeanddate( $course->getField( 'end' ), true ) );
 111+ $lang = $this->getLanguage();
114112
 113+ $stats['year'] = htmlspecialchars( $lang->formatNum( $course->getField( 'year' ), true ) );
 114+ $stats['start'] = htmlspecialchars( $lang->timeanddate( $course->getField( 'start' ), true ) );
 115+ $stats['end'] = htmlspecialchars( $lang->timeanddate( $course->getField( 'end' ), true ) );
 116+
 117+ $stats['students'] = htmlspecialchars( $lang->formatNum( $course->getField( 'students' ) ) );
 118+
 119+ $stats['status'] = htmlspecialchars( EPCourse::getStatusMessage( $course->getStatus() ) );
 120+
115121 if ( $this->getUser()->isAllowed( 'ep-token' ) ) {
116122 $stats['token'] = Linker::linkKnown(
117123 SpecialPage::getTitleFor( 'Enroll', $course->getId() . '/' . $course->getField( 'token' ) ),
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -347,6 +347,8 @@
348348 'specialcourse-summary-year' => 'Year',
349349 'specialcourse-summary-start' => 'Start',
350350 'specialcourse-summary-end' => 'End',
 351+ 'specialcourse-summary-students' => 'Student count',
 352+ 'specialcourse-summary-status' => 'Status',
351353 'ep-course-description' => 'description',
352354 'specialcourse-summary-token' => 'Enrollment token',
353355 'ep-course-nav-edit' => 'Edit this course',

Status & tagging log