Index: trunk/extensions/EducationProgram/sql/EducationProgram.sql |
— | — | @@ -51,6 +51,7 @@ |
52 | 52 | course_id INT unsigned NOT NULL auto_increment PRIMARY KEY, |
53 | 53 | |
54 | 54 | course_mc_id INT unsigned NOT NULL, -- Foreign key on ep_mcs.mc_id |
| 55 | + course_name VARCHAR(255) NOT NULL, -- Name of the course |
55 | 56 | course_org_id INT unsigned NOT NULL, -- Foreign key on ep_orgs.org_id. Helper field, not strictly needed. |
56 | 57 | course_year SMALLINT unsigned NOT NULL, -- Year in which the course takes place |
57 | 58 | course_start varbinary(14) NOT NULL, -- Start time of the course |
Index: trunk/extensions/EducationProgram/specials/SpecialEditTerm.php |
— | — | @@ -1,159 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -/** |
5 | | - * Addition and modification interface for courses. |
6 | | - * |
7 | | - * @since 0.1 |
8 | | - * |
9 | | - * @file SpecialEditCourse.php |
10 | | - * @ingroup EducationProgram |
11 | | - * |
12 | | - * @licence GNU GPL v3 or later |
13 | | - * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | | - */ |
15 | | -class SpecialEditCourse extends SpecialEPFormPage { |
16 | | - |
17 | | - /** |
18 | | - * Constructor. |
19 | | - * |
20 | | - * @since 0.1 |
21 | | - */ |
22 | | - public function __construct() { |
23 | | - parent::__construct( 'EditCourse', 'ep-course', 'EPCourse', 'Courses' ); |
24 | | - |
25 | | - $this->getOutput()->addModules( 'ep.datepicker' ); |
26 | | - } |
27 | | - |
28 | | - /** |
29 | | - * (non-PHPdoc) |
30 | | - * @see SpecialEPFormPage::getFormFields() |
31 | | - * @return array |
32 | | - */ |
33 | | - protected function getFormFields() { |
34 | | - $fields = parent::getFormFields(); |
35 | | - |
36 | | - $courseOptions = EPMC::getMasterCourseOptions(); |
37 | | - |
38 | | - $fields['mc_id'] = array ( |
39 | | - 'type' => 'select', |
40 | | - 'label-message' => 'ep-course-edit-mastercourse', |
41 | | - 'required' => true, |
42 | | - 'options' => $courseOptions, |
43 | | - 'validation-callback' => function ( $value, array $alldata = null ) use ( $courseOptions ) { |
44 | | - return in_array( (int)$value, array_values( $courseOptions ) ) ? true : wfMsg( 'ep-course-invalid-course' ); |
45 | | - }, |
46 | | - ); |
47 | | - |
48 | | - $fields['token'] = array ( |
49 | | - 'type' => 'text', |
50 | | - 'label-message' => 'ep-course-edit-token', |
51 | | - 'maxlength' => 255, |
52 | | - 'required' => true, |
53 | | - 'size' => 20, |
54 | | - 'validation-callback' => function ( $value, array $alldata = null ) { |
55 | | - $strLen = strlen( $value ); |
56 | | - return ( $strLen !== 0 && $strLen < 2 ) ? wfMsgExt( 'ep-course-invalid-token', 'parsemag', 2 ) : true; |
57 | | - } , |
58 | | - ); |
59 | | - |
60 | | - $fields['year'] = array ( |
61 | | - 'type' => 'int', |
62 | | - 'label-message' => 'ep-course-edit-year', |
63 | | - 'required' => true, |
64 | | - 'min' => 2000, |
65 | | - 'max' => 9001, |
66 | | - 'size' => 15, |
67 | | - ); |
68 | | - |
69 | | - $fields['start'] = array ( |
70 | | - 'class' => 'EPHTMLDateField', |
71 | | - 'label-message' => 'ep-course-edit-start', |
72 | | - 'required' => true, |
73 | | - ); |
74 | | - |
75 | | - $fields['end'] = array ( |
76 | | - 'class' => 'EPHTMLDateField', |
77 | | - 'label-message' => 'ep-course-edit-end', |
78 | | - 'required' => true, |
79 | | - ); |
80 | | - |
81 | | - $fields['description'] = array ( |
82 | | - 'type' => 'textarea', |
83 | | - 'label-message' => 'ep-course-edit-description', |
84 | | - 'required' => true, |
85 | | - 'validation-callback' => function ( $value, array $alldata = null ) { |
86 | | - return strlen( $value ) < 10 ? wfMsgExt( 'ep-course-invalid-description', 'parsemag', 10 ) : true; |
87 | | - } , |
88 | | - 'rows' => 10, |
89 | | - 'id' => 'wpTextbox1', |
90 | | - ); |
91 | | - |
92 | | - return $this->processFormFields( $fields ); |
93 | | - } |
94 | | - |
95 | | - /** |
96 | | - * (non-PHPdoc) |
97 | | - * @see SpecialEPFormPage::getTitleConditions() |
98 | | - */ |
99 | | - protected function getTitleConditions() { |
100 | | - return array( 'id' => $this->subPage ); |
101 | | - } |
102 | | - |
103 | | - /** |
104 | | - * (non-PHPdoc) |
105 | | - * @see SpecialEPFormPage::getNewData() |
106 | | - */ |
107 | | - protected function getNewData() { |
108 | | - return array( |
109 | | - 'mc_id' => $this->getRequest()->getVal( 'newmc' ), |
110 | | - 'year' => $this->getRequest()->getVal( 'newyear' ), |
111 | | - ); |
112 | | - } |
113 | | - |
114 | | - /** |
115 | | - * (non-PHPdoc) |
116 | | - * @see SpecialEPFormPage::handleKnownField() |
117 | | - */ |
118 | | - protected function handleKnownField( $name, $value ) { |
119 | | - if ( in_array( $name, array( 'end', 'start' ) ) ) { |
120 | | - $value = wfTimestamp( TS_MW, strtotime( $value ) ); |
121 | | - } |
122 | | - |
123 | | - return $value; |
124 | | - } |
125 | | - |
126 | | -} |
127 | | - |
128 | | -class EPHTMLDateField extends HTMLTextField { |
129 | | - |
130 | | - public function __construct( $params ) { |
131 | | - parent::__construct( $params ); |
132 | | - |
133 | | - $this->mClass .= " ep-datepicker-tr"; |
134 | | - } |
135 | | - |
136 | | - function getSize() { |
137 | | - return isset( $this->mParams['size'] ) |
138 | | - ? $this->mParams['size'] |
139 | | - : 20; |
140 | | - } |
141 | | - |
142 | | - function getInputHTML( $value ) { |
143 | | - $value = explode( 'T', wfTimestamp( TS_ISO_8601, strtotime( $value ) ) ); |
144 | | - return parent::getInputHTML( $value[0] ); |
145 | | - } |
146 | | - |
147 | | - function validate( $value, $alldata ) { |
148 | | - $p = parent::validate( $value, $alldata ); |
149 | | - |
150 | | - if ( $p !== true ) { |
151 | | - return $p; |
152 | | - } |
153 | | - |
154 | | - $value = trim( $value ); |
155 | | - |
156 | | - // TODO: further validation |
157 | | - |
158 | | - return true; |
159 | | - } |
160 | | -} |
Index: trunk/extensions/EducationProgram/specials/SpecialEditCourse.php |
— | — | @@ -0,0 +1,125 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Addition and modification interface for courses. |
| 6 | + * |
| 7 | + * @since 0.1 |
| 8 | + * |
| 9 | + * @file SpecialEditCourse.php |
| 10 | + * @ingroup EducationProgram |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +class SpecialEditCourse extends SpecialEPFormPage { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.1 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct( 'EditCourse', 'ep-course', 'EPCourse', 'Courses' ); |
| 24 | + |
| 25 | + $this->getOutput()->addModules( 'ep.datepicker' ); |
| 26 | + } |
| 27 | + |
| 28 | + /** |
| 29 | + * (non-PHPdoc) |
| 30 | + * @see SpecialEPFormPage::getFormFields() |
| 31 | + * @return array |
| 32 | + */ |
| 33 | + protected function getFormFields() { |
| 34 | + $fields = parent::getFormFields(); |
| 35 | + |
| 36 | + $courseOptions = EPMC::getMasterCourseOptions(); |
| 37 | + |
| 38 | + $fields['mc_id'] = array ( |
| 39 | + 'type' => 'select', |
| 40 | + 'label-message' => 'ep-course-edit-mastercourse', |
| 41 | + 'required' => true, |
| 42 | + 'options' => $courseOptions, |
| 43 | + 'validation-callback' => function ( $value, array $alldata = null ) use ( $courseOptions ) { |
| 44 | + return in_array( (int)$value, array_values( $courseOptions ) ) ? true : wfMsg( 'ep-course-invalid-course' ); |
| 45 | + }, |
| 46 | + ); |
| 47 | + |
| 48 | + $fields['token'] = array ( |
| 49 | + 'type' => 'text', |
| 50 | + 'label-message' => 'ep-course-edit-token', |
| 51 | + 'maxlength' => 255, |
| 52 | + 'required' => true, |
| 53 | + 'size' => 20, |
| 54 | + 'validation-callback' => function ( $value, array $alldata = null ) { |
| 55 | + $strLen = strlen( $value ); |
| 56 | + return ( $strLen !== 0 && $strLen < 2 ) ? wfMsgExt( 'ep-course-invalid-token', 'parsemag', 2 ) : true; |
| 57 | + } , |
| 58 | + ); |
| 59 | + |
| 60 | + $fields['year'] = array ( |
| 61 | + 'type' => 'int', |
| 62 | + 'label-message' => 'ep-course-edit-year', |
| 63 | + 'required' => true, |
| 64 | + 'min' => 2000, |
| 65 | + 'max' => 9001, |
| 66 | + 'size' => 15, |
| 67 | + ); |
| 68 | + |
| 69 | + $fields['start'] = array ( |
| 70 | + 'class' => 'EPHTMLDateField', |
| 71 | + 'label-message' => 'ep-course-edit-start', |
| 72 | + 'required' => true, |
| 73 | + ); |
| 74 | + |
| 75 | + $fields['end'] = array ( |
| 76 | + 'class' => 'EPHTMLDateField', |
| 77 | + 'label-message' => 'ep-course-edit-end', |
| 78 | + 'required' => true, |
| 79 | + ); |
| 80 | + |
| 81 | + $fields['description'] = array ( |
| 82 | + 'type' => 'textarea', |
| 83 | + 'label-message' => 'ep-course-edit-description', |
| 84 | + 'required' => true, |
| 85 | + 'validation-callback' => function ( $value, array $alldata = null ) { |
| 86 | + return strlen( $value ) < 10 ? wfMsgExt( 'ep-course-invalid-description', 'parsemag', 10 ) : true; |
| 87 | + } , |
| 88 | + 'rows' => 10, |
| 89 | + 'id' => 'wpTextbox1', |
| 90 | + ); |
| 91 | + |
| 92 | + return $this->processFormFields( $fields ); |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * (non-PHPdoc) |
| 97 | + * @see SpecialEPFormPage::getTitleConditions() |
| 98 | + */ |
| 99 | + protected function getTitleConditions() { |
| 100 | + return array( 'id' => $this->subPage ); |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * (non-PHPdoc) |
| 105 | + * @see SpecialEPFormPage::getNewData() |
| 106 | + */ |
| 107 | + protected function getNewData() { |
| 108 | + return array( |
| 109 | + 'mc_id' => $this->getRequest()->getVal( 'newmc' ), |
| 110 | + 'year' => $this->getRequest()->getVal( 'newyear' ), |
| 111 | + ); |
| 112 | + } |
| 113 | + |
| 114 | + /** |
| 115 | + * (non-PHPdoc) |
| 116 | + * @see SpecialEPFormPage::handleKnownField() |
| 117 | + */ |
| 118 | + protected function handleKnownField( $name, $value ) { |
| 119 | + if ( in_array( $name, array( 'end', 'start' ) ) ) { |
| 120 | + $value = wfTimestamp( TS_MW, strtotime( $value ) ); |
| 121 | + } |
| 122 | + |
| 123 | + return $value; |
| 124 | + } |
| 125 | + |
| 126 | +} |
Property changes on: trunk/extensions/EducationProgram/specials/SpecialEditCourse.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 127 | + native |
Index: trunk/extensions/EducationProgram/specials/SpecialMasterCourse.php |
— | — | @@ -41,14 +41,14 @@ |
42 | 42 | else { |
43 | 43 | $out->setPageTitle( wfMsgExt( 'ep-mc-title', 'parsemag', $this->subPage ) ); |
44 | 44 | |
45 | | - $masterCourse = EPCourse::selectRow( null, array( 'name' => $this->subPage ) ); |
| 45 | + $masterCourse = EPMC::selectRow( null, array( 'name' => $this->subPage ) ); |
46 | 46 | |
47 | 47 | if ( $masterCourse === false ) { |
48 | 48 | $this->displayNavigation(); |
49 | 49 | |
50 | 50 | if ( $this->getUser()->isAllowed( 'ep-mc' ) ) { |
51 | 51 | $out->addWikiMsg( 'ep-mc-create', $this->subPage ); |
52 | | - EPCourse::displayAddNewRegion( $this->getContext(), array( 'name' => $this->subPage ) ); |
| 52 | + EPMC::displayAddNewRegion( $this->getContext(), array( 'name' => $this->subPage ) ); |
53 | 53 | } |
54 | 54 | else { |
55 | 55 | $out->addWikiMsg( 'ep-mc-none', $this->subPage ); |
— | — | @@ -73,12 +73,12 @@ |
74 | 74 | |
75 | 75 | $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-mc-courses' ) ) ); |
76 | 76 | |
77 | | - EPCourse::displayPager( $this->getContext(), array( 'mc_id' => $masterCourse->getId() ) ); |
| 77 | + EPMC::displayPager( $this->getContext(), array( 'id' => $masterCourse->getId() ) ); |
78 | 78 | |
79 | 79 | if ( $this->getUser()->isAllowed( 'ep-mc' ) ) { |
80 | 80 | $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-mc-add-term' ) ) ); |
81 | 81 | |
82 | | - EPCourse::displayAddNewControl( $this->getContext(), array( 'mc' => $masterCourse->getId() ) ); |
| 82 | + EPMC::displayAddNewControl( $this->getContext(), array( 'mc' => $masterCourse->getId() ) ); |
83 | 83 | } |
84 | 84 | } |
85 | 85 | } |
Index: trunk/extensions/EducationProgram/includes/EPHTMLDateField.php |
— | — | @@ -0,0 +1,47 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * HTMLForm date field input. |
| 6 | + * |
| 7 | + * @since 0.1 |
| 8 | + * |
| 9 | + * @file EPHTMLDateField.php |
| 10 | + * @ingroup EducationProgram |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +class EPHTMLDateField extends HTMLTextField { |
| 16 | + |
| 17 | + public function __construct( $params ) { |
| 18 | + parent::__construct( $params ); |
| 19 | + |
| 20 | + $this->mClass .= " ep-datepicker-tr"; |
| 21 | + } |
| 22 | + |
| 23 | + function getSize() { |
| 24 | + return isset( $this->mParams['size'] ) |
| 25 | + ? $this->mParams['size'] |
| 26 | + : 20; |
| 27 | + } |
| 28 | + |
| 29 | + function getInputHTML( $value ) { |
| 30 | + $value = explode( 'T', wfTimestamp( TS_ISO_8601, strtotime( $value ) ) ); |
| 31 | + return parent::getInputHTML( $value[0] ); |
| 32 | + } |
| 33 | + |
| 34 | + function validate( $value, $alldata ) { |
| 35 | + $p = parent::validate( $value, $alldata ); |
| 36 | + |
| 37 | + if ( $p !== true ) { |
| 38 | + return $p; |
| 39 | + } |
| 40 | + |
| 41 | + $value = trim( $value ); |
| 42 | + |
| 43 | + // TODO: further validation |
| 44 | + |
| 45 | + return true; |
| 46 | + } |
| 47 | + |
| 48 | +} |
Index: trunk/extensions/EducationProgram/includes/EPMCPager.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | switch ( $name ) { |
62 | 62 | case 'name': |
63 | 63 | $value = Linker::linkKnown( |
64 | | - SpecialPage::getTitleFor( 'Course', $value ), |
| 64 | + SpecialPage::getTitleFor( 'MasterCourse', $value ), |
65 | 65 | htmlspecialchars( $value ) |
66 | 66 | ); |
67 | 67 | break; |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | $value = htmlspecialchars( $this->getLanguage()->formatNum( $value ) ); |
78 | 78 | break; |
79 | 79 | case 'active': |
80 | | - $value = wfMsgHtml( 'epcoursepager-' . ( $value == '1' ? 'yes' : 'no' ) ); |
| 80 | + $value = wfMsgHtml( 'epmcpager-' . ( $value == '1' ? 'yes' : 'no' ) ); |
81 | 81 | break; |
82 | 82 | } |
83 | 83 | |
— | — | @@ -135,13 +135,13 @@ |
136 | 136 | $links = parent::getControlLinks( $item ); |
137 | 137 | |
138 | 138 | $links[] = $value = Linker::linkKnown( |
139 | | - SpecialPage::getTitleFor( 'Course', $item->getField( 'name' ) ), |
| 139 | + SpecialPage::getTitleFor( 'MasterCourse', $item->getField( 'name' ) ), |
140 | 140 | wfMsgHtml( 'view' ) |
141 | 141 | ); |
142 | 142 | |
143 | | - if ( $this->getUser()->isAllowed( 'ep-course' ) ) { |
| 143 | + if ( $this->getUser()->isAllowed( 'ep-mc' ) ) { |
144 | 144 | $links[] = $value = Linker::linkKnown( |
145 | | - SpecialPage::getTitleFor( 'EditCourse', $item->getField( 'name' ) ), |
| 145 | + SpecialPage::getTitleFor( 'EditMasterCourse', $item->getField( 'name' ) ), |
146 | 146 | wfMsgHtml( 'edit' ) |
147 | 147 | ); |
148 | 148 | |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -143,8 +143,8 @@ |
144 | 144 | 'special-editinstitution-edit' => 'Edit institution', |
145 | 145 | 'special-mastercourses' => 'Master courses', |
146 | 146 | 'special-mastercourse' => 'Master course', |
147 | | - 'special-editmc-add' => 'Add master course', |
148 | | - 'special-editmc-edit' => 'Edit master course', |
| 147 | + 'special-editmastercourse-add' => 'Add master course', |
| 148 | + 'special-editmastercourse-edit' => 'Edit master course', |
149 | 149 | 'special-editcourse-add' => 'Add course', |
150 | 150 | 'special-editcourse-edit' => 'Edit course', |
151 | 151 | 'special-enroll' => 'Enroll', |
— | — | @@ -305,25 +305,25 @@ |
306 | 306 | 'ep-institution-inactive' => 'Inactive', |
307 | 307 | 'ep-institution-active' => 'Active', |
308 | 308 | |
309 | | - // Special:Course |
310 | | - 'ep-course-title' => 'Course: $1', |
311 | | - 'ep-course-terms' => 'Terms', |
312 | | - 'ep-course-none' => 'There is no course with name "$1". See [[Special:Courses|here]] for a list of courses.', |
313 | | - 'ep-course-create' => 'There is no course with name "$1" yet, but you can create it.', |
314 | | - 'specialcourse-summary-name' => 'Name', |
315 | | - 'specialcourse-summary-org' => 'Institution', |
316 | | - 'specialcourse-summary-students' => 'Student count', |
317 | | - 'specialcourse-summary-status' => 'Status', |
318 | | - 'ep-course-description' => 'Description', |
319 | | - 'ep-course-nav-edit' => 'Edit this course', |
320 | | - 'ep-course-add-term' => 'Add a term', |
321 | | - 'ep-course-inactive' => 'Inactive', |
322 | | - 'ep-course-active' => 'Active', |
323 | | - 'specialcourse-summary-terms' => 'Term count', |
324 | | - 'specialcourse-summary-instructors' => 'Instructors', |
325 | | - 'ep-course-no-instructors' => 'There are no instructors for this course.', |
326 | | - 'ep-course-become-instructor' => 'Become instructor', |
327 | | - 'ep-course-add-instructor' => 'Add an instructor', |
| 309 | + // Special:MasterCourse |
| 310 | + 'ep-mc-title' => 'Master course: $1', |
| 311 | + 'ep-mc-courses' => 'Courses', |
| 312 | + 'ep-mc-none' => 'There is no master course with name "$1". See [[Special:MasterCourses|here]] for a list of master courses.', |
| 313 | + 'ep-mc-create' => 'There is no master course with name "$1" yet, but you can create it.', |
| 314 | + 'specialmastercourse-summary-name' => 'Name', |
| 315 | + 'specialmastercourse-summary-org' => 'Institution', |
| 316 | + 'specialmastercourse-summary-students' => 'Student count', |
| 317 | + 'specialmastercourse-summary-status' => 'Status', |
| 318 | + 'ep-mc-description' => 'Description', |
| 319 | + 'ep-mc-nav-edit' => 'Edit this master course', |
| 320 | + 'ep-mc-add-course' => 'Add a course', |
| 321 | + 'ep-mc-inactive' => 'Inactive', |
| 322 | + 'ep-mc-active' => 'Active', |
| 323 | + 'specialmastercourse-summary-courses' => 'Course count', |
| 324 | + 'specialmastercourse-summary-instructors' => 'Instructors', |
| 325 | + 'ep-mc-no-instructors' => 'There are no instructors for this master course.', |
| 326 | + 'ep-mc-become-instructor' => 'Become instructor', |
| 327 | + 'ep-mc-add-instructor' => 'Add an instructor', |
328 | 328 | |
329 | 329 | // Special:Course |
330 | 330 | 'ep-course-title' => 'Course: $1', |
Index: trunk/extensions/EducationProgram/EducationProgram.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | * |
7 | 7 | * Documentation: https://www.mediawiki.org/wiki/Extension:Education_Program |
8 | 8 | * Support https://www.mediawiki.org/wiki/Extension_talk:Education_Program |
9 | | - * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/EducationProgram |
| 9 | + * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/EducationProgram |
10 | 10 | * |
11 | 11 | * The source code makes use of a number of terms different from but corresponding to those in the UI: |
12 | 12 | * * Org instead of Institution |
— | — | @@ -65,8 +65,8 @@ |
66 | 66 | |
67 | 67 | $wgAutoloadClasses['EPCourse'] = dirname( __FILE__ ) . '/includes/EPCourse.php'; |
68 | 68 | $wgAutoloadClasses['EPCoursePager'] = dirname( __FILE__ ) . '/includes/EPCoursePager.php'; |
69 | | -$wgAutoloadClasses['EPMC'] = dirname( __FILE__ ) . '/includes/EPMC.php'; |
70 | | -$wgAutoloadClasses['EPMCPager'] = dirname( __FILE__ ) . '/includes/EPMCPager.php'; |
| 69 | +$wgAutoloadClasses['EPMC'] = dirname( __FILE__ ) . '/includes/EPMC.php'; |
| 70 | +$wgAutoloadClasses['EPMCPager'] = dirname( __FILE__ ) . '/includes/EPMCPager.php'; |
71 | 71 | $wgAutoloadClasses['EPDBObject'] = dirname( __FILE__ ) . '/includes/EPDBObject.php'; |
72 | 72 | $wgAutoloadClasses['EPInstructor'] = dirname( __FILE__ ) . '/includes/EPInstructor.php'; |
73 | 73 | $wgAutoloadClasses['EPLogFormatter'] = dirname( __FILE__ ) . '/includes/EPLogFormatter.php'; |
— | — | @@ -76,10 +76,11 @@ |
77 | 77 | $wgAutoloadClasses['EPStudent'] = dirname( __FILE__ ) . '/includes/EPStudent.php'; |
78 | 78 | $wgAutoloadClasses['EPStudentPager'] = dirname( __FILE__ ) . '/includes/EPStudentPager.php'; |
79 | 79 | $wgAutoloadClasses['EPUtils'] = dirname( __FILE__ ) . '/includes/EPUtils.php'; |
80 | | -$wgAutoloadClasses['EPOA'] = dirname( __FILE__ ) . '/includes/EPOA.php'; |
81 | | -$wgAutoloadClasses['EPOAPager'] = dirname( __FILE__ ) . '/includes/EPOAPager.php'; |
82 | | -$wgAutoloadClasses['EPCA'] = dirname( __FILE__ ) . '/includes/EPCA.php'; |
83 | | -$wgAutoloadClasses['EPCAPager'] = dirname( __FILE__ ) . '/includes/EPCAPager.php'; |
| 80 | +$wgAutoloadClasses['EPOA'] = dirname( __FILE__ ) . '/includes/EPOA.php'; |
| 81 | +$wgAutoloadClasses['EPOAPager'] = dirname( __FILE__ ) . '/includes/EPOAPager.php'; |
| 82 | +$wgAutoloadClasses['EPCA'] = dirname( __FILE__ ) . '/includes/EPCA.php'; |
| 83 | +$wgAutoloadClasses['EPCAPager'] = dirname( __FILE__ ) . '/includes/EPCAPager.php'; |
| 84 | +$wgAutoloadClasses['EPHTMLDateField'] = dirname( __FILE__ ) . '/includes/EPHTMLDateField.php'; |
84 | 85 | |
85 | 86 | $wgAutoloadClasses['SpecialCourse'] = dirname( __FILE__ ) . '/specials/SpecialCourse.php'; |
86 | 87 | $wgAutoloadClasses['SpecialCourses'] = dirname( __FILE__ ) . '/specials/SpecialCourses.php'; |
— | — | @@ -97,10 +98,10 @@ |
98 | 99 | $wgAutoloadClasses['SpecialMasterCourse'] = dirname( __FILE__ ) . '/specials/SpecialMasterCourse.php'; |
99 | 100 | $wgAutoloadClasses['SpecialMasterCourses'] = dirname( __FILE__ ) . '/specials/SpecialMasterCourses.php'; |
100 | 101 | $wgAutoloadClasses['SpecialEnroll'] = dirname( __FILE__ ) . '/specials/SpecialEnroll.php'; |
101 | | -$wgAutoloadClasses['SpecialCAs'] = dirname( __FILE__ ) . '/specials/SpecialCAs.php'; |
102 | | -$wgAutoloadClasses['SpecialOAs'] = dirname( __FILE__ ) . '/specials/SpecialOAs.php'; |
103 | | -$wgAutoloadClasses['SpecialCA'] = dirname( __FILE__ ) . '/specials/SpecialCA.php'; |
104 | | -$wgAutoloadClasses['SpecialOA'] = dirname( __FILE__ ) . '/specials/SpecialOA.php'; |
| 102 | +$wgAutoloadClasses['SpecialCAs'] = dirname( __FILE__ ) . '/specials/SpecialCAs.php'; |
| 103 | +$wgAutoloadClasses['SpecialOAs'] = dirname( __FILE__ ) . '/specials/SpecialOAs.php'; |
| 104 | +$wgAutoloadClasses['SpecialCA'] = dirname( __FILE__ ) . '/specials/SpecialCA.php'; |
| 105 | +$wgAutoloadClasses['SpecialOA'] = dirname( __FILE__ ) . '/specials/SpecialOA.php'; |
105 | 106 | |
106 | 107 | // Special pages |
107 | 108 | $wgSpecialPages['MyCourses'] = 'SpecialMyCourses'; |
— | — | @@ -115,12 +116,12 @@ |
116 | 117 | $wgSpecialPages['EducationProgram'] = 'SpecialEducationProgram'; |
117 | 118 | $wgSpecialPages['EditCourse'] = 'SpecialEditCourse'; |
118 | 119 | $wgSpecialPages['EditInstitution'] = 'SpecialEditInstitution'; |
119 | | -$wgSpecialPages['EditMasterCourse'] = 'SpecialEditMasterCourse'; |
120 | | -$wgSpecialPages['Enroll'] = 'SpecialEnroll'; |
121 | | -$wgSpecialPages['CampusAmbassadors'] = 'SpecialCAs'; |
122 | | -$wgSpecialPages['OnlineAmbassadors'] = 'SpecialOAs'; |
123 | | -$wgSpecialPages['CampusAmbassador'] = 'SpecialCA'; |
124 | | -$wgSpecialPages['OnlineAmbassador'] = 'SpecialOA'; |
| 120 | +$wgSpecialPages['EditMasterCourse'] = 'SpecialEditMasterCourse'; |
| 121 | +$wgSpecialPages['Enroll'] = 'SpecialEnroll'; |
| 122 | +$wgSpecialPages['CampusAmbassadors'] = 'SpecialCAs'; |
| 123 | +$wgSpecialPages['OnlineAmbassadors'] = 'SpecialOAs'; |
| 124 | +$wgSpecialPages['CampusAmbassador'] = 'SpecialCA'; |
| 125 | +$wgSpecialPages['OnlineAmbassador'] = 'SpecialOA'; |
125 | 126 | |
126 | 127 | $wgSpecialPageGroups['MyCourses'] = 'education'; |
127 | 128 | $wgSpecialPageGroups['Institution'] = 'education'; |
— | — | @@ -151,15 +152,15 @@ |
152 | 153 | $egEPDBObjects[] = array( 'table' => 'ep_students_per_course', 'prefix' => 'spc_' ); |
153 | 154 | |
154 | 155 | // API |
155 | | -$wgAPIModules['deleteeducation'] = 'ApiDeleteEducation'; |
156 | | -$wgAPIModules['instructor'] = 'ApiInstructor'; |
157 | | -$wgAPIModules['refresheducation'] = 'ApiRefreshEducation'; |
| 156 | +$wgAPIModules['deleteeducation'] = 'ApiDeleteEducation'; |
| 157 | +$wgAPIModules['instructor'] = 'ApiInstructor'; |
| 158 | +$wgAPIModules['refresheducation'] = 'ApiRefreshEducation'; |
158 | 159 | |
159 | 160 | // Hooks |
160 | | -$wgHooks['LoadExtensionSchemaUpdates'][] = 'EPHooks::onSchemaUpdate'; |
161 | | -$wgHooks['UnitTestsList'][] = 'EPHooks::registerUnitTests'; |
162 | | -$wgHooks['PersonalUrls'][] = 'EPHooks::onPersonalUrls'; |
163 | | -$wgHooks['GetPreferences'][] = 'EPHooks::onGetPreferences'; |
| 161 | +$wgHooks['LoadExtensionSchemaUpdates'][] = 'EPHooks::onSchemaUpdate'; |
| 162 | +$wgHooks['UnitTestsList'][] = 'EPHooks::registerUnitTests'; |
| 163 | +$wgHooks['PersonalUrls'][] = 'EPHooks::onPersonalUrls'; |
| 164 | +$wgHooks['GetPreferences'][] = 'EPHooks::onGetPreferences'; |
164 | 165 | $wgHooks['SkinTemplateNavigation::SpecialPage'][] = 'EPHooks::onSpecialPageTabs'; |
165 | 166 | |
166 | 167 | // Logging |
— | — | @@ -215,7 +216,7 @@ |
216 | 217 | // Rights |
217 | 218 | $wgAvailableRights[] = 'ep-org'; // Manage orgs |
218 | 219 | $wgAvailableRights[] = 'ep-course'; // Manage courses |
219 | | -$wgAvailableRights[] = 'ep-mc'; // Manage master courses |
| 220 | +$wgAvailableRights[] = 'ep-mc'; // Manage master courses |
220 | 221 | $wgAvailableRights[] = 'ep-token'; // See enrollment tokens |
221 | 222 | $wgAvailableRights[] = 'ep-enroll'; // Enroll as a student |
222 | 223 | $wgAvailableRights[] = 'ep-remstudent'; // Disassociate students from terms |