Index: trunk/extensions/EducationProgram/specials/SpecialMasterCourse.php |
— | — | @@ -65,12 +65,12 @@ |
66 | 66 | |
67 | 67 | $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-mc-courses' ) ) ); |
68 | 68 | |
69 | | - EPMC::displayPager( $this->getContext(), array( 'id' => $masterCourse->getId() ) ); |
| 69 | + EPCourse::displayPager( $this->getContext(), array( 'mc_id' => $masterCourse->getId() ) ); |
70 | 70 | |
71 | | - if ( $this->getUser()->isAllowed( 'ep-mc' ) ) { |
| 71 | + if ( $this->getUser()->isAllowed( 'ep-course' ) ) { |
72 | 72 | $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-mc-add-course' ) ) ); |
73 | 73 | |
74 | | - EPMC::displayAddNewControl( $this->getContext(), array( 'mc' => $masterCourse->getId() ) ); |
| 74 | + EPCourse::displayAddNewControl( $this->getContext(), array( 'mc' => $masterCourse->getId() ) ); |
75 | 75 | } |
76 | 76 | } |
77 | 77 | } |
Index: trunk/extensions/EducationProgram/includes/EPCourse.php |
— | — | @@ -353,7 +353,7 @@ |
354 | 354 | * @return boolean |
355 | 355 | */ |
356 | 356 | public static function displayAddNewControl( IContextSource $context, array $args ) { |
357 | | - if ( !$context->getUser()->isAllowed( 'ep-term' ) ) { |
| 357 | + if ( !$context->getUser()->isAllowed( 'ep-course' ) ) { |
358 | 358 | return false; |
359 | 359 | } |
360 | 360 | |
— | — | @@ -363,7 +363,7 @@ |
364 | 364 | 'form', |
365 | 365 | array( |
366 | 366 | 'method' => 'post', |
367 | | - 'action' => SpecialPage::getTitleFor( 'EditTerm' )->getLocalURL(), |
| 367 | + 'action' => SpecialPage::getTitleFor( 'EditCourse' )->getLocalURL(), |
368 | 368 | ) |
369 | 369 | ) ); |
370 | 370 | |
— | — | @@ -381,14 +381,14 @@ |
382 | 382 | array_key_exists( 'mc', $args ) ? $args['mc'] : false |
383 | 383 | ); |
384 | 384 | |
385 | | - $select->addOptions( EPCourse::getCourseOptions() ); |
| 385 | + $select->addOptions( EPMC::getMasterCourseOptions() ); |
386 | 386 | $out->addHTML( $select->getHTML() ); |
387 | 387 | |
388 | 388 | $out->addHTML( ' ' . Xml::inputLabel( wfMsg( 'ep-courses-newyear' ), 'newyear', 'newyear', 10 ) ); |
389 | 389 | |
390 | 390 | $out->addHTML( ' ' . Html::input( |
391 | 391 | 'addnewcourse', |
392 | | - wfMsg( 'ep-terms-add' ), |
| 392 | + wfMsg( 'ep-courses-add' ), |
393 | 393 | 'submit' |
394 | 394 | ) ); |
395 | 395 | |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -183,7 +183,7 @@ |
184 | 184 | 'ep-courses-addnew' => 'Add a new course', |
185 | 185 | 'ep-courses-namedoc' => 'Enter the master course the course belongs to and the year in which it is active.', |
186 | 186 | 'ep-courses-newyear' => 'Course year:', |
187 | | - 'ep-courses-newcourse' => 'Course master course:', |
| 187 | + 'ep-courses-newmastercourse' => 'Course master course:', |
188 | 188 | 'ep-courses-add' => 'Add course', |
189 | 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 | 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.', |