Index: trunk/extensions/EducationProgram/specials/SpecialInstitution.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | * |
30 | 30 | * @since 0.1 |
31 | 31 | * |
32 | | - * @param string $arg |
| 32 | + * @param string $subPage |
33 | 33 | */ |
34 | 34 | public function execute( $subPage ) { |
35 | 35 | parent::execute( $subPage ); |
Index: trunk/extensions/EducationProgram/specials/SpecialEnroll.php |
— | — | @@ -188,8 +188,10 @@ |
189 | 189 | |
190 | 190 | $success = $student->writeToDB(); |
191 | 191 | |
192 | | - if ( $success ) {//q($this->term); |
| 192 | + if ( $success ) { |
193 | 193 | $success = $student->associateWithTerms( array( $this->term ) ) && $success; |
| 194 | + $this->getUser()->setOption( 'ep_showtoplink', true ); |
| 195 | + $this->getUser()->saveSettings(); // TODO: can't we just save this single option instead of everything? |
194 | 196 | } |
195 | 197 | |
196 | 198 | if ( $success ) { |
Index: trunk/extensions/EducationProgram/specials/SpecialCourse.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | * |
30 | 30 | * @since 0.1 |
31 | 31 | * |
32 | | - * @param string $arg |
| 32 | + * @param string $subPage |
33 | 33 | */ |
34 | 34 | public function execute( $subPage ) { |
35 | 35 | parent::execute( $subPage ); |
Index: trunk/extensions/EducationProgram/specials/SpecialTerm.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | * |
30 | 30 | * @since 0.1 |
31 | 31 | * |
32 | | - * @param string $arg |
| 32 | + * @param string $subPage |
33 | 33 | */ |
34 | 34 | public function execute( $subPage ) { |
35 | 35 | parent::execute( $subPage ); |
Index: trunk/extensions/EducationProgram/specials/SpecialStudent.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | * |
29 | 29 | * @since 0.1 |
30 | 30 | * |
31 | | - * @param string $arg |
| 31 | + * @param string $subPage |
32 | 32 | */ |
33 | 33 | public function execute( $subPage ) { |
34 | 34 | parent::execute( $subPage ); |
Index: trunk/extensions/EducationProgram/includes/EPOrg.php |
— | — | @@ -197,7 +197,8 @@ |
198 | 198 | $pager->getFilterControl() . |
199 | 199 | $pager->getNavigationBar() . |
200 | 200 | $pager->getBody() . |
201 | | - $pager->getNavigationBar() |
| 201 | + $pager->getNavigationBar() . |
| 202 | + $pager->getMultipleItemControl() |
202 | 203 | ); |
203 | 204 | } |
204 | 205 | else { |
Index: trunk/extensions/EducationProgram/includes/EPTerm.php |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | |
157 | 157 | /** |
158 | 158 | * Adds a control to add a term org to the provided context. |
159 | | - * Adittional arguments can be provided to set the default values for the control fields. |
| 159 | + * Additional arguments can be provided to set the default values for the control fields. |
160 | 160 | * |
161 | 161 | * @since 0.1 |
162 | 162 | * |
Index: trunk/extensions/EducationProgram/includes/EPCourse.php |
— | — | @@ -149,7 +149,7 @@ |
150 | 150 | |
151 | 151 | /** |
152 | 152 | * Adds a control to add a new course to the provided context. |
153 | | - * Adittional arguments can be provided to set the default values for the control fields. |
| 153 | + * Additional arguments can be provided to set the default values for the control fields. |
154 | 154 | * |
155 | 155 | * @since 0.1 |
156 | 156 | * |
— | — | @@ -256,7 +256,8 @@ |
257 | 257 | $pager->getFilterControl() . |
258 | 258 | $pager->getNavigationBar() . |
259 | 259 | $pager->getBody() . |
260 | | - $pager->getNavigationBar() |
| 260 | + $pager->getNavigationBar() . |
| 261 | + $pager->getMultipleItemControl() |
261 | 262 | ); |
262 | 263 | } |
263 | 264 | else { |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -24,6 +24,10 @@ |
25 | 25 | 'ep-item-summary' => 'Summary', |
26 | 26 | 'ep-toplink' => 'My courses', |
27 | 27 | |
| 28 | + // Preferences |
| 29 | + 'prefs-education' => 'Education', |
| 30 | + 'ep-prefs-showtoplink' => 'Show a link to [[Special:MyCourses|your courses]] at the top of every page.', |
| 31 | + |
28 | 32 | // Rights |
29 | 33 | 'right-epadmin' => 'Manage the education program', |
30 | 34 | 'right-epstudent' => 'Enroll in the education program', |
— | — | @@ -211,7 +215,8 @@ |
212 | 216 | 'ep-enroll-legend' => 'Enroll', |
213 | 217 | |
214 | 218 | // Special:MyCourses |
215 | | - 'ep-mycourses-enrolled' => 'You have successfully enrolled for $1 at $2', |
| 219 | + 'ep-mycourses-enrolled' => 'You have successfully enrolled for $1 at $2.', |
| 220 | + 'ep-mycourses-not-enrolled' => 'You are not enrolled in any course. A list of courses can be found [[Special:Courses|here]].', |
216 | 221 | |
217 | 222 | // Navigation links |
218 | 223 | 'ep-nav-orgs' => 'Institution list', |
Index: trunk/extensions/EducationProgram/EducationProgram.hooks.php |
— | — | @@ -96,6 +96,13 @@ |
97 | 97 | * @return true |
98 | 98 | */ |
99 | 99 | public static function onGetPreferences( User $user, array &$preferences ) { |
| 100 | + if ( EPSettings::get( 'enableTopLink' ) ) { |
| 101 | + $preferences['ep_showtoplink'] = array( |
| 102 | + 'type' => 'toggle', |
| 103 | + 'label-message' => 'ep-prefs-showtoplink', |
| 104 | + 'section' => 'education', |
| 105 | + ); |
| 106 | + } |
100 | 107 | |
101 | 108 | return true; |
102 | 109 | } |