https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114056

Revision: 114056
Author:   jeroendedauw
Date:     2012-03-17 16:26:30 +0000 (Sat, 17 Mar 2012)
Log Message:
-----------
address 
http://education.wmflabs.org/wiki/Thread:MW_1.18_talk:Community_portal/planned_course_/_enrolling

Modified Paths:
--------------
    trunk/extensions/EducationProgram/specials/SpecialEnroll.php

Modified: trunk/extensions/EducationProgram/specials/SpecialEnroll.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialEnroll.php        
2012-03-17 15:12:43 UTC (rev 114055)
+++ trunk/extensions/EducationProgram/specials/SpecialEnroll.php        
2012-03-17 16:26:30 UTC (rev 114056)
@@ -61,7 +61,7 @@
                        if ( $course === false ) {
                                $this->showWarning( wfMessage( 
'ep-enroll-invalid-id' ) );
                        }
-                       elseif ( $course->getStatus() === 'current' ) {
+                       elseif ( in_array( $course->getStatus(), array( 
'current', 'planned' ) ) ) {
                                $this->setPageTitle( $course );
                                
                                $token = '';
@@ -119,7 +119,7 @@
                                        $this->onSuccess();
                                }
                                else {
-                                       $this->showEnrollmentForm( $course );
+                                       $this->showEnrollmentForm();
                                }
                        }
                        else {
@@ -256,10 +256,8 @@
         * Create and display the enrollment form.
         *
         * @since 0.1
-        *
-        * @param EPCourse $course
         */
-       protected function showEnrollmentForm( EPCourse $course ) {
+       protected function showEnrollmentForm() {
                $this->getOutput()->addWikiMsg( 'ep-enroll-header' );
 
                $form = new HTMLForm( $this->getFormFields(), 
$this->getContext() );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to