Index: trunk/extensions/EducationProgram/EducationProgram.i18n.alias.php |
— | — | @@ -23,6 +23,10 @@ |
24 | 24 | 'Students' => array( 'Students' ), |
25 | 25 | 'Course' => array( 'Course' ), |
26 | 26 | 'Courses' => array( 'Courses' ), |
| 27 | + 'Term' => array( 'Term' ), |
| 28 | + 'Terms' => array( 'Terms' ), |
27 | 29 | 'EducationProgram' => array( 'EducationProgram' ), |
| 30 | + 'EditCourse' => array( 'EditCourse' ), |
28 | 31 | 'EditInstitution' => array( 'EditInstitution' ), |
| 32 | + 'EditTerm' => array( 'EditTerm' ), |
29 | 33 | ); |
Index: trunk/extensions/EducationProgram/specials/SpecialTerms.php |
— | — | @@ -0,0 +1,130 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Page listing all terms in a pager with filter control. |
| 6 | + * Also has a form for adding new items for those with matching priviliges. |
| 7 | + * |
| 8 | + * @since 0.1 |
| 9 | + * |
| 10 | + * @file SpecialTerms.php |
| 11 | + * @ingroup EducationProgram |
| 12 | + * |
| 13 | + * @licence GNU GPL v3 or later |
| 14 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 15 | + */ |
| 16 | +class SpecialTerms extends SpecialEPPage { |
| 17 | + |
| 18 | + /** |
| 19 | + * Constructor. |
| 20 | + * |
| 21 | + * @since 0.1 |
| 22 | + */ |
| 23 | + public function __construct() { |
| 24 | + parent::__construct( 'Terms' ); |
| 25 | + } |
| 26 | + |
| 27 | + /** |
| 28 | + * Main method. |
| 29 | + * |
| 30 | + * @since 0.1 |
| 31 | + * |
| 32 | + * @param string|null $arg |
| 33 | + */ |
| 34 | + public function execute( $subPage ) { |
| 35 | + parent::execute( $subPage ); |
| 36 | + |
| 37 | + $out = $this->getOutput(); |
| 38 | + |
| 39 | + if ( $this->subPage === '' ) { |
| 40 | + $this->displayPage(); |
| 41 | + } |
| 42 | + else { |
| 43 | + $org = EPOrg::has( array( 'name' => $this->subPage ) ); |
| 44 | + |
| 45 | + if ( $org === false ) { |
| 46 | + $this->showError( wfMessage( 'ep-terms-nosuchcourses', $this->subPage ) ); |
| 47 | + $this->displayPage(); |
| 48 | + } |
| 49 | + else { |
| 50 | + $out->redirect( SpecialPage::getTitleFor( 'Term', $this->subPage )->getLocalURL() ); |
| 51 | + } |
| 52 | + } |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * Display all the stuff that should be on the page. |
| 57 | + * |
| 58 | + * @since 0.1 |
| 59 | + */ |
| 60 | + protected function displayPage() { |
| 61 | + $user = $this->getUser(); |
| 62 | + |
| 63 | + if ( $user->isAllowed( 'epadmin' ) ) { |
| 64 | + $this->displayAddNewControl(); |
| 65 | + } |
| 66 | + elseif ( $user->isAllowed( 'epmentor' ) ) { |
| 67 | + $mentor = EPMentor::select( array( 'user_id' => $user->getId() ) ); |
| 68 | + |
| 69 | + if ( $mentor !== false && count( $mentor->getOrgs() ) > 0 ) { |
| 70 | + $this->displayAddNewControl(); |
| 71 | + } |
| 72 | + } |
| 73 | + |
| 74 | + $pager = new EPTermPager( $this->getContext() ); |
| 75 | + |
| 76 | + if ( $pager->getNumRows() ) { |
| 77 | + $this->getOutput()->addHTML( |
| 78 | + $pager->getFilterControl() . |
| 79 | + $pager->getNavigationBar() . |
| 80 | + $pager->getBody() . |
| 81 | + $pager->getNavigationBar() |
| 82 | + ); |
| 83 | + } |
| 84 | + else { |
| 85 | + $this->getOutput()->addHTML( $pager->getFilterControl( true ) ); |
| 86 | + $this->getOutput()->addWikiMsg( 'ep-terms-noresults' ); |
| 87 | + } |
| 88 | + } |
| 89 | + |
| 90 | + /** |
| 91 | + * Displays a small form to add a new institution. |
| 92 | + * |
| 93 | + * @since 0.1 |
| 94 | + */ |
| 95 | + protected function displayAddNewControl() { |
| 96 | + $out = $this->getOutput(); |
| 97 | + |
| 98 | + $out->addHTML( Html::openElement( |
| 99 | + 'form', |
| 100 | + array( |
| 101 | + 'method' => 'post', |
| 102 | + 'action' => SpecialPage::getTitleFor( 'EditTerm' )->getLocalURL(), |
| 103 | + ) |
| 104 | + ) ); |
| 105 | + |
| 106 | + $out->addHTML( '<fieldset>' ); |
| 107 | + |
| 108 | + $out->addHTML( '<legend>' . wfMsgHtml( 'ep-terms-addnew' ) . '</legend>' ); |
| 109 | + |
| 110 | + $out->addHTML( Html::element( 'p', array(), wfMsg( 'ep-terms-namedoc' ) ) ); |
| 111 | + |
| 112 | + $out->addHTML( Html::element( 'label', array( 'for' => 'newcourse' ), wfMsg( 'ep-terms-newcourse' ) ) ); |
| 113 | + |
| 114 | + $select = new XmlSelect( 'newcourse', 'newcourse' ); |
| 115 | + $select->addOptions( EPCourse::getCoursesForAdmin( $this->getUser() ) ); |
| 116 | + $out->addHTML( $select->getHTML() ); |
| 117 | + |
| 118 | + $out->addHTML( Xml::inputLabel( wfMsg( 'ep-terms-newyear' ), 'newyear', 'newyear' ) ); |
| 119 | + |
| 120 | + $out->addHTML( ' ' . Html::input( |
| 121 | + 'addnewterm', |
| 122 | + wfMsg( 'ep-terms-add' ), |
| 123 | + 'submit' |
| 124 | + ) ); |
| 125 | + |
| 126 | + $out->addHTML( Html::hidden( 'newEditToken', $this->getUser()->editToken() ) ); |
| 127 | + |
| 128 | + $out->addHTML( '</fieldset></form>' ); |
| 129 | + } |
| 130 | + |
| 131 | +} |
Property changes on: trunk/extensions/EducationProgram/specials/SpecialTerms.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 132 | + native |
Index: trunk/extensions/EducationProgram/specials/SpecialInstitutions.php |
— | — | @@ -1,7 +1,8 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * |
| 5 | + * Page listing all insitutions in a pager with filter control. |
| 6 | + * Also has a form for adding new items for those with matching priviliges. |
6 | 7 | * |
7 | 8 | * @since 0.1 |
8 | 9 | * |
Index: trunk/extensions/EducationProgram/specials/SpecialEditTerm.php |
— | — | @@ -0,0 +1 @@ |
| 2 | +<?php |
Property changes on: trunk/extensions/EducationProgram/specials/SpecialEditTerm.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 3 | + native |
Index: trunk/extensions/EducationProgram/specials/SpecialCourses.php |
— | — | @@ -1,7 +1,8 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * |
| 5 | + * Page listing all courses in a pager with filter control. |
| 6 | + * Also has a form for adding new items for those with matching priviliges. |
6 | 7 | * |
7 | 8 | * @since 0.1 |
8 | 9 | * |
— | — | @@ -27,14 +28,97 @@ |
28 | 29 | * |
29 | 30 | * @since 0.1 |
30 | 31 | * |
31 | | - * @param string $arg |
| 32 | + * @param string|null $arg |
32 | 33 | */ |
33 | 34 | public function execute( $subPage ) { |
34 | 35 | parent::execute( $subPage ); |
35 | 36 | |
36 | 37 | $out = $this->getOutput(); |
37 | 38 | |
38 | | - // TODO: AUTH |
| 39 | + if ( $this->subPage === '' ) { |
| 40 | + $this->displayPage(); |
| 41 | + } |
| 42 | + else { |
| 43 | + $org = EPOrg::has( array( 'name' => $this->subPage ) ); |
| 44 | + |
| 45 | + if ( $org === false ) { |
| 46 | + $this->showError( wfMessage( 'ep-courses-nosuchcourses', $this->subPage ) ); |
| 47 | + $this->displayPage(); |
| 48 | + } |
| 49 | + else { |
| 50 | + $out->redirect( SpecialPage::getTitleFor( 'Course', $this->subPage )->getLocalURL() ); |
| 51 | + } |
| 52 | + } |
39 | 53 | } |
| 54 | + |
| 55 | + /** |
| 56 | + * Display all the stuff that should be on the page. |
| 57 | + * |
| 58 | + * @since 0.1 |
| 59 | + */ |
| 60 | + protected function displayPage() { |
| 61 | + $user = $this->getUser(); |
| 62 | + |
| 63 | + if ( $user->isAllowed( 'epadmin' ) ) { |
| 64 | + $this->displayAddNewControl(); |
| 65 | + } |
| 66 | + elseif ( $user->isAllowed( 'epmentor' ) ) { |
| 67 | + $mentor = EPMentor::select( array( 'user_id' => $user->getId() ) ); |
| 68 | + |
| 69 | + if ( $mentor !== false && count( $mentor->getOrgs() ) > 0 ) { |
| 70 | + $this->displayAddNewControl(); |
| 71 | + } |
| 72 | + } |
| 73 | + |
| 74 | + $pager = new EPCoursePager( $this->getContext() ); |
| 75 | + |
| 76 | + if ( $pager->getNumRows() ) { |
| 77 | + $this->getOutput()->addHTML( |
| 78 | + $pager->getFilterControl() . |
| 79 | + $pager->getNavigationBar() . |
| 80 | + $pager->getBody() . |
| 81 | + $pager->getNavigationBar() |
| 82 | + ); |
| 83 | + } |
| 84 | + else { |
| 85 | + $this->getOutput()->addHTML( $pager->getFilterControl( true ) ); |
| 86 | + $this->getOutput()->addWikiMsg( 'ep-courses-noresults' ); |
| 87 | + } |
| 88 | + } |
| 89 | + |
| 90 | + /** |
| 91 | + * Displays a small form to add a new institution. |
| 92 | + * |
| 93 | + * @since 0.1 |
| 94 | + */ |
| 95 | + protected function displayAddNewControl() { |
| 96 | + $out = $this->getOutput(); |
40 | 97 | |
| 98 | + $out->addHTML( Html::openElement( |
| 99 | + 'form', |
| 100 | + array( |
| 101 | + 'method' => 'post', |
| 102 | + 'action' => SpecialPage::getTitleFor( 'EditCourse' )->getLocalURL(), |
| 103 | + ) |
| 104 | + ) ); |
| 105 | + |
| 106 | + $out->addHTML( '<fieldset>' ); |
| 107 | + |
| 108 | + $out->addHTML( '<legend>' . wfMsgHtml( 'ep-courses-addnew' ) . '</legend>' ); |
| 109 | + |
| 110 | + $out->addHTML( Html::element( 'p', array(), wfMsg( 'ep-courses-namedoc' ) ) ); |
| 111 | + |
| 112 | + $out->addHTML( Xml::inputLabel( wfMsg( 'ep-courses-newname' ), 'newname', 'newname' ) ); |
| 113 | + |
| 114 | + $out->addHTML( ' ' . Html::input( |
| 115 | + 'addneworg', |
| 116 | + wfMsg( 'ep-courses-add' ), |
| 117 | + 'submit' |
| 118 | + ) ); |
| 119 | + |
| 120 | + $out->addHTML( Html::hidden( 'newEditToken', $this->getUser()->editToken() ) ); |
| 121 | + |
| 122 | + $out->addHTML( '</fieldset></form>' ); |
| 123 | + } |
| 124 | + |
41 | 125 | } |
Index: trunk/extensions/EducationProgram/specials/SpecialEditCourse.php |
— | — | @@ -0,0 +1 @@ |
| 2 | +<?php |
Property changes on: trunk/extensions/EducationProgram/specials/SpecialEditCourse.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 3 | + native |
Index: trunk/extensions/EducationProgram/specials/SpecialTerm.php |
Property changes on: trunk/extensions/EducationProgram/specials/SpecialTerm.php |
___________________________________________________________________ |
Added: svn:eol-style |
2 | 4 | + native |
Index: trunk/extensions/EducationProgram/includes/EPMentor.php |
— | — | @@ -45,7 +45,34 @@ |
46 | 46 | protected static function getFieldTypes() { |
47 | 47 | return array( |
48 | 48 | 'id' => 'id', |
| 49 | + 'user_id' => 'id', |
49 | 50 | ); |
50 | 51 | } |
| 52 | + |
| 53 | + /** |
| 54 | + * Returns the orgs this mentor is part of. |
| 55 | + * |
| 56 | + * @since 0.1 |
| 57 | + * |
| 58 | + * @param array|null $fields |
| 59 | + * |
| 60 | + * @return array of EPOrg |
| 61 | + */ |
| 62 | + public function getOrgs( array $fields = null ) { |
| 63 | + return array(); // TODO |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * Retruns the courses this mentor can manage. |
| 68 | + * |
| 69 | + * @since 0.1 |
| 70 | + * |
| 71 | + * @param array|null $fields |
| 72 | + * |
| 73 | + * @return array of EPCourse |
| 74 | + */ |
| 75 | + public function getCourses( array $fields = null ) { |
| 76 | + return array(); // TODO |
| 77 | + } |
51 | 78 | |
52 | 79 | } |
Index: trunk/extensions/EducationProgram/includes/EPStudent.php |
— | — | @@ -45,6 +45,7 @@ |
46 | 46 | protected static function getFieldTypes() { |
47 | 47 | return array( |
48 | 48 | 'id' => 'id', |
| 49 | + 'user_id' => 'id', |
49 | 50 | ); |
50 | 51 | } |
51 | 52 | |
Index: trunk/extensions/EducationProgram/includes/EPTermPager.php |
— | — | @@ -0,0 +1,81 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Term pager, primarily for Special:Terms. |
| 6 | + * |
| 7 | + * @since 0.1 |
| 8 | + * |
| 9 | + * @file EPTermPager.php |
| 10 | + * @ingroup EductaionProgram |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +class EPTermPager extends EPPager { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @param IContextSource $context |
| 21 | + * @param array $conds |
| 22 | + */ |
| 23 | + public function __construct( IContextSource $context, array $conds = array() ) { |
| 24 | + $this->mDefaultDirection = true; |
| 25 | + |
| 26 | + // when MW 1.19 becomes min, we want to pass an IContextSource $context here. |
| 27 | + parent::__construct( $context, $conds, 'EPTerm' ); |
| 28 | + } |
| 29 | + |
| 30 | + /** |
| 31 | + * (non-PHPdoc) |
| 32 | + * @see TablePager::getFieldNames() |
| 33 | + */ |
| 34 | + public function getFieldNames() { |
| 35 | + return parent::getFieldNameList( array( |
| 36 | + // TODO |
| 37 | + ) ); |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * (non-PHPdoc) |
| 42 | + * @see TablePager::getRowClass() |
| 43 | + */ |
| 44 | + function getRowClass( $row ) { |
| 45 | + return 'ep-course-row'; |
| 46 | + } |
| 47 | + |
| 48 | + /** |
| 49 | + * (non-PHPdoc) |
| 50 | + * @see TablePager::getTableClass() |
| 51 | + */ |
| 52 | + public function getTableClass(){ |
| 53 | + return 'TablePager ep-courses'; |
| 54 | + } |
| 55 | + |
| 56 | + /** |
| 57 | + * (non-PHPdoc) |
| 58 | + * @see TablePager::formatValue() |
| 59 | + */ |
| 60 | + public function formatValue( $name, $value ) { |
| 61 | + switch ( $name ) { |
| 62 | + case '': // TODO |
| 63 | + $value = $value; |
| 64 | + break; |
| 65 | + } |
| 66 | + |
| 67 | + return $value; |
| 68 | + } |
| 69 | + |
| 70 | + function getDefaultSort() { |
| 71 | + return ''; // TODO |
| 72 | + } |
| 73 | + |
| 74 | + /** |
| 75 | + * (non-PHPdoc) |
| 76 | + * @see EPPager::getSortableFields() |
| 77 | + */ |
| 78 | + protected function getSortableFields() { |
| 79 | + return array(); |
| 80 | + } |
| 81 | + |
| 82 | +} |
Property changes on: trunk/extensions/EducationProgram/includes/EPTermPager.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 83 | + native |
Index: trunk/extensions/EducationProgram/includes/EPCourse.php |
— | — | @@ -52,5 +52,48 @@ |
53 | 53 | 'description' => 'str', |
54 | 54 | ); |
55 | 55 | } |
| 56 | + |
| 57 | + /** |
| 58 | + * Returns a lift of courses that can be administered by the provided user. |
| 59 | + * |
| 60 | + * @since 0.1 |
| 61 | + * |
| 62 | + * @param User|int $user User object or user id |
| 63 | + * |
| 64 | + * @return array of EPCourse |
| 65 | + */ |
| 66 | + public static function getCoursesForAdmin( $user ) { |
| 67 | + static $cache = array(); |
| 68 | + |
| 69 | + if ( is_int( $user ) ) { |
| 70 | + $userId = $user; |
| 71 | + } |
| 72 | + else { |
| 73 | + $userId = $user->getId(); |
| 74 | + } |
| 75 | + |
| 76 | + if ( !array_key_exists( $userId, $cache ) ) { |
| 77 | + if ( is_int( $user ) ) { |
| 78 | + $user = User::newFromId( $userId ); |
| 79 | + } |
| 80 | + |
| 81 | + $courses = array(); |
| 82 | + |
| 83 | + if ( $user->isAllowed( 'epadmin' ) ) { |
| 84 | + $courses = self::select(); |
| 85 | + } |
| 86 | + elseif ( $user->isAllowed( 'epmentor' ) ) { |
| 87 | + $mentor = EPMentor::select( array( 'user_id' => $user->getId() ) ); |
| 88 | + |
| 89 | + if ( $mentor !== false ) { |
| 90 | + $courses = $mentor->getCourses(); |
| 91 | + } |
| 92 | + } |
| 93 | + |
| 94 | + $cache[$userId] = $courses; |
| 95 | + } |
| 96 | + |
| 97 | + return $cache[$userId]; |
| 98 | + } |
56 | 99 | |
57 | 100 | } |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -55,6 +55,12 @@ |
56 | 56 | 'special-educationprogram' => 'Education Program', |
57 | 57 | 'special-editinstitution-add' => 'Add institution', |
58 | 58 | 'special-editinstitution-edit' => 'Edit institution', |
| 59 | + 'special-terms' => 'Terms', |
| 60 | + 'special-term' => 'Term', |
| 61 | + 'special-editterm-add' => 'Add term', |
| 62 | + 'special-editterm-edit' => 'Edit term', |
| 63 | + 'special-editcourse-add' => 'Add course', |
| 64 | + 'special-editcourse-edit' => 'Edit course', |
59 | 65 | |
60 | 66 | // Special:Institutions |
61 | 67 | 'ep-institutions-nosuchinstitution' => 'There is no institution with name "$1". Existing institutions are listed below.', |
— | — | @@ -64,6 +70,23 @@ |
65 | 71 | 'ep-institutions-newname' => 'Institution name:', |
66 | 72 | 'ep-institutions-add' => 'Add institution', |
67 | 73 | |
| 74 | + // Special:Courses |
| 75 | + 'ep-courses-nosuchcourse' => 'There is no course with name "$1". Existing courses are listed below.', |
| 76 | + 'ep-courses-noresults' => 'There are no courses to list.', |
| 77 | + 'ep-courses-addnew' => 'Add a new course', |
| 78 | + 'ep-courses-namedoc' => 'Enter the name for the new course (which should be unique) and hit the button.', |
| 79 | + 'ep-courses-newname' => 'Course name:', |
| 80 | + 'ep-courses-add' => 'Add course', |
| 81 | + |
| 82 | + // Special:Terms |
| 83 | + 'ep-terms-nosuchterm' => 'There is no term with id "$1". Existing terms are listed below.', |
| 84 | + 'ep-terms-noresults' => 'There are no terms to list.', |
| 85 | + 'ep-terms-addnew' => 'Add a new term', |
| 86 | + 'ep-terms-namedoc' => 'Enter the course the term belongs to and the year in which it is active.', |
| 87 | + 'ep-terms-newyear' => 'Term year:', |
| 88 | + 'ep-terms-newcourse' => 'Term course:', |
| 89 | + 'ep-terms-add' => 'Add term', |
| 90 | + |
68 | 91 | // Pager |
69 | 92 | 'ep-pager-showonly' => 'Show only items with', |
70 | 93 | 'ep-pager-clear' => 'Clear filters', |
Index: trunk/extensions/EducationProgram/EducationProgram.php |
— | — | @@ -59,10 +59,13 @@ |
60 | 60 | $wgAutoloadClasses['EPStudent'] = dirname( __FILE__ ) . '/includes/EPStudent.php'; |
61 | 61 | $wgAutoloadClasses['EPStudentPager'] = dirname( __FILE__ ) . '/includes/EPStudentPager.php'; |
62 | 62 | $wgAutoloadClasses['EPTerm'] = dirname( __FILE__ ) . '/includes/EPTerm.php'; |
| 63 | +$wgAutoloadClasses['EPTermPager'] = dirname( __FILE__ ) . '/includes/EPTermPager.php'; |
63 | 64 | |
64 | 65 | $wgAutoloadClasses['SpecialCourse'] = dirname( __FILE__ ) . '/specials/SpecialCourse.php'; |
65 | 66 | $wgAutoloadClasses['SpecialCourses'] = dirname( __FILE__ ) . '/specials/SpecialCourses.php'; |
| 67 | +$wgAutoloadClasses['SpecialEditCourse'] = dirname( __FILE__ ) . '/specials/SpecialEditCourse.php'; |
66 | 68 | $wgAutoloadClasses['SpecialEditInstitution'] = dirname( __FILE__ ) . '/specials/SpecialEditInstitution.php'; |
| 69 | +$wgAutoloadClasses['SpecialEditTerm'] = dirname( __FILE__ ) . '/specials/SpecialEditTerm.php'; |
67 | 70 | $wgAutoloadClasses['SpecialEducationProgram'] = dirname( __FILE__ ) . '/specials/SpecialEducationProgram.php'; |
68 | 71 | $wgAutoloadClasses['SpecialEPFormPage'] = dirname( __FILE__ ) . '/specials/SpecialEPFormPage.php'; |
69 | 72 | $wgAutoloadClasses['SpecialEPPage'] = dirname( __FILE__ ) . '/specials/SpecialEPPage.php'; |
— | — | @@ -71,6 +74,8 @@ |
72 | 75 | $wgAutoloadClasses['SpecialMyCourses'] = dirname( __FILE__ ) . '/specials/SpecialMyCourses.php'; |
73 | 76 | $wgAutoloadClasses['SpecialStudent'] = dirname( __FILE__ ) . '/specials/SpecialStudent.php'; |
74 | 77 | $wgAutoloadClasses['SpecialStudents'] = dirname( __FILE__ ) . '/specials/SpecialStudents.php'; |
| 78 | +$wgAutoloadClasses['SpecialTerm'] = dirname( __FILE__ ) . '/specials/SpecialTerm.php'; |
| 79 | +$wgAutoloadClasses['SpecialTerms'] = dirname( __FILE__ ) . '/specials/SpecialTerms.php'; |
75 | 80 | |
76 | 81 | // Special pages |
77 | 82 | $wgSpecialPages['MyCourses'] = 'SpecialMyCourses'; |
— | — | @@ -80,8 +85,12 @@ |
81 | 86 | $wgSpecialPages['Students'] = 'SpecialStudents'; |
82 | 87 | $wgSpecialPages['Course'] = 'SpecialCourse'; |
83 | 88 | $wgSpecialPages['Courses'] = 'SpecialCourses'; |
| 89 | +$wgSpecialPages['Term'] = 'SpecialTerm'; |
| 90 | +$wgSpecialPages['Terms'] = 'SpecialTerms'; |
84 | 91 | $wgSpecialPages['EducationProgram'] = 'SpecialEducationProgram'; |
| 92 | +$wgSpecialPages['EditCourse'] = 'SpecialEditCourse'; |
85 | 93 | $wgSpecialPages['EditInstitution'] = 'SpecialEditInstitution'; |
| 94 | +$wgSpecialPages['EditTerm'] = 'SpecialEditTerm'; |
86 | 95 | |
87 | 96 | $wgSpecialPageGroups['MyCourses'] = 'education'; |
88 | 97 | $wgSpecialPageGroups['Institution'] = 'education'; |
— | — | @@ -90,8 +99,12 @@ |
91 | 100 | $wgSpecialPageGroups['Students'] = 'education'; |
92 | 101 | $wgSpecialPageGroups['Course'] = 'education'; |
93 | 102 | $wgSpecialPageGroups['Courses'] = 'education'; |
| 103 | +$wgSpecialPageGroups['Term'] = 'education'; |
| 104 | +$wgSpecialPageGroups['Terms'] = 'education'; |
94 | 105 | $wgSpecialPageGroups['EducationProgram'] = 'education'; |
| 106 | +$wgSpecialPageGroups['EditCourse'] = 'education'; |
95 | 107 | $wgSpecialPageGroups['EditInstitution'] = 'education'; |
| 108 | +$wgSpecialPageGroups['EditTerm'] = 'education'; |
96 | 109 | |
97 | 110 | // API |
98 | 111 | |