Index: trunk/extensions/EducationProgram/includes/EPOrgPager.php |
— | — | @@ -32,8 +32,8 @@ |
33 | 33 | 'name', |
34 | 34 | 'city', |
35 | 35 | 'country', |
| 36 | + 'mcs', |
36 | 37 | 'courses', |
37 | | - 'terms', |
38 | 38 | 'students', |
39 | 39 | 'active', |
40 | 40 | ); |
— | — | @@ -71,11 +71,11 @@ |
72 | 72 | $countries = array_flip( EPUtils::getCountryOptions( $this->getLanguage()->getCode() ) ); |
73 | 73 | $value = htmlspecialchars( $countries[$value] ); |
74 | 74 | break; |
75 | | - case 'courses': case 'students': case 'terms': |
| 75 | + case 'courses': case 'students': case 'mcs': |
76 | 76 | $rawValue = $value; |
77 | 77 | $value = htmlspecialchars( $this->getLanguage()->formatNum( $value ) ); |
78 | 78 | |
79 | | - if ( $rawValue > 0 && in_array( $name, array( 'terms', 'courses' ) ) ) { |
| 79 | + if ( $rawValue > 0 && in_array( $name, array( 'mcs', 'courses' ) ) ) { |
80 | 80 | $value = Linker::linkKnown( |
81 | 81 | SpecialPage::getTitleFor( $this->getLanguage()->ucfirst( $name ) ), |
82 | 82 | $value, |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | 'country', |
106 | 106 | 'courses', |
107 | 107 | 'students', |
108 | | - 'terms', |
| 108 | + 'mcs', |
109 | 109 | 'active', |
110 | 110 | ); |
111 | 111 | } |
Index: trunk/extensions/EducationProgram/includes/EPStudent.php |
— | — | @@ -14,12 +14,12 @@ |
15 | 15 | class EPStudent extends EPDBObject { |
16 | 16 | |
17 | 17 | /** |
18 | | - * Cached array of the linked EPTerm objects. |
| 18 | + * Cached array of the linked EPCourse objects. |
19 | 19 | * |
20 | 20 | * @since 0.1 |
21 | 21 | * @var array|false |
22 | 22 | */ |
23 | | - protected $terms = false; |
| 23 | + protected $courses = false; |
24 | 24 | |
25 | 25 | /** |
26 | 26 | * Cached user object of the user that is this student. |
— | — | @@ -63,44 +63,44 @@ |
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
67 | | - * Associate the student with the provided terms. |
| 67 | + * Associate the student with the provided courses. |
68 | 68 | * |
69 | 69 | * @since 0.1 |
70 | 70 | * |
71 | | - * @param array $terms |
| 71 | + * @param array $courses |
72 | 72 | * |
73 | 73 | * @return bool |
74 | 74 | */ |
75 | | - public function associateWithTerms( array /* of EPTerm */ $terms ) { |
| 75 | + public function associateWithTerms( array /* of EPCourse */ $courses ) { |
76 | 76 | $dbw = wfGetDB( DB_MASTER ); |
77 | 77 | |
78 | 78 | $success = true; |
79 | 79 | |
80 | 80 | $dbw->begin(); |
81 | 81 | |
82 | | - foreach ( $terms as /* EPTerm */ $term ) { |
| 82 | + foreach ( $courses as /* EPCourse */ $course ) { |
83 | 83 | $success = $dbw->insert( |
84 | | - 'ep_students_per_term', |
| 84 | + 'ep_students_per_course', |
85 | 85 | array( |
86 | | - 'spt_student_id' => $this->getId(), |
87 | | - 'spt_term_id' => $term->getId(), |
| 86 | + 'spc_student_id' => $this->getId(), |
| 87 | + 'spc_term_id' => $course->getId(), |
88 | 88 | ) |
89 | 89 | ) && $success; |
90 | 90 | } |
91 | 91 | |
92 | 92 | $dbw->commit(); |
93 | 93 | |
94 | | - foreach ( $terms as /* EPTerm */ $term ) { |
95 | | - EPCourse::updateSummaryFields( 'students', array( 'id' => $term->getField( 'course_id' ) ) ); |
96 | | - EPOrg::updateSummaryFields( 'students', array( 'id' => $term->getField( 'org_id' ) ) ); |
97 | | - EPTerm::updateSummaryFields( 'students', array( 'id' => $this->getId() ) ); |
| 94 | + foreach ( $courses as /* EPCourse */ $course ) { |
| 95 | + EPMC::updateSummaryFields( 'students', array( 'id' => $course->getField( 'mc_id' ) ) ); |
| 96 | + EPOrg::updateSummaryFields( 'students', array( 'id' => $course->getField( 'org_id' ) ) ); |
| 97 | + EPCourse::updateSummaryFields( 'students', array( 'id' => $this->getId() ) ); |
98 | 98 | } |
99 | 99 | |
100 | 100 | return $success; |
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
104 | | - * Returns the terms this student is enrolled in. |
| 104 | + * Returns the courses this student is enrolled in. |
105 | 105 | * Caches the result when no conditions are provided and all fields are selected. |
106 | 106 | * |
107 | 107 | * @since 0.1 |
— | — | @@ -108,98 +108,98 @@ |
109 | 109 | * @param string|array|null $fields |
110 | 110 | * @param array $conditions |
111 | 111 | * |
112 | | - * @return array of EPTerm |
| 112 | + * @return array of EPCourse |
113 | 113 | */ |
114 | | - public function getTerms( $fields = null, array $conditions = array() ) { |
| 114 | + public function getCourses( $fields = null, array $conditions = array() ) { |
115 | 115 | if ( count( $conditions ) !== 0 ) { |
116 | | - return $this->doGetTerms( $fields, $conditions ); |
| 116 | + return $this->doGetCourses( $fields, $conditions ); |
117 | 117 | } |
118 | 118 | |
119 | | - if ( $this->terms === false ) { |
120 | | - $terms = $this->doGetTerms( $fields, $conditions ); |
| 119 | + if ( $this->courses === false ) { |
| 120 | + $courses = $this->doGetCourses( $fields, $conditions ); |
121 | 121 | |
122 | 122 | if ( is_null( $fields ) ) { |
123 | | - $this->terms = $terms; |
| 123 | + $this->courses = $courses; |
124 | 124 | } |
125 | 125 | |
126 | | - return $terms; |
| 126 | + return $courses; |
127 | 127 | } |
128 | 128 | else { |
129 | | - return $this->terms; |
| 129 | + return $this->courses; |
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
134 | | - * Returns the courses this student is linked to (via terms). |
| 134 | + * Returns the master courses this student is linked to (via courses). |
135 | 135 | * |
136 | 136 | * @since 0.1 |
137 | 137 | * |
138 | 138 | * @param string|null|array $fields |
139 | 139 | * @param array $conditions |
140 | | - * @param array $termConditions |
| 140 | + * @param array $courseConditions |
141 | 141 | * |
142 | | - * @return array of EPCourse |
| 142 | + * @return array of EPMC |
143 | 143 | */ |
144 | | - public function getCourses( $fields = null, array $conditions = array(), array $termConditions = array() ) { |
145 | | - $courseIds = array_reduce( |
146 | | - $this->getTerms( 'course_id', $termConditions ), |
147 | | - function( array $ids, EPTerm $term ) { |
148 | | - $ids[] = $term->getField( 'course_id' ); |
| 144 | + public function getMasterCourses( $fields = null, array $conditions = array(), array $courseConditions = array() ) { |
| 145 | + $mcIds = array_reduce( |
| 146 | + $this->getCourses( 'course_id', $courseConditions ), |
| 147 | + function( array $ids, EPCourse $term ) { |
| 148 | + $ids[] = $term->getField( 'mc_id' ); |
149 | 149 | return $ids; |
150 | | - } , |
| 150 | + }, |
151 | 151 | array() |
152 | 152 | ); |
153 | 153 | |
154 | | - if ( count( $courseIds ) < 1 ) { |
| 154 | + if ( count( $mcIds ) < 1 ) { |
155 | 155 | return array(); |
156 | 156 | } |
157 | 157 | |
158 | | - $conditions['id'] = array_unique( $courseIds ); |
| 158 | + $conditions['id'] = array_unique( $mcIds ); |
159 | 159 | |
160 | | - return EPCourse::select( $fields, $conditions ); |
| 160 | + return EPMC::select( $fields, $conditions ); |
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
164 | | - * Returns the courses this student is currently enrolled in. |
| 164 | + * Returns the master courses this student is currently enrolled in. |
165 | 165 | * |
166 | 166 | * @since 0.1 |
167 | 167 | * |
168 | 168 | * @param string|null|array $fields |
169 | 169 | * @param array $conditions |
170 | 170 | * |
171 | | - * @return array of EPCourse |
| 171 | + * @return array of EPMC |
172 | 172 | */ |
173 | | - public function getCurrentCourses( $fields = null, array $conditions = array() ) { |
| 173 | + public function getCurrentMasterCourses( $fields = null, array $conditions = array() ) { |
174 | 174 | $conditions['active'] = 1; |
175 | | - return $this->getCourses( $fields, $conditions ); |
| 175 | + return $this->getMasterCourses( $fields, $conditions ); |
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
179 | | - * Returns the courses this student was previously enrolled in. |
| 179 | + * Returns the master courses this student was previously enrolled in. |
180 | 180 | * |
181 | 181 | * @since 0.1 |
182 | 182 | * |
183 | 183 | * @param string|null|array $fields |
184 | 184 | * @param array $conditions |
185 | 185 | * |
186 | | - * @return array of EPCourse |
| 186 | + * @return array of EPMC |
187 | 187 | */ |
188 | | - public function getPassedCourses( $fields = null, array $conditions = array() ) { |
| 188 | + public function getPassedMasterCourses( $fields = null, array $conditions = array() ) { |
189 | 189 | $conditions['active'] = 0; |
190 | | - return $this->getCourses( $fields, $conditions ); |
| 190 | + return $this->getMasterCourses( $fields, $conditions ); |
191 | 191 | } |
192 | 192 | |
193 | 193 | /** |
194 | | - * Returns the terms this student is enrolled in. |
| 194 | + * Returns the courses this student is enrolled in. |
195 | 195 | * |
196 | 196 | * @since 0.1 |
197 | 197 | * |
198 | 198 | * @param string|array|null $fields |
199 | 199 | * @param array $conditions |
200 | 200 | * |
201 | | - * @return array of EPTerm |
| 201 | + * @return array of EPCourse |
202 | 202 | */ |
203 | | - protected function doGetTerms( $fields, array $conditions ) { |
| 203 | + protected function doGetCourses( $fields, array $conditions ) { |
204 | 204 | $conditions[] = array( array( 'ep_students', 'id' ), $this->getId() ); |
205 | 205 | |
206 | 206 | return EPTerm::select( |
— | — | @@ -207,14 +207,14 @@ |
208 | 208 | $conditions, |
209 | 209 | array(), |
210 | 210 | array( |
211 | | - 'ep_students_per_term' => array( 'INNER JOIN', array( array( array( 'ep_students_per_term', 'term_id' ), array( 'ep_terms', 'id' ) ) ) ), |
212 | | - 'ep_students' => array( 'INNER JOIN', array( array( array( 'ep_students_per_term', 'student_id' ), array( 'ep_students', 'id' ) ) ) ) |
| 211 | + 'ep_students_per_course' => array( 'INNER JOIN', array( array( array( 'ep_students_per_course', 'course_id' ), array( 'ep_courses', 'id' ) ) ) ), |
| 212 | + 'ep_students' => array( 'INNER JOIN', array( array( array( 'ep_students_per_course', 'student_id' ), array( 'ep_students', 'id' ) ) ) ) |
213 | 213 | ) |
214 | 214 | ); |
215 | 215 | } |
216 | 216 | |
217 | 217 | /** |
218 | | - * Retruns if the mentor has any term matching the provided conditions. |
| 218 | + * Returns if the student has any course matching the provided conditions. |
219 | 219 | * |
220 | 220 | * @since 0.1 |
221 | 221 | * |
— | — | @@ -222,8 +222,8 @@ |
223 | 223 | * |
224 | 224 | * @return boolean |
225 | 225 | */ |
226 | | - public function hasTerm( array $conditions = array() ) { |
227 | | - return count( $this->getTerms( 'id', $conditions ) ) > 0; |
| 226 | + public function hasCourse( array $conditions = array() ) { |
| 227 | + return count( $this->getCourses( 'id', $conditions ) ) > 0; |
228 | 228 | } |
229 | 229 | |
230 | 230 | /** |
Index: trunk/extensions/EducationProgram/includes/EPMC.php |
— | — | @@ -192,19 +192,19 @@ |
193 | 193 | * |
194 | 194 | * @since 0.1 |
195 | 195 | * |
196 | | - * @param array|null $courses |
| 196 | + * @param array|null $masterCourses |
197 | 197 | * |
198 | 198 | * @return array |
199 | 199 | */ |
200 | | - public static function getCourseOptions( array /* EPCourse */ $courses = null ) { |
| 200 | + public static function getMasterCourseOptions( array /* EPMC */ $masterCourses = null ) { |
201 | 201 | $options = array(); |
202 | 202 | |
203 | | - if ( is_null( $courses ) ) { |
204 | | - $courses = EPCourse::select( array( 'name', 'id' ) ); |
| 203 | + if ( is_null( $masterCourses ) ) { |
| 204 | + $masterCourses = self::select( array( 'name', 'id' ) ); |
205 | 205 | } |
206 | 206 | |
207 | | - foreach ( $courses as /* EPCourse */ $course ) { |
208 | | - $options[$course->getField( 'name' )] = $course->getId(); |
| 207 | + foreach ( $masterCourses as /* EPMC */ $masterCourse ) { |
| 208 | + $options[$masterCourse->getField( 'name' )] = $masterCourse->getId(); |
209 | 209 | } |
210 | 210 | |
211 | 211 | return $options; |
— | — | @@ -281,7 +281,7 @@ |
282 | 282 | } |
283 | 283 | |
284 | 284 | /** |
285 | | - * Adds a control to add a new course to the provided context |
| 285 | + * Adds a control to add a new master course to the provided context |
286 | 286 | * or show a message if this is not possible for some reason. |
287 | 287 | * |
288 | 288 | * @since 0.1 |
— | — | @@ -291,7 +291,7 @@ |
292 | 292 | */ |
293 | 293 | public static function displayAddNewRegion( IContextSource $context, array $args = array() ) { |
294 | 294 | if ( EPOrg::has() ) { |
295 | | - EPCourse::displayAddNewControl( $context, $args ); |
| 295 | + self::displayAddNewControl( $context, $args ); |
296 | 296 | } |
297 | 297 | elseif ( $context->getUser()->isAllowed( 'ep-org' ) ) { |
298 | 298 | $context->getOutput()->addWikiMsg( 'ep-courses-addorgfirst' ); |
— | — | @@ -346,7 +346,7 @@ |
347 | 347 | * @return Title |
348 | 348 | */ |
349 | 349 | public function getTitle() { |
350 | | - return SpecialPage::getTitleFor( 'Course', $this->getField( 'name' ) ); |
| 350 | + return SpecialPage::getTitleFor( 'MasterCourse', $this->getField( 'name' ) ); |
351 | 351 | } |
352 | 352 | |
353 | 353 | /** |
Index: trunk/extensions/EducationProgram/includes/EPCourse.php |
— | — | @@ -14,12 +14,12 @@ |
15 | 15 | class EPCourse extends EPDBObject { |
16 | 16 | |
17 | 17 | /** |
18 | | - * Field for caching the linked course. |
| 18 | + * Field for caching the linked master course. |
19 | 19 | * |
20 | 20 | * @since 0.1 |
21 | | - * @var EPCourse|false |
| 21 | + * @var EPMC|false |
22 | 22 | */ |
23 | | - protected $course = false; |
| 23 | + protected $mc = false; |
24 | 24 | |
25 | 25 | /** |
26 | 26 | * Field for caching the linked org. |
— | — | @@ -116,7 +116,7 @@ |
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
120 | | - * Returns the students enrolled in this term. |
| 120 | + * Returns the students enrolled in this course. |
121 | 121 | * |
122 | 122 | * @since 0.1 |
123 | 123 | * |
— | — | @@ -126,21 +126,21 @@ |
127 | 127 | * @return array of EPStudent |
128 | 128 | */ |
129 | 129 | protected function doGetStudents( $fields, array $conditions ) { |
130 | | - $conditions[] = array( array( 'ep_terms', 'id' ), $this->getId() ); |
| 130 | + $conditions[] = array( array( 'ep_courses', 'id' ), $this->getId() ); |
131 | 131 | |
132 | 132 | return EPStudent::select( |
133 | 133 | $fields, |
134 | 134 | $conditions, |
135 | 135 | array(), |
136 | 136 | array( |
137 | | - 'ep_students_per_term' => array( 'INNER JOIN', array( array( array( 'ep_students_per_term', 'student_id' ), array( 'ep_students', 'id' ) ) ) ), |
138 | | - 'ep_terms' => array( 'INNER JOIN', array( array( array( 'ep_students_per_term', 'term_id' ), array( 'ep_terms', 'id' ) ) ) ) |
| 137 | + 'ep_students_per_term' => array( 'INNER JOIN', array( array( array( 'ep_students_per_course', 'student_id' ), array( 'ep_students', 'id' ) ) ) ), |
| 138 | + 'ep_courses' => array( 'INNER JOIN', array( array( array( 'ep_students_per_course', 'course_id' ), array( 'ep_courses', 'id' ) ) ) ) |
139 | 139 | ) |
140 | 140 | ); |
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
144 | | - * Returns the students enrolled in this term. |
| 144 | + * Returns the students enrolled in this course. |
145 | 145 | * Caches the result when no conditions are provided and all fields are selected. |
146 | 146 | * |
147 | 147 | * @since 0.1 |
— | — | @@ -282,20 +282,20 @@ |
283 | 283 | } |
284 | 284 | |
285 | 285 | /** |
286 | | - * Returns the course associated with this term. |
| 286 | + * Returns the master course associated with this course. |
287 | 287 | * |
288 | 288 | * @since 0.1 |
289 | 289 | * |
290 | 290 | * @param string|array|null $fields |
291 | 291 | * |
292 | | - * @return EPCourse |
| 292 | + * @return EPMC |
293 | 293 | */ |
294 | | - public function getCourse( $fields = null ) { |
295 | | - if ( $this->course === false ) { |
296 | | - $this->course = EPCourse::selectRow( $fields, array( 'id' => $this->loadAndGetField( 'course_id' ) ) ); |
| 294 | + public function getMasterCourse( $fields = null ) { |
| 295 | + if ( $this->mc === false ) { |
| 296 | + $this->mc = EPMC::selectRow( $fields, array( 'id' => $this->loadAndGetField( 'mc_id' ) ) ); |
297 | 297 | } |
298 | 298 | |
299 | | - return $this->course; |
| 299 | + return $this->mc; |
300 | 300 | } |
301 | 301 | |
302 | 302 | /** |
Index: trunk/extensions/EducationProgram/EducationProgram.php |
— | — | @@ -220,7 +220,7 @@ |
221 | 221 | $wgAvailableRights[] = 'ep-mc'; // Manage master courses |
222 | 222 | $wgAvailableRights[] = 'ep-token'; // See enrollment tokens |
223 | 223 | $wgAvailableRights[] = 'ep-enroll'; // Enroll as a student |
224 | | -$wgAvailableRights[] = 'ep-remstudent'; // Dissasociate students from terms |
| 224 | +$wgAvailableRights[] = 'ep-remstudent'; // Disassociate students from terms |
225 | 225 | $wgAvailableRights[] = 'ep-online'; // Add or remove online ambassadors from terms |
226 | 226 | $wgAvailableRights[] = 'ep-campus'; // Add or remove campus ambassadors from terms |
227 | 227 | $wgAvailableRights[] = 'ep-instructor'; // Add or remove instructors from courses |
Index: trunk/extensions/EducationProgram/api/ApiRefreshEducation.php |
— | — | @@ -24,8 +24,7 @@ |
25 | 25 | protected static $typeMap = array( |
26 | 26 | 'org' => 'EPOrg', |
27 | 27 | 'course' => 'EPCourse', |
28 | | - 'term' => 'EPTerm', |
29 | | - 'student' => 'EPStudent', |
| 28 | + 'mc' => 'EPMC', |
30 | 29 | ); |
31 | 30 | |
32 | 31 | public function execute() { |
Index: trunk/extensions/EducationProgram/api/ApiInstructor.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | $params = $this->extractRequestParams(); |
20 | 20 | |
21 | 21 | if ( !( isset( $params['username'] ) XOR isset( $params['userid'] ) ) ) { |
22 | | - $this->dieUsage( wfMsgExt( 'ep-addinstructor-invalid-user-args' ), 'username-xor-userid' ); |
| 22 | + $this->dieUsage( wfMsg( 'ep-addinstructor-invalid-user-args' ), 'username-xor-userid' ); |
23 | 23 | } |
24 | 24 | |
25 | 25 | if ( isset( $params['username'] ) ) { |
— | — | @@ -30,27 +30,27 @@ |
31 | 31 | } |
32 | 32 | |
33 | 33 | if ( $userId < 1 ) { |
34 | | - $this->dieUsage( wfMsgExt( 'ep-addinstructor-invalid-user' ), 'invalid-user' ); |
| 34 | + $this->dieUsage( wfMsg( 'ep-addinstructor-invalid-user' ), 'invalid-user' ); |
35 | 35 | } |
36 | 36 | |
37 | 37 | if ( !$this->userIsAllowed( $userId ) ) { |
38 | 38 | $this->dieUsageMsg( array( 'badaccess-groups' ) ); |
39 | 39 | } |
40 | 40 | |
41 | | - $course = EPCourse::selectRow( array( 'id', 'name', 'instructors' ), array( 'id' => $params['courseid'] ) ); |
| 41 | + $masterCourse = EPMC::selectRow( array( 'id', 'name', 'instructors' ), array( 'id' => $params['mcid'] ) ); |
42 | 42 | |
43 | | - if ( $course === false ) { |
44 | | - $this->dieUsage( wfMsgExt( 'ep-addinstructor-invalid-course' ), 'invalid-course' ); |
| 43 | + if ( $masterCourse === false ) { |
| 44 | + $this->dieUsage( wfMsg( 'ep-addinstructor-invalid-course' ), 'invalid-course' ); |
45 | 45 | } |
46 | 46 | |
47 | 47 | $success = false; |
48 | 48 | |
49 | 49 | switch ( $params['subaction'] ) { |
50 | 50 | case 'add': |
51 | | - $success = $course->addInstructors( array( $userId ), $params['reason'] ); |
| 51 | + $success = $masterCourse->addInstructors( array( $userId ), $params['reason'] ); |
52 | 52 | break; |
53 | 53 | case 'remove': |
54 | | - $success = $course->removeInstructors( array( $userId ), $params['reason'] ); |
| 54 | + $success = $masterCourse->removeInstructors( array( $userId ), $params['reason'] ); |
55 | 55 | break; |
56 | 56 | } |
57 | 57 | |
— | — | @@ -116,7 +116,7 @@ |
117 | 117 | ApiBase::PARAM_TYPE => 'integer', |
118 | 118 | ApiBase::PARAM_REQUIRED => false, |
119 | 119 | ), |
120 | | - 'courseid' => array( |
| 120 | + 'mcid' => array( |
121 | 121 | ApiBase::PARAM_TYPE => 'integer', |
122 | 122 | ApiBase::PARAM_REQUIRED => true, |
123 | 123 | ), |
— | — | @@ -132,7 +132,7 @@ |
133 | 133 | public function getParamDescription() { |
134 | 134 | return array( |
135 | 135 | 'subaction' => 'Specifies what you want to do with the instructor', |
136 | | - 'courseid' => 'The ID of the course to which the instructor should be added', |
| 136 | + 'mcid' => 'The ID of the master course to/from which the instructor should be added/removed', |
137 | 137 | 'username' => 'Name of the user to associate as instructor', |
138 | 138 | 'userid' => 'Id of the user to associate as instructor', |
139 | 139 | 'reason' => 'Message with the reason for this change for nthe log', |
— | — | @@ -142,7 +142,7 @@ |
143 | 143 | |
144 | 144 | public function getDescription() { |
145 | 145 | return array( |
146 | | - 'API module for associating/disassociating a user as instructor with/from a course.' |
| 146 | + 'API module for associating/disassociating a user as instructor with/from a master course.' |
147 | 147 | ); |
148 | 148 | } |
149 | 149 | |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | return array_merge( parent::getPossibleErrors(), array( |
152 | 152 | array( 'code' => 'username-xor-userid', 'info' => 'You need to either provide the username or the userid parameter' ), |
153 | 153 | array( 'code' => 'invalid-user', 'info' => 'An invalid user name or id was provided' ), |
154 | | - array( 'code' => 'invalid-course', 'info' => 'There is no course with the provided ID' ), |
| 154 | + array( 'code' => 'invalid-course', 'info' => 'There is no master course with the provided ID' ), |
155 | 155 | ) ); |
156 | 156 | } |
157 | 157 | |
Index: trunk/extensions/EducationProgram/api/ApiDeleteEducation.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | protected static $typeMap = array( |
26 | 26 | 'org' => 'EPOrg', |
27 | 27 | 'course' => 'EPCourse', |
28 | | - 'term' => 'EPTerm', |
| 28 | + 'mc' => 'EPMC', |
29 | 29 | ); |
30 | 30 | |
31 | 31 | /** |