r108919 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108918‎ | r108919 | r108920 >
Date:16:59, 14 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fix incorrect display of courses on special:mycourses
Modified paths:
  • /trunk/extensions/EducationProgram/includes/EPStudent.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/includes/EPStudent.php
@@ -169,9 +169,8 @@
170170 * @return array of EPCourse
171171 */
172172 public function getCurrentCourses( $fields = null, array $conditions = array() ) {
173 - return $this->getCourses( $fields, $conditions, array(
174 - 'end >= ' . wfGetDB( DB_SLAVE )->addQuotes( wfTimestampNow() )
175 - ) );
 173+ $conditions['active'] = 1;
 174+ return $this->getCourses( $fields, $conditions );
176175 }
177176
178177 /**
@@ -185,9 +184,8 @@
186185 * @return array of EPCourse
187186 */
188187 public function getPassedCourses( $fields = null, array $conditions = array() ) {
189 - return $this->getCourses( $fields, $conditions, array(
190 - 'end < ' . wfGetDB( DB_SLAVE )->addQuotes( wfTimestampNow() )
191 - ) );
 188+ $conditions['active'] = 0;
 189+ return $this->getCourses( $fields, $conditions );
192190 }
193191
194192 /**

Status & tagging log