r109690 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109689‎ | r109690 | r109691 >
Date:20:14, 21 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
follow up to r109656 - updated a bunch of messages
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPCourse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/includes/EPCourse.php
@@ -82,7 +82,7 @@
8383 protected static function getFieldTypes() {
8484 return array(
8585 'id' => 'id',
86 - 'course_id' => 'id',
 86+ 'mc_id' => 'id',
8787 'org_id' => 'id',
8888
8989 'year' => 'int',
@@ -213,7 +213,7 @@
214214
215215 if ( $success && $this->updateSummaries ) {
216216 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' ) ) );
218218 }
219219
220220 return $success;
@@ -227,9 +227,9 @@
228228 $id = $this->getId();
229229
230230 if ( $this->updateSummaries ) {
231 - $this->loadFields( array( 'org_id', 'course_id' ) );
 231+ $this->loadFields( array( 'org_id', 'mc_id' ) );
232232 $orgId = $this->getField( 'org_id' );
233 - $courseId = $this->getField( 'course_id' );
 233+ $courseId = $this->getField( 'mc_id' );
234234 }
235235
236236 $success = parent::removeFromDB();
@@ -253,14 +253,14 @@
254254 protected function updateInDB() {
255255 if ( $this->updateSummaries ) {
256256 $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;
258258 }
259259
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() ) );
262262
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' ) ) ) );
265265 }
266266 }
267267
@@ -269,11 +269,11 @@
270270 if ( $this->updateSummaries && $success ) {
271271 if ( $oldOrgId !== false && $oldOrgId !== $this->getField( 'org_id' ) ) {
272272 $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 );
274274 }
275275
276276 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' ) ) );
278278 EPCourse::updateSummaryFields( array( 'active', 'students' ), $conds );
279279 }
280280 }
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -78,9 +78,9 @@
7979 'logentry-ambassador-selfadd' => '$1 added {{GENDER:$2|himself|herself}} as ambassador to course $3',
8080 'logentry-ambassador-selfremove' => '$1 removed {{GENDER:$2|himself|herself}} as ambassador from course $3',
8181
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',
8585
8686 // Preferences
8787 'prefs-education' => 'Education',
@@ -89,24 +89,24 @@
9090 // Rights
9191 'right-ep-org' => 'Manage Education Program institutions',
9292 'right-ep-course' => 'Manage Education Program courses',
93 - 'right-ep-term' => 'Manage Education Program terms',
 93+ 'right-ep-mcs' => 'Manage Education Program master courses',
9494 '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',
100100
101101 // Actions
102102 'action-ep-org' => 'manage institutions',
103103 'action-ep-course' => 'manage courses',
104 - 'action-ep-term' => 'manage terms',
 104+ 'action-ep-mc' => 'manage master courses',
105105 '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',
111111
112112 // Groups
113113 'group-epadmin' => 'Education program admins',
@@ -177,16 +177,16 @@
178178 'ep-courses-noorgs' => 'You are not a mentor of any institutions yet, so cannot add any courses.',
179179 'ep-courses-neworg' => 'Institution',
180180
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.',
191191
192192 // Special:Students
193193 'ep-students-noresults' => 'There are no students to list.',
@@ -208,35 +208,35 @@
209209 'eporgpager-filter-country' => 'Country',
210210 'eporgpager-header-courses' => 'Courses',
211211 'eporgpager-header-students' => 'Students',
212 - 'eporgpager-header-terms' => 'Terms',
 212+ 'eporgpager-header-mcs' => 'Master courses',
213213 'eporgpager-header-active' => 'Active',
214214 'eporgpager-filter-active' => 'Active courses',
215215 'eporgpager-yes' => 'Yes',
216216 'eporgpager-no' => 'No',
217217
 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+
218228 // 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',
221236 'epcoursepager-filter-org-id' => 'Institution',
 237+ 'epcoursepager-header-status' => 'Status',
 238+ 'epcoursepager-filter-status' => 'Status',
222239 'epcoursepager-header-students' => 'Students',
223 - 'epcoursepager-header-active' => 'Active',
224 - 'epcoursepager-filter-active' => 'Active terms',
225 - 'epcoursepager-yes' => 'Yes',
226 - 'epcoursepager-no' => 'No',
227240
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 -
241241 // Student pager
242242 'epstudentpager-header-user-id' => 'User',
243243 'epstudentpager-header-id' => 'Id',
@@ -268,19 +268,19 @@
269269 'ep-course-invalid-description' => 'This description is to short. It needs to be at least contain $1 {{PLURAL:$1|character|characters}}.',
270270 'ep-course-invalid-org' => 'This institution does not exist',
271271
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',
281281
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}}.',
285285
286286 // ep.pager
287287 'ep-pager-confirm-delete' => 'Are you sure you want to delete this item?',
@@ -325,19 +325,19 @@
326326 'ep-course-become-instructor' => 'Become instructor',
327327 'ep-course-add-instructor' => 'Add an instructor',
328328
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',
342342
343343 // Special:Ambassador
344344 '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 @@
353353 'specialstudent-summary-last-active' => 'Last activity',
354354 'specialstudent-summary-first-enroll' => 'First enrollment',
355355 'specialstudent-summary-user' => 'User',
356 - 'ep-student-terms' => 'Terms this student has enrolled in',
 356+ 'ep-student-courses' => 'Courses this student has enrolled in',
357357
358358 // Special:Enroll
359359 'ep-enroll-title' => 'Enroll for $1 at $2',
@@ -360,8 +360,8 @@
361361 'ep-enroll-login-and-enroll' => 'Login with an existing account & enroll',
362362 'ep-enroll-signup-and-enroll' => 'Create a new account & enroll',
363363 '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]].',
366366 'ep-enroll-invalid-token' => 'The token you provided is invalid.',
367367 'ep-enroll-legend' => 'Enroll',
368368 '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 @@
371371 'ep-enroll-invalid-name' => 'The name needs to be at least contain $1 {{PLURAL:$1|character|characters}}.',
372372 'ep-enroll-invalid-gender' => 'Please select one of these genders',
373373 '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.',
375375 'ep-enroll-token' => 'Enrollment token',
376376 '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]].',
379379
380380 // Special:MyCourses
381381 'ep-mycourses-enrolled' => 'You have successfully enrolled for $1 at $2.',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109656schema changes currently completely breaking the extension and added hook to ...jeroendedauw22:24, 20 January 2012

Status & tagging log