Index: trunk/extensions/EducationProgram/includes/EPCourse.php |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | protected static function getFieldTypes() { |
84 | 84 | return array( |
85 | 85 | 'id' => 'id', |
86 | | - 'course_id' => 'id', |
| 86 | + 'mc_id' => 'id', |
87 | 87 | 'org_id' => 'id', |
88 | 88 | |
89 | 89 | 'year' => 'int', |
— | — | @@ -213,7 +213,7 @@ |
214 | 214 | |
215 | 215 | if ( $success && $this->updateSummaries ) { |
216 | 216 | EPOrg::updateSummaryFields( array( 'terms', 'active' ), array( 'id' => $this->getField( 'org_id' ) ) ); |
217 | | - EPCourse::updateSummaryFields( 'active', array( 'id' => $this->getField( 'course_id' ) ) ); |
| 217 | + EPMC::updateSummaryFields( 'active', array( 'id' => $this->getField( 'mc_id' ) ) ); |
218 | 218 | } |
219 | 219 | |
220 | 220 | return $success; |
— | — | @@ -227,9 +227,9 @@ |
228 | 228 | $id = $this->getId(); |
229 | 229 | |
230 | 230 | if ( $this->updateSummaries ) { |
231 | | - $this->loadFields( array( 'org_id', 'course_id' ) ); |
| 231 | + $this->loadFields( array( 'org_id', 'mc_id' ) ); |
232 | 232 | $orgId = $this->getField( 'org_id' ); |
233 | | - $courseId = $this->getField( 'course_id' ); |
| 233 | + $courseId = $this->getField( 'mc_id' ); |
234 | 234 | } |
235 | 235 | |
236 | 236 | $success = parent::removeFromDB(); |
— | — | @@ -253,14 +253,14 @@ |
254 | 254 | protected function updateInDB() { |
255 | 255 | if ( $this->updateSummaries ) { |
256 | 256 | $oldOrgId = $this->hasField( 'org_id' ) ? self::selectFieldsRow( 'org_id', array( 'id' => $this->getId() ) ) : false; |
257 | | - $oldCourseId = $this->hasField( 'course_id' ) ? self::selectFieldsRow( 'course_id', array( 'id' => $this->getId() ) ) : false; |
| 257 | + $oldCourseId = $this->hasField( 'mc_id' ) ? self::selectFieldsRow( 'mc_id', array( 'id' => $this->getId() ) ) : false; |
258 | 258 | } |
259 | 259 | |
260 | | - if ( $this->hasField( 'course_id' ) ) { |
261 | | - $oldCourseId = self::selectFieldsRow( 'course_id', array( 'id' => $this->getId() ) ); |
| 260 | + if ( $this->hasField( 'mc_id' ) ) { |
| 261 | + $oldCourseId = self::selectFieldsRow( 'mc_id', array( 'id' => $this->getId() ) ); |
262 | 262 | |
263 | | - if ( $this->getField( 'course_id' ) !== $oldCourseId ) { |
264 | | - $this->setField( 'org_id', EPCourse::selectFieldsRow( 'org_id', array( 'id' => $this->getField( 'course_id' ) ) ) ); |
| 263 | + if ( $this->getField( 'mc_id' ) !== $oldCourseId ) { |
| 264 | + $this->setField( 'org_id', EPCourse::selectFieldsRow( 'org_id', array( 'id' => $this->getField( 'mc_id' ) ) ) ); |
265 | 265 | } |
266 | 266 | } |
267 | 267 | |
— | — | @@ -269,11 +269,11 @@ |
270 | 270 | if ( $this->updateSummaries && $success ) { |
271 | 271 | if ( $oldOrgId !== false && $oldOrgId !== $this->getField( 'org_id' ) ) { |
272 | 272 | $conds = array( 'id' => array( $oldOrgId, $this->getField( 'org_id' ) ) ); |
273 | | - EPOrg::updateSummaryFields( array( 'terms', 'students', 'active' ), $conds ); |
| 273 | + EPOrg::updateSummaryFields( array( 'courses', 'students', 'active' ), $conds ); |
274 | 274 | } |
275 | 275 | |
276 | 276 | if ( $oldCourseId !== false && $oldCourseId !== $this->getField( 'org_id' ) ) { |
277 | | - $conds = array( 'id' => array( $oldCourseId, $this->getField( 'course_id' ) ) ); |
| 277 | + $conds = array( 'id' => array( $oldCourseId, $this->getField( 'mc_id' ) ) ); |
278 | 278 | EPCourse::updateSummaryFields( array( 'active', 'students' ), $conds ); |
279 | 279 | } |
280 | 280 | } |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -78,9 +78,9 @@ |
79 | 79 | 'logentry-ambassador-selfadd' => '$1 added {{GENDER:$2|himself|herself}} as ambassador to course $3', |
80 | 80 | 'logentry-ambassador-selfremove' => '$1 removed {{GENDER:$2|himself|herself}} as ambassador from course $3', |
81 | 81 | |
82 | | - 'logentry-student-enroll' => '$1 enrolled in term $3', |
83 | | - 'logentry-student-remove' => '$1 removed $4 as student from term $3', |
84 | | - 'logentry-student-selfremove' => '$1 removed {{GENDER:$2|his|her}} enrollment from term $3', |
| 82 | + 'logentry-student-enroll' => '$1 enrolled in course $3', |
| 83 | + 'logentry-student-remove' => '$1 removed $4 as student from course $3', |
| 84 | + 'logentry-student-selfremove' => '$1 removed {{GENDER:$2|his|her}} enrollment from course $3', |
85 | 85 | |
86 | 86 | // Preferences |
87 | 87 | 'prefs-education' => 'Education', |
— | — | @@ -89,24 +89,24 @@ |
90 | 90 | // Rights |
91 | 91 | 'right-ep-org' => 'Manage Education Program institutions', |
92 | 92 | 'right-ep-course' => 'Manage Education Program courses', |
93 | | - 'right-ep-term' => 'Manage Education Program terms', |
| 93 | + 'right-ep-mcs' => 'Manage Education Program master courses', |
94 | 94 | 'right-ep-token' => 'See Education Program enrollment tokens', |
95 | | - 'right-ep-remstudent' => 'Remove students from terms', |
96 | | - 'right-ep-enroll' => 'Enroll in Education Program terms', |
97 | | - 'right-ep-online' => 'Add or remove online ambassadors to terms', |
98 | | - 'right-ep-campus' => 'Add or remove campus ambassadors to terms', |
99 | | - 'right-ep-instructor' => 'Add or remove instructors to courses', |
| 95 | + 'right-ep-remstudent' => 'Remove students from courses', |
| 96 | + 'right-ep-enroll' => 'Enroll in Education Program courses', |
| 97 | + 'right-ep-online' => 'Add or remove online ambassadors to courses', |
| 98 | + 'right-ep-campus' => 'Add or remove campus ambassadors to courses', |
| 99 | + 'right-ep-instructor' => 'Add or remove instructors to master courses', |
100 | 100 | |
101 | 101 | // Actions |
102 | 102 | 'action-ep-org' => 'manage institutions', |
103 | 103 | 'action-ep-course' => 'manage courses', |
104 | | - 'action-ep-term' => 'manage terms', |
| 104 | + 'action-ep-mc' => 'manage master courses', |
105 | 105 | 'action-ep-token' => 'see enrollment tokens', |
106 | | - 'action-ep-remstudent' => 'remove students from terms', |
107 | | - 'action-ep-enroll' => 'enroll in terms', |
108 | | - 'action-ep-online' => 'add or remove online ambassadors to terms', |
109 | | - 'action-ep-campus' => 'add or remove campus ambassadors to terms', |
110 | | - 'action-ep-instructor' => 'add or remove instructors to courses', |
| 106 | + 'action-ep-remstudent' => 'remove students from courses', |
| 107 | + 'action-ep-enroll' => 'enroll in courses', |
| 108 | + 'action-ep-online' => 'add or remove online ambassadors to courses', |
| 109 | + 'action-ep-campus' => 'add or remove campus ambassadors to courses', |
| 110 | + 'action-ep-instructor' => 'add or remove instructors to master courses', |
111 | 111 | |
112 | 112 | // Groups |
113 | 113 | 'group-epadmin' => 'Education program admins', |
— | — | @@ -177,16 +177,16 @@ |
178 | 178 | 'ep-courses-noorgs' => 'You are not a mentor of any institutions yet, so cannot add any courses.', |
179 | 179 | 'ep-courses-neworg' => 'Institution', |
180 | 180 | |
181 | | - // Special:Terms |
182 | | - 'ep-terms-nosuchterm' => 'There is no term with id "$1". Existing terms are listed below.', |
183 | | - 'ep-terms-noresults' => 'There are no terms to list.', |
184 | | - 'ep-terms-addnew' => 'Add a new term', |
185 | | - 'ep-terms-namedoc' => 'Enter the course the term belongs to and the year in which it is active.', |
186 | | - 'ep-terms-newyear' => 'Term year:', |
187 | | - 'ep-terms-newcourse' => 'Term course:', |
188 | | - 'ep-terms-add' => 'Add term', |
189 | | - 'ep-terms-nocourses' => 'There are no courses yet. You need to [[Special:Courses|add a course]] before you can create any terms.', |
190 | | - 'ep-terms-addcoursefirst' => 'The institutions you are a mentor for do not have any courses associated with them. You need to [[Special:Courses|add a course]] before you can create any terms.', |
| 181 | + // Special:Courses |
| 182 | + 'ep-courses-nosuchcourse' => 'There is no course with id "$1". Existing courses are listed below.', |
| 183 | + 'ep-courses-noresults' => 'There are no courses to list.', |
| 184 | + 'ep-courses-addnew' => 'Add a new course', |
| 185 | + 'ep-courses-namedoc' => 'Enter the master course the course belongs to and the year in which it is active.', |
| 186 | + 'ep-courses-newyear' => 'Course year:', |
| 187 | + 'ep-courses-newcourse' => 'Course master course:', |
| 188 | + 'ep-courses-add' => 'Add course', |
| 189 | + 'ep-courses-nocourses' => 'There are no master courses yet. You need to [[Special:MasterCourses|add a master course]] before you can create any courses.', |
| 190 | + 'ep-courses-addcoursefirst' => 'The institutions you are a mentor for do not have any master courses associated with them. You need to [[Special:MasterCourses|add a master course]] before you can create any courses.', |
191 | 191 | |
192 | 192 | // Special:Students |
193 | 193 | 'ep-students-noresults' => 'There are no students to list.', |
— | — | @@ -208,35 +208,35 @@ |
209 | 209 | 'eporgpager-filter-country' => 'Country', |
210 | 210 | 'eporgpager-header-courses' => 'Courses', |
211 | 211 | 'eporgpager-header-students' => 'Students', |
212 | | - 'eporgpager-header-terms' => 'Terms', |
| 212 | + 'eporgpager-header-mcs' => 'Master courses', |
213 | 213 | 'eporgpager-header-active' => 'Active', |
214 | 214 | 'eporgpager-filter-active' => 'Active courses', |
215 | 215 | 'eporgpager-yes' => 'Yes', |
216 | 216 | 'eporgpager-no' => 'No', |
217 | 217 | |
| 218 | + // Master course pager |
| 219 | + 'epmcpager-header-name' => 'Name', |
| 220 | + 'epmcpager-header-org-id' => 'Institution', |
| 221 | + 'epmcpager-filter-org-id' => 'Institution', |
| 222 | + 'epmcpager-header-students' => 'Students', |
| 223 | + 'epmcpager-header-active' => 'Active', |
| 224 | + 'epmcpager-filter-active' => 'Active courses', |
| 225 | + 'epmcpager-yes' => 'Yes', |
| 226 | + 'epmcpager-no' => 'No', |
| 227 | + |
218 | 228 | // Course pager |
219 | | - 'epcoursepager-header-name' => 'Name', |
220 | | - 'epcoursepager-header-org-id' => 'Institution', |
| 229 | + 'epcoursepager-header-id' => 'Id', |
| 230 | + 'epcoursepager-header-course-id' => 'Master course', |
| 231 | + 'epcoursepager-header-year' => 'Year', |
| 232 | + 'epcoursepager-header-start' => 'Start', |
| 233 | + 'epcoursepager-header-end' => 'End', |
| 234 | + 'epcoursepager-filter-course-id' => 'Master course', |
| 235 | + 'epcoursepager-filter-year' => 'Year', |
221 | 236 | 'epcoursepager-filter-org-id' => 'Institution', |
| 237 | + 'epcoursepager-header-status' => 'Status', |
| 238 | + 'epcoursepager-filter-status' => 'Status', |
222 | 239 | 'epcoursepager-header-students' => 'Students', |
223 | | - 'epcoursepager-header-active' => 'Active', |
224 | | - 'epcoursepager-filter-active' => 'Active terms', |
225 | | - 'epcoursepager-yes' => 'Yes', |
226 | | - 'epcoursepager-no' => 'No', |
227 | 240 | |
228 | | - // Term pager |
229 | | - 'eptermpager-header-id' => 'Id', |
230 | | - 'eptermpager-header-course-id' => 'Course', |
231 | | - 'eptermpager-header-year' => 'Year', |
232 | | - 'eptermpager-header-start' => 'Start', |
233 | | - 'eptermpager-header-end' => 'End', |
234 | | - 'eptermpager-filter-course-id' => 'Course', |
235 | | - 'eptermpager-filter-year' => 'Year', |
236 | | - 'eptermpager-filter-org-id' => 'Institution', |
237 | | - 'eptermpager-header-status' => 'Status', |
238 | | - 'eptermpager-filter-status' => 'Status', |
239 | | - 'eptermpager-header-students' => 'Students', |
240 | | - |
241 | 241 | // Student pager |
242 | 242 | 'epstudentpager-header-user-id' => 'User', |
243 | 243 | 'epstudentpager-header-id' => 'Id', |
— | — | @@ -268,19 +268,19 @@ |
269 | 269 | 'ep-course-invalid-description' => 'This description is to short. It needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
270 | 270 | 'ep-course-invalid-org' => 'This institution does not exist', |
271 | 271 | |
272 | | - // Special:EditTerm |
273 | | - 'editterm-add-legend' => 'Add term', |
274 | | - 'editterm-edit-legend' => 'Edit term', |
275 | | - 'ep-term-edit-year' => 'Year', |
276 | | - 'ep-term-edit-course' => 'Course', |
277 | | - 'ep-term-edit-start' => 'Start date', |
278 | | - 'ep-term-edit-end' => 'End date', |
279 | | - 'ep-term-edit-token' => 'Enrollment token', |
280 | | - 'ep-term-edit-description' => 'Description', |
| 272 | + // Special:EditCourse |
| 273 | + 'editcourse-add-legend' => 'Add course', |
| 274 | + 'editcourse-edit-legend' => 'Edit course', |
| 275 | + 'ep-course-edit-year' => 'Year', |
| 276 | + 'ep-course-edit-mastercourse' => 'Master course', |
| 277 | + 'ep-course-edit-start' => 'Start date', |
| 278 | + 'ep-course-edit-end' => 'End date', |
| 279 | + 'ep-course-edit-token' => 'Enrollment token', |
| 280 | + 'ep-course-edit-description' => 'Description', |
281 | 281 | |
282 | | - 'ep-term-invalid-course' => 'This course does not exist.', |
283 | | - 'ep-term-invalid-token' => 'The token needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
284 | | - 'ep-term-invalid-description' => 'The description needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
| 282 | + 'ep-course-invalid-mastercourse' => 'This master course does not exist.', |
| 283 | + 'ep-course-invalid-token' => 'The token needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
| 284 | + 'ep-course-invalid-description' => 'The description needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
285 | 285 | |
286 | 286 | // ep.pager |
287 | 287 | 'ep-pager-confirm-delete' => 'Are you sure you want to delete this item?', |
— | — | @@ -325,19 +325,19 @@ |
326 | 326 | 'ep-course-become-instructor' => 'Become instructor', |
327 | 327 | 'ep-course-add-instructor' => 'Add an instructor', |
328 | 328 | |
329 | | - // Special:Term |
330 | | - 'ep-term-title' => 'Term: $1', |
331 | | - 'ep-term-students' => 'Students', |
332 | | - 'ep-term-none' => 'There is no term with id "$1". See [[Special:Terms|here]] for a list of terms.', |
333 | | - 'ep-term-create' => 'There is no term with id "$1", but you can create a new one.', |
334 | | - 'specialterm-summary-org' => 'Institution', |
335 | | - 'specialterm-summary-course' => 'Course', |
336 | | - 'specialterm-summary-year' => 'Year', |
337 | | - 'specialterm-summary-start' => 'Start', |
338 | | - 'specialterm-summary-end' => 'End', |
339 | | - 'ep-term-description' => 'description', |
340 | | - 'specialterm-summary-token' => 'Enrollment token', |
341 | | - 'ep-term-nav-edit' => 'Edit this term', |
| 329 | + // Special:Course |
| 330 | + 'ep-course-title' => 'Course: $1', |
| 331 | + 'ep-course-students' => 'Students', |
| 332 | + 'ep-course-none' => 'There is no course with id "$1". See [[Special:Courses|here]] for a list of courses.', |
| 333 | + 'ep-course-create' => 'There is no course with id "$1", but you can create a new one.', |
| 334 | + 'specialcourse-summary-org' => 'Institution', |
| 335 | + 'specialcourse-summary-mastercourse' => 'Master course', |
| 336 | + 'specialcourse-summary-year' => 'Year', |
| 337 | + 'specialcourse-summary-start' => 'Start', |
| 338 | + 'specialcourse-summary-end' => 'End', |
| 339 | + 'ep-course-description' => 'description', |
| 340 | + 'specialcourse-summary-token' => 'Enrollment token', |
| 341 | + 'ep-course-nav-edit' => 'Edit this course', |
342 | 342 | |
343 | 343 | // Special:Ambassador |
344 | 344 | 'ep-ambassador-does-not-exist' => 'There is no ambassador with name "$1". See [[Special:Ambassadors|here]] for a list of ambassadors.', |
— | — | @@ -352,7 +352,7 @@ |
353 | 353 | 'specialstudent-summary-last-active' => 'Last activity', |
354 | 354 | 'specialstudent-summary-first-enroll' => 'First enrollment', |
355 | 355 | 'specialstudent-summary-user' => 'User', |
356 | | - 'ep-student-terms' => 'Terms this student has enrolled in', |
| 356 | + 'ep-student-courses' => 'Courses this student has enrolled in', |
357 | 357 | |
358 | 358 | // Special:Enroll |
359 | 359 | 'ep-enroll-title' => 'Enroll for $1 at $2', |
— | — | @@ -360,8 +360,8 @@ |
361 | 361 | 'ep-enroll-login-and-enroll' => 'Login with an existing account & enroll', |
362 | 362 | 'ep-enroll-signup-and-enroll' => 'Create a new account & enroll', |
363 | 363 | 'ep-enroll-not-allowed' => 'Your account is not allowed to enroll', |
364 | | - 'ep-enroll-invalid-id' => 'The term you tried to enroll for does not exist. A list of existing terms can be found [[Special:Terms|here]].', |
365 | | - 'ep-enroll-no-id' => 'You need to specify a term to enroll for. A list of existing terms can be found [[Special:Terms|here]].', |
| 364 | + 'ep-enroll-invalid-id' => 'The course you tried to enroll for does not exist. A list of existing courses can be found [[Special:Courses|here]].', |
| 365 | + 'ep-enroll-no-id' => 'You need to specify a course to enroll for. A list of existing courses can be found [[Special:Courses|here]].', |
366 | 366 | 'ep-enroll-invalid-token' => 'The token you provided is invalid.', |
367 | 367 | 'ep-enroll-legend' => 'Enroll', |
368 | 368 | 'ep-enroll-header' => 'In order to enroll for this course, all you need to do is fill out this form and click the submission button. After that you will be enrolled.', |
— | — | @@ -370,11 +370,11 @@ |
371 | 371 | 'ep-enroll-invalid-name' => 'The name needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
372 | 372 | 'ep-enroll-invalid-gender' => 'Please select one of these genders', |
373 | 373 | 'ep-enroll-add-token' => 'Enter your enrollment token', |
374 | | - 'ep-enroll-add-token-doc' => 'In order to enroll for this term, you need a token provided by your instructor or one of the ambassadors for your term.', |
| 374 | + 'ep-enroll-add-token-doc' => 'In order to enroll for this course, you need a token provided by your instructor or one of the ambassadors for your course.', |
375 | 375 | 'ep-enroll-token' => 'Enrollment token', |
376 | 376 | 'ep-enroll-submit-token' => 'Enroll with this token', |
377 | | - 'ep-enroll-term-passed' => 'This term has ended, so you can no longer enroll for it. A list of existing terms can be found [[Special:Terms|here]].', |
378 | | - 'ep-enroll-term-planned' => 'This term has not yet started, please be patient. A list of existing terms can be found [[Special:Terms|here]].', |
| 377 | + 'ep-enroll-course-passed' => 'This course has ended, so you can no longer enroll for it. A list of existing courses can be found [[Special:Courses|here]].', |
| 378 | + 'ep-enroll-course-planned' => 'This course has not yet started, please be patient. A list of existing courses can be found [[Special:Courses|here]].', |
379 | 379 | |
380 | 380 | // Special:MyCourses |
381 | 381 | 'ep-mycourses-enrolled' => 'You have successfully enrolled for $1 at $2.', |