Index: trunk/extensions/EducationProgram/specials/SpecialEnroll.php |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | if ( $course === false ) { |
63 | 63 | $this->showWarning( wfMessage( 'ep-enroll-invalid-id' ) ); |
64 | 64 | } |
65 | | - elseif ( $course->getStatus() === 'current' ) { |
| 65 | + elseif ( in_array( $course->getStatus(), array( 'current', 'planned' ) ) ) { |
66 | 66 | $this->setPageTitle( $course ); |
67 | 67 | |
68 | 68 | $token = ''; |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | $this->onSuccess(); |
121 | 121 | } |
122 | 122 | else { |
123 | | - $this->showEnrollmentForm( $course ); |
| 123 | + $this->showEnrollmentForm(); |
124 | 124 | } |
125 | 125 | } |
126 | 126 | else { |
— | — | @@ -256,10 +256,8 @@ |
257 | 257 | * Create and display the enrollment form. |
258 | 258 | * |
259 | 259 | * @since 0.1 |
260 | | - * |
261 | | - * @param EPCourse $course |
262 | 260 | */ |
263 | | - protected function showEnrollmentForm( EPCourse $course ) { |
| 261 | + protected function showEnrollmentForm() { |
264 | 262 | $this->getOutput()->addWikiMsg( 'ep-enroll-header' ); |
265 | 263 | |
266 | 264 | $form = new HTMLForm( $this->getFormFields(), $this->getContext() ); |