r107668 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107667‎ | r107668 | r107669 >
Date:23:03, 30 December 2011
Author:jeroendedauw
Status:deferred
Tags:educationprogram 
Comment:
some work on special:mycourses
Modified paths:
  • /trunk/extensions/EducationProgram/specials/SpecialMyCourses.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/specials/SpecialMyCourses.php
@@ -44,10 +44,10 @@
4545 }
4646 else {
4747 if ( $this->subPage === '' ) {
48 - $this->displayCourse( $student, $this->subPage );
 48+ $this->displayCourses( $student );
4949 }
5050 else {
51 - $this->displayCourses( $student );
 51+ $this->displayCourse( $student, $this->subPage );
5252 }
5353 }
5454 }
@@ -57,10 +57,16 @@
5858
5959 if ( $student->hasTerm() ) {
6060 if ( $this->getRequest()->getCheck( 'enrolled' ) ) {
61 - $this->showSuccess( wfMessage( 'ep-mycourses-enrolled', '', '' ) ); // TODO
 61+ $term = EPTerm::selectRow( null, array( 'id' => $this->getRequest()->getInt( 'enrolled' ) ) );
 62+
 63+ if ( $term !== false ) {
 64+ $this->showSuccess( wfMessage(
 65+ 'ep-mycourses-enrolled',
 66+ $term->getCourse()->getField( 'name' ),
 67+ $term->getOrg()->getField( 'name' )
 68+ ) ); // TODO
 69+ }
6270 }
63 -
64 - $this->displayCourses( $student );
6571 }
6672 else {
6773 $out->addWikiMsg( 'ep-mycourses-not-enrolled' );

Status & tagging log