Index: trunk/extensions/EducationProgram/specials/SpecialInstitution.php |
— | — | @@ -69,12 +69,12 @@ |
70 | 70 | |
71 | 71 | $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-institution-courses' ) ) ); |
72 | 72 | |
73 | | - EPCourse::displayPager( $this->getContext(), array( 'org_id' => $org->getId() ) ); |
| 73 | + EPMC::displayPager( $this->getContext(), array( 'org_id' => $org->getId() ) ); |
74 | 74 | |
75 | 75 | if ( $this->getUser()->isAllowed( 'ep-course' ) ) { |
76 | 76 | $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-institution-add-course' ) ) ); |
77 | 77 | |
78 | | - EPCourse::displayAddNewControl( $this->getContext(), array( 'org' => $org->getId() ) ); |
| 78 | + EPMC::displayAddNewControl( $this->getContext(), array( 'org' => $org->getId() ) ); |
79 | 79 | } |
80 | 80 | } |
81 | 81 | } |
Index: trunk/extensions/EducationProgram/specials/SpecialEditCourse.php |
— | — | @@ -1,17 +1,17 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * Adittion and modification interface for courses. |
| 5 | + * Addition and modification interface for master courses. |
6 | 6 | * |
7 | 7 | * @since 0.1 |
8 | 8 | * |
9 | | - * @file SpecialEditCourse.php |
| 9 | + * @file SpecialEditMasterCourse.php |
10 | 10 | * @ingroup EducationProgram |
11 | 11 | * |
12 | 12 | * @licence GNU GPL v3 or later |
13 | 13 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | 14 | */ |
15 | | -class SpecialEditCourse extends SpecialEPFormPage { |
| 15 | +class SpecialEditMasterCourse extends SpecialEPFormPage { |
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Constructor. |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | * @since 0.1 |
21 | 21 | */ |
22 | 22 | public function __construct() { |
23 | | - parent::__construct( 'EditCourse', 'ep-course', 'EPCourse', 'Courses' ); |
| 23 | + parent::__construct( 'EditMasterCourse', 'ep-mc', 'EPMC', 'MasterCourses' ); |
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
— | — | @@ -32,11 +32,11 @@ |
33 | 33 | |
34 | 34 | $fields['name'] = array ( |
35 | 35 | 'type' => 'text', |
36 | | - 'label-message' => 'ep-course-edit-name', |
| 36 | + 'label-message' => 'ep-mc-edit-name', |
37 | 37 | 'maxlength' => 255, |
38 | 38 | 'required' => true, |
39 | 39 | 'validation-callback' => function ( $value, array $alldata = null ) { |
40 | | - return strlen( $value ) < 5 ? wfMsgExt( 'ep-course-invalid-name', 'parsemag', 5 ) : true; |
| 40 | + return strlen( $value ) < 5 ? wfMsgExt( 'ep-mc-invalid-name', 'parsemag', 5 ) : true; |
41 | 41 | } , |
42 | 42 | ); |
43 | 43 | |
— | — | @@ -44,20 +44,20 @@ |
45 | 45 | |
46 | 46 | $fields['org_id'] = array ( |
47 | 47 | 'type' => 'select', |
48 | | - 'label-message' => 'ep-course-edit-org', |
| 48 | + 'label-message' => 'ep-mc-edit-org', |
49 | 49 | 'required' => true, |
50 | 50 | 'options' => $orgOptions, |
51 | 51 | 'validation-callback' => function ( $value, array $alldata = null ) use ( $orgOptions ) { |
52 | | - return in_array( (int)$value, array_values( $orgOptions ) ) ? true : wfMsg( 'ep-course-invalid-org' ); |
| 52 | + return in_array( (int)$value, array_values( $orgOptions ) ) ? true : wfMsg( 'ep-mc-invalid-org' ); |
53 | 53 | } , |
54 | 54 | ); |
55 | 55 | |
56 | 56 | $fields['description'] = array ( |
57 | 57 | 'type' => 'textarea', |
58 | | - 'label-message' => 'ep-course-edit-description', |
| 58 | + 'label-message' => 'ep-mc-edit-description', |
59 | 59 | 'required' => true, |
60 | 60 | 'validation-callback' => function ( $value, array $alldata = null ) { |
61 | | - return strlen( $value ) < 10 ? wfMsgExt( 'ep-course-invalid-description', 'parsemag', 10 ) : true; |
| 61 | + return strlen( $value ) < 10 ? wfMsgExt( 'ep-mc-invalid-description', 'parsemag', 10 ) : true; |
62 | 62 | } , |
63 | 63 | 'rows' => 10, |
64 | 64 | 'id' => 'wpTextbox1', |
Index: trunk/extensions/EducationProgram/specials/SpecialEditTerm.php |
— | — | @@ -1,17 +1,17 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * Adittion and modification interface for terms. |
| 5 | + * Addition and modification interface for courses. |
6 | 6 | * |
7 | 7 | * @since 0.1 |
8 | 8 | * |
9 | | - * @file SpecialEditTerm.php |
| 9 | + * @file SpecialEditCourse.php |
10 | 10 | * @ingroup EducationProgram |
11 | 11 | * |
12 | 12 | * @licence GNU GPL v3 or later |
13 | 13 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | 14 | */ |
15 | | -class SpecialEditTerm extends SpecialEPFormPage { |
| 15 | +class SpecialEditCourse extends SpecialEPFormPage { |
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Constructor. |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | * @since 0.1 |
21 | 21 | */ |
22 | 22 | public function __construct() { |
23 | | - parent::__construct( 'EditCourse', 'ep-term', 'EPCourse', 'Courses' ); |
| 23 | + parent::__construct( 'EditCourse', 'ep-course', 'EPCourse', 'Courses' ); |
24 | 24 | |
25 | 25 | $this->getOutput()->addModules( 'ep.datepicker' ); |
26 | 26 | } |
— | — | @@ -32,33 +32,33 @@ |
33 | 33 | protected function getFormFields() { |
34 | 34 | $fields = parent::getFormFields(); |
35 | 35 | |
36 | | - $courseOptions = EPCourse::getCourseOptions(); |
| 36 | + $courseOptions = EPMC::getMasterCourseOptions(); |
37 | 37 | |
38 | | - $fields['course_id'] = array ( |
| 38 | + $fields['mc_id'] = array ( |
39 | 39 | 'type' => 'select', |
40 | | - 'label-message' => 'ep-term-edit-course', |
| 40 | + 'label-message' => 'ep-course-edit-mastercourse', |
41 | 41 | 'required' => true, |
42 | 42 | 'options' => $courseOptions, |
43 | 43 | 'validation-callback' => function ( $value, array $alldata = null ) use ( $courseOptions ) { |
44 | | - return in_array( (int)$value, array_values( $courseOptions ) ) ? true : wfMsg( 'ep-term-invalid-course' ); |
| 44 | + return in_array( (int)$value, array_values( $courseOptions ) ) ? true : wfMsg( 'ep-course-invalid-course' ); |
45 | 45 | }, |
46 | 46 | ); |
47 | 47 | |
48 | 48 | $fields['token'] = array ( |
49 | 49 | 'type' => 'text', |
50 | | - 'label-message' => 'ep-term-edit-token', |
| 50 | + 'label-message' => 'ep-course-edit-token', |
51 | 51 | 'maxlength' => 255, |
52 | 52 | 'required' => true, |
53 | 53 | 'size' => 20, |
54 | 54 | 'validation-callback' => function ( $value, array $alldata = null ) { |
55 | 55 | $strLen = strlen( $value ); |
56 | | - return ( $strLen !== 0 && $strLen < 2 ) ? wfMsgExt( 'ep-term-invalid-token', 'parsemag', 2 ) : true; |
| 56 | + return ( $strLen !== 0 && $strLen < 2 ) ? wfMsgExt( 'ep-course-invalid-token', 'parsemag', 2 ) : true; |
57 | 57 | } , |
58 | 58 | ); |
59 | 59 | |
60 | 60 | $fields['year'] = array ( |
61 | 61 | 'type' => 'int', |
62 | | - 'label-message' => 'ep-term-edit-year', |
| 62 | + 'label-message' => 'ep-course-edit-year', |
63 | 63 | 'required' => true, |
64 | 64 | 'min' => 2000, |
65 | 65 | 'max' => 9001, |
— | — | @@ -67,22 +67,22 @@ |
68 | 68 | |
69 | 69 | $fields['start'] = array ( |
70 | 70 | 'class' => 'EPHTMLDateField', |
71 | | - 'label-message' => 'ep-term-edit-start', |
| 71 | + 'label-message' => 'ep-course-edit-start', |
72 | 72 | 'required' => true, |
73 | 73 | ); |
74 | 74 | |
75 | 75 | $fields['end'] = array ( |
76 | 76 | 'class' => 'EPHTMLDateField', |
77 | | - 'label-message' => 'ep-term-edit-end', |
| 77 | + 'label-message' => 'ep-course-edit-end', |
78 | 78 | 'required' => true, |
79 | 79 | ); |
80 | 80 | |
81 | 81 | $fields['description'] = array ( |
82 | 82 | 'type' => 'textarea', |
83 | | - 'label-message' => 'ep-term-edit-description', |
| 83 | + 'label-message' => 'ep-course-edit-description', |
84 | 84 | 'required' => true, |
85 | 85 | 'validation-callback' => function ( $value, array $alldata = null ) { |
86 | | - return strlen( $value ) < 10 ? wfMsgExt( 'ep-term-invalid-description', 'parsemag', 10 ) : true; |
| 86 | + return strlen( $value ) < 10 ? wfMsgExt( 'ep-course-invalid-description', 'parsemag', 10 ) : true; |
87 | 87 | } , |
88 | 88 | 'rows' => 10, |
89 | 89 | 'id' => 'wpTextbox1', |
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | */ |
107 | 107 | protected function getNewData() { |
108 | 108 | return array( |
109 | | - 'course_id' => $this->getRequest()->getVal( 'newcourse' ), |
| 109 | + 'mc_id' => $this->getRequest()->getVal( 'newmc' ), |
110 | 110 | 'year' => $this->getRequest()->getVal( 'newyear' ), |
111 | 111 | ); |
112 | 112 | } |
Index: trunk/extensions/EducationProgram/includes/EPMC.php |
— | — | @@ -320,7 +320,7 @@ |
321 | 321 | } |
322 | 322 | else { |
323 | 323 | $context->getOutput()->addHTML( $pager->getFilterControl( true ) ); |
324 | | - $context->getOutput()->addWikiMsg( 'ep-courses-noresults' ); |
| 324 | + $context->getOutput()->addWikiMsg( 'ep-mc-noresults' ); |
325 | 325 | } |
326 | 326 | } |
327 | 327 | |
Index: trunk/extensions/EducationProgram/includes/EPCourse.php |
— | — | @@ -337,7 +337,7 @@ |
338 | 338 | } |
339 | 339 | else { |
340 | 340 | $context->getOutput()->addHTML( $pager->getFilterControl( true ) ); |
341 | | - $context->getOutput()->addWikiMsg( 'ep-terms-noresults' ); |
| 341 | + $context->getOutput()->addWikiMsg( 'ep-courses-noresults' ); |
342 | 342 | } |
343 | 343 | } |
344 | 344 | |
— | — | @@ -369,25 +369,25 @@ |
370 | 370 | |
371 | 371 | $out->addHTML( '<fieldset>' ); |
372 | 372 | |
373 | | - $out->addHTML( '<legend>' . wfMsgHtml( 'ep-terms-addnew' ) . '</legend>' ); |
| 373 | + $out->addHTML( '<legend>' . wfMsgHtml( 'ep-courses-addnew' ) . '</legend>' ); |
374 | 374 | |
375 | | - $out->addHTML( Html::element( 'p', array(), wfMsg( 'ep-terms-namedoc' ) ) ); |
| 375 | + $out->addHTML( Html::element( 'p', array(), wfMsg( 'ep-courses-namedoc' ) ) ); |
376 | 376 | |
377 | | - $out->addHTML( Html::element( 'label', array( 'for' => 'newcourse' ), wfMsg( 'ep-terms-newcourse' ) ) ); |
| 377 | + $out->addHTML( Html::element( 'label', array( 'for' => 'newmc' ), wfMsg( 'ep-courses-newmastercourse' ) ) ); |
378 | 378 | |
379 | 379 | $select = new XmlSelect( |
380 | | - 'newcourse', |
381 | | - 'newcourse', |
382 | | - array_key_exists( 'course', $args ) ? $args['course'] : false |
| 380 | + 'newmc', |
| 381 | + 'newmc', |
| 382 | + array_key_exists( 'mc', $args ) ? $args['mc'] : false |
383 | 383 | ); |
384 | 384 | |
385 | 385 | $select->addOptions( EPCourse::getCourseOptions() ); |
386 | 386 | $out->addHTML( $select->getHTML() ); |
387 | 387 | |
388 | | - $out->addHTML( ' ' . Xml::inputLabel( wfMsg( 'ep-terms-newyear' ), 'newyear', 'newyear', 10 ) ); |
| 388 | + $out->addHTML( ' ' . Xml::inputLabel( wfMsg( 'ep-courses-newyear' ), 'newyear', 'newyear', 10 ) ); |
389 | 389 | |
390 | 390 | $out->addHTML( ' ' . Html::input( |
391 | | - 'addnewterm', |
| 391 | + 'addnewcourse', |
392 | 392 | wfMsg( 'ep-terms-add' ), |
393 | 393 | 'submit' |
394 | 394 | ) ); |
— | — | @@ -413,7 +413,7 @@ |
414 | 414 | EPCourse::displayAddNewControl( $context, $args ); |
415 | 415 | } |
416 | 416 | elseif ( $context->getUser()->isAllowed( 'ep-course' ) ) { |
417 | | - $context->getOutput()->addWikiMsg( 'ep-terms-addcoursefirst' ); |
| 417 | + $context->getOutput()->addWikiMsg( 'ep-courses-addcoursefirst' ); |
418 | 418 | } |
419 | 419 | } |
420 | 420 | |
— | — | @@ -442,7 +442,7 @@ |
443 | 443 | } |
444 | 444 | |
445 | 445 | /** |
446 | | - * Returns the status of the term. |
| 446 | + * Returns the status of the course. |
447 | 447 | * |
448 | 448 | * @since 0.1 |
449 | 449 | * |
— | — | @@ -463,7 +463,7 @@ |
464 | 464 | } |
465 | 465 | |
466 | 466 | /** |
467 | | - * Get a link to Special:Term/id. |
| 467 | + * Get a link to Special:Course/id. |
468 | 468 | * |
469 | 469 | * @since 0.1 |
470 | 470 | * |
— | — | @@ -471,7 +471,7 @@ |
472 | 472 | */ |
473 | 473 | public function getLink() { |
474 | 474 | return Linker::linkKnown( |
475 | | - SpecialPage::getTitleFor( 'Term', $this->getId() ), |
| 475 | + SpecialPage::getTitleFor( 'Course', $this->getId() ), |
476 | 476 | htmlspecialchars( $this->getId() ) |
477 | 477 | ); |
478 | 478 | } |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -230,7 +230,7 @@ |
231 | 231 | 'epcoursepager-header-year' => 'Year', |
232 | 232 | 'epcoursepager-header-start' => 'Start', |
233 | 233 | 'epcoursepager-header-end' => 'End', |
234 | | - 'epcoursepager-filter-course-id' => 'Master course', |
| 234 | + 'epcoursepager-filter-mc-id' => 'Master course', |
235 | 235 | 'epcoursepager-filter-year' => 'Year', |
236 | 236 | 'epcoursepager-filter-org-id' => 'Institution', |
237 | 237 | 'epcoursepager-header-status' => 'Status', |
— | — | @@ -257,16 +257,16 @@ |
258 | 258 | 'educationprogram-org-edit-country' => 'Country', |
259 | 259 | 'educationprogram-org-submit' => 'Submit', |
260 | 260 | |
261 | | - // Special:EditCourse |
262 | | - 'editcourse-add-legend' => 'Add course', |
263 | | - 'editcourse-edit-legend' => 'Edit course', |
264 | | - 'ep-course-edit-name' => 'Name', |
265 | | - 'ep-course-edit-org' => 'Institution', |
266 | | - 'ep-course-edit-description' => 'Description', |
| 261 | + // Special:EditMasterCourse |
| 262 | + 'editmastercourse-add-legend' => 'Add master course', |
| 263 | + 'editmastercourse-edit-legend' => 'Edit master course', |
| 264 | + 'ep-mc-edit-name' => 'Name', |
| 265 | + 'ep-mc-edit-org' => 'Institution', |
| 266 | + 'ep-mc-edit-description' => 'Description', |
267 | 267 | |
268 | | - 'ep-course-invalid-name' => 'This name is to short. It needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
269 | | - 'ep-course-invalid-description' => 'This description is to short. It needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
270 | | - 'ep-course-invalid-org' => 'This institution does not exist', |
| 268 | + 'ep-mc-invalid-name' => 'This name is to short. It needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
| 269 | + 'ep-mc-invalid-description' => 'This description is to short. It needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
| 270 | + 'ep-mc-invalid-org' => 'This institution does not exist', |
271 | 271 | |
272 | 272 | // Special:EditCourse |
273 | 273 | 'editcourse-add-legend' => 'Add course', |
— | — | @@ -298,7 +298,7 @@ |
299 | 299 | 'specialinstitution-summary-country' => 'Country', |
300 | 300 | 'specialinstitution-summary-status' => 'Status', |
301 | 301 | 'specialinstitution-summary-courses' => 'Course count', |
302 | | - 'specialinstitution-summary-terms' => 'Term count', |
| 302 | + 'specialinstitution-summary-mcs' => 'Master course count', |
303 | 303 | 'specialinstitution-summary-students' => 'Student count', |
304 | 304 | 'ep-institution-nav-edit' => 'Edit this institution', |
305 | 305 | 'ep-institution-add-course' => 'Add a course', |