Index: trunk/extensions/EducationProgram/sql/EducationProgram.sql |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | |
31 | 31 | |
32 | 32 | |
| 33 | +-- Courses. |
33 | 34 | CREATE TABLE IF NOT EXISTS /*_*/ep_courses ( |
34 | 35 | course_id INT unsigned NOT NULL auto_increment PRIMARY KEY, |
35 | 36 | |
Index: trunk/extensions/EducationProgram/specials/SpecialMyCourses.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | if ( $course !== false ) { |
76 | 76 | $this->showSuccess( wfMessage( |
77 | 77 | 'ep-mycourses-enrolled', |
78 | | - $course->getMasterCourse()->getField( 'name' ), |
| 78 | + $course->getField( 'name' ), |
79 | 79 | $course->getOrg()->getField( 'name' ) |
80 | 80 | ) ); |
81 | 81 | } |
— | — | @@ -126,8 +126,8 @@ |
127 | 127 | $fields = array(); |
128 | 128 | |
129 | 129 | $fields[] = Linker::link( |
130 | | - $this->getTitle( $course->getMasterCourse()->getField( 'name' ) ), |
131 | | - '<b>' . htmlspecialchars( $course->getMasterCourse()->getField( 'name' ) ) . '</b>' |
| 130 | + $this->getTitle( $course->getField( 'name' ) ), |
| 131 | + '<b>' . htmlspecialchars( $course->getField( 'name' ) ) . '</b>' |
132 | 132 | ); |
133 | 133 | |
134 | 134 | $fields[] = Linker::link( |
— | — | @@ -158,9 +158,8 @@ |
159 | 159 | $out = $this->getOutput(); |
160 | 160 | |
161 | 161 | $course = EPCourse::selectRow( null, array( 'name' => $courseName ) ); |
162 | | - $terms = $student->getCourses( null, array( 'course_id' => $course->getId() ) ); |
163 | 162 | |
164 | | - if ( $course !== false && count( $terms ) > 0 ) { |
| 163 | + if ( $course !== false ) { |
165 | 164 | $out->addWikiMsg( 'ep-mycourses-show-all' ); |
166 | 165 | |
167 | 166 | $out->setPageTitle( wfMsgExt( |
— | — | @@ -170,7 +169,7 @@ |
171 | 170 | $course->getOrg( 'name' )->getField( 'name' ) |
172 | 171 | ) ); |
173 | 172 | |
174 | | - $this->displayCourseSummary( $course, $terms ); |
| 173 | + $this->displayCourseSummary( $course ); |
175 | 174 | } |
176 | 175 | else { |
177 | 176 | $this->showError( wfMessage( 'ep-mycourses-no-such-course', $courseName ) ); |
— | — | @@ -183,20 +182,19 @@ |
184 | 183 | * |
185 | 184 | * @since 0.1 |
186 | 185 | * |
187 | | - * @param EPCourse $masterCourse |
188 | | - * @param array $courses |
| 186 | + * @param EPCourse $course |
189 | 187 | */ |
190 | | - protected function displayCourseSummary( EPCourse $masterCourse, array /* of EPCourse */ $courses ) { |
| 188 | + protected function displayCourseSummary( EPCourse $course ) { |
191 | 189 | $info = array(); |
192 | 190 | |
193 | | - $info['name'] = $masterCourse->getField( 'name' ); |
194 | | - $info['org'] = EPOrg::selectFieldsRow( 'name', array( 'id' => $masterCourse->getField( 'org_id' ) ) ); |
| 191 | + $info['name'] = $course->getField( 'name' ); |
| 192 | + $info['org'] = EPOrg::selectFieldsRow( 'name', array( 'id' => $course->getField( 'org_id' ) ) ); |
195 | 193 | |
196 | 194 | foreach ( $info as &$inf ) { |
197 | 195 | $inf = htmlspecialchars( $inf ); |
198 | 196 | } |
199 | 197 | |
200 | | - $this->displaySummary( $masterCourse, false, $info ); |
| 198 | + $this->displaySummary( $course, false, $info ); |
201 | 199 | } |
202 | 200 | |
203 | 201 | /** |
Index: trunk/extensions/EducationProgram/specials/SpecialEnroll.php |
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | $this->getOutput()->setPageTitle( wfMsgExt( |
170 | 170 | 'ep-enroll-title', |
171 | 171 | 'parsemag', |
172 | | - $course->getMasterCourse( 'name' )->getField( 'name' ), |
| 172 | + $course->getField( 'name' ), |
173 | 173 | $course->getOrg( 'name' )->getField( 'name' ) |
174 | 174 | ) ); |
175 | 175 | } |
Index: trunk/extensions/EducationProgram/specials/SpecialEditCourse.php |
— | — | @@ -34,13 +34,13 @@ |
35 | 35 | |
36 | 36 | $orgOptions = EPOrg::getOrgOptions(); |
37 | 37 | |
38 | | - $fields['mc_id'] = array ( |
| 38 | + $fields['org_id'] = array ( |
39 | 39 | 'type' => 'select', |
40 | | - 'label-message' => 'ep-course-edit-mastercourse', |
| 40 | + 'label-message' => 'ep-course-edit-org', |
41 | 41 | 'required' => true, |
42 | 42 | 'options' => $orgOptions, |
43 | 43 | 'validation-callback' => function ( $value, array $alldata = null ) use ( $orgOptions ) { |
44 | | - return in_array( (int)$value, array_values( $orgOptions ) ) ? true : wfMsg( 'ep-course-invalid-course' ); |
| 44 | + return in_array( (int)$value, array_values( $orgOptions ) ) ? true : wfMsg( 'ep-course-invalid-org' ); |
45 | 45 | }, |
46 | 46 | ); |
47 | 47 | |
Index: trunk/extensions/EducationProgram/includes/EPCoursePager.php |
— | — | @@ -111,9 +111,9 @@ |
112 | 112 | public function getFieldNames() { |
113 | 113 | $fields = parent::getFieldNames(); |
114 | 114 | |
115 | | - if ( array_key_exists( 'mc_id', $this->conds ) && array_key_exists( 'org_id', $fields ) ) { |
116 | | - unset( $fields['org_id'] ); |
117 | | - } |
| 115 | +// if ( array_key_exists( 'mc_id', $this->conds ) && array_key_exists( 'org_id', $fields ) ) { |
| 116 | +// unset( $fields['org_id'] ); |
| 117 | +// } |
118 | 118 | |
119 | 119 | $fields = wfArrayInsertAfter( $fields, array( '_status' => 'status' ), 'students' ); |
120 | 120 | |
Index: trunk/extensions/EducationProgram/includes/EPCourse.php |
— | — | @@ -214,10 +214,6 @@ |
215 | 215 | * @see EPDBObject::insertIntoDB() |
216 | 216 | */ |
217 | 217 | protected function insertIntoDB() { |
218 | | - if ( !$this->hasField( 'org_id' ) ) { |
219 | | - $this->setField( 'org_id', $this->getMasterCourse( 'org_id' )->getField( 'org_id' ) ); |
220 | | - } |
221 | | - |
222 | 218 | $success = parent::insertIntoDB(); |
223 | 219 | |
224 | 220 | if ( $success && $this->updateSummaries ) { |
— | — | @@ -235,9 +231,8 @@ |
236 | 232 | $id = $this->getId(); |
237 | 233 | |
238 | 234 | if ( $this->updateSummaries ) { |
239 | | - $this->loadFields( array( 'org_id', 'mc_id' ) ); |
| 235 | + $this->loadFields( array( 'org_id' ) ); |
240 | 236 | $orgId = $this->getField( 'org_id' ); |
241 | | - $courseId = $this->getField( 'mc_id' ); |
242 | 237 | } |
243 | 238 | |
244 | 239 | $success = parent::removeFromDB(); |
— | — | @@ -349,7 +344,7 @@ |
350 | 345 | |
351 | 346 | $out->addHTML( Html::element( 'p', array(), wfMsg( 'ep-courses-namedoc' ) ) ); |
352 | 347 | |
353 | | - $out->addHTML( Html::element( 'label', array( 'for' => 'newmc' ), wfMsg( 'ep-courses-neworg' ) ) ); |
| 348 | + $out->addHTML( Html::element( 'label', array( 'for' => 'neworg' ), wfMsg( 'ep-courses-neworg' ) ) ); |
354 | 349 | |
355 | 350 | $select = new XmlSelect( |
356 | 351 | 'neworg', |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -74,10 +74,6 @@ |
75 | 75 | 'logentry-course-remove' => '$1 removed course $3', |
76 | 76 | 'logentry-course-update' => '$1 updated course $3', |
77 | 77 | |
78 | | - 'logentry-mc-add' => '$1 created master course $3', |
79 | | - 'logentry-mc-remove' => '$1 removed master course $3', |
80 | | - 'logentry-mc-update' => '$1 updated master course $3', |
81 | | - |
82 | 78 | 'logentry-instructor-add' => '$1 {{GENDER:$2|added}} {{PLURAL:$4|instructor|instructors}} $5 to course $3', |
83 | 79 | 'logentry-instructor-remove' => '$1 {{GENDER:$2|removed}} {{PLURAL:$4|instructor|instructors}} $5 from course $3', |
84 | 80 | 'logentry-instructor-selfadd' => '$1 {{GENDER:$2|added himself|added herself}} as instructor to course $3', |
— | — | @@ -104,7 +100,7 @@ |
105 | 101 | 'right-ep-enroll' => 'Enroll in Education Program courses', |
106 | 102 | 'right-ep-online' => 'Add or remove online ambassadors to courses', |
107 | 103 | 'right-ep-campus' => 'Add or remove campus ambassadors to courses', |
108 | | - 'right-ep-instructor' => 'Add or remove instructors to master courses', |
| 104 | + 'right-ep-instructor' => 'Add or remove instructors to courses', |
109 | 105 | |
110 | 106 | // Actions |
111 | 107 | 'action-ep-org' => 'manage institutions', |
— | — | @@ -114,7 +110,7 @@ |
115 | 111 | 'action-ep-enroll' => 'enroll in courses', |
116 | 112 | 'action-ep-online' => 'add or remove online ambassadors to courses', |
117 | 113 | 'action-ep-campus' => 'add or remove campus ambassadors to courses', |
118 | | - 'action-ep-instructor' => 'add or remove instructors to master courses', |
| 114 | + 'action-ep-instructor' => 'add or remove instructors to courses', |
119 | 115 | |
120 | 116 | // Groups |
121 | 117 | 'group-epadmin' => 'Education program admins', |
— | — | @@ -210,16 +206,15 @@ |
211 | 207 | |
212 | 208 | // Course pager |
213 | 209 | 'epcoursepager-header-id' => 'Id', |
214 | | - 'epcoursepager-header-mc-id' => 'Master course', |
215 | 210 | 'epcoursepager-header-term' => 'Term', |
216 | 211 | 'epcoursepager-header-start' => 'Start', |
| 212 | + 'epcoursepager-header-org-id' => 'Institution', |
217 | 213 | 'epcoursepager-header-end' => 'End', |
218 | | - 'epcoursepager-filter-mc-id' => 'Master course', |
| 214 | + 'epcoursepager-header-status' => 'Status', |
| 215 | + 'epcoursepager-header-students' => 'Students', |
219 | 216 | 'epcoursepager-filter-term' => 'Term', |
220 | 217 | 'epcoursepager-filter-org-id' => 'Institution', |
221 | | - 'epcoursepager-header-status' => 'Status', |
222 | 218 | 'epcoursepager-filter-status' => 'Status', |
223 | | - 'epcoursepager-header-students' => 'Students', |
224 | 219 | |
225 | 220 | // Student pager |
226 | 221 | 'epstudentpager-header-user-id' => 'User', |
— | — | @@ -251,13 +246,13 @@ |
252 | 247 | 'editcourse-add-legend' => 'Add course', |
253 | 248 | 'editcourse-edit-legend' => 'Edit course', |
254 | 249 | 'ep-course-edit-term' => 'Term', |
255 | | - 'ep-course-edit-mastercourse' => 'Master course', |
| 250 | + 'ep-course-edit-org' => 'Institution', |
256 | 251 | 'ep-course-edit-start' => 'Start date', |
257 | 252 | 'ep-course-edit-end' => 'End date', |
258 | 253 | 'ep-course-edit-token' => 'Enrollment token', |
259 | 254 | 'ep-course-edit-description' => 'Description', |
260 | 255 | |
261 | | - 'ep-course-invalid-mastercourse' => 'This master course does not exist.', |
| 256 | + 'ep-course-invalid-org' => 'This institution does not exist.', |
262 | 257 | 'ep-course-invalid-token' => 'The token needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
263 | 258 | 'ep-course-invalid-description' => 'The description needs to be at least contain $1 {{PLURAL:$1|character|characters}}.', |
264 | 259 | |
— | — | @@ -278,7 +273,7 @@ |
279 | 274 | 'specialinstitution-summary-courses' => 'Course count', |
280 | 275 | 'specialinstitution-summary-students' => 'Student count', |
281 | 276 | 'ep-institution-nav-edit' => 'Edit this institution', |
282 | | - 'ep-institution-add-mc' => 'Add a master course', |
| 277 | + 'ep-institution-add-course' => 'Add a course', |
283 | 278 | 'ep-institution-inactive' => 'Inactive', |
284 | 279 | 'ep-institution-active' => 'Active', |
285 | 280 | |
— | — | @@ -288,7 +283,6 @@ |
289 | 284 | 'ep-course-none' => 'There is no course with id "$1". See [[Special:Courses|here]] for a list of courses.', |
290 | 285 | 'ep-course-create' => 'There is no course with id "$1", but you can create a new one.', |
291 | 286 | 'specialcourse-summary-org' => 'Institution', |
292 | | - 'specialcourse-summary-mastercourse' => 'Master course', |
293 | 287 | 'specialcourse-summary-term' => 'Term', |
294 | 288 | 'specialcourse-summary-start' => 'Start', |
295 | 289 | 'specialcourse-summary-end' => 'End', |
— | — | @@ -350,27 +344,27 @@ |
351 | 345 | 'ep-mycourses-not-a-student' => 'You are not enrolled in any [[Special:Courses|courses]].', |
352 | 346 | |
353 | 347 | // ep.instructor |
354 | | - 'ep-instructor-remove-title' => 'Remove instructor from master course', |
| 348 | + 'ep-instructor-remove-title' => 'Remove instructor from course', |
355 | 349 | 'ep-instructor-remove-button' => 'Remove instructor', |
356 | 350 | 'ep-instructor-removing' => 'Removing...', |
357 | | - 'ep-instructor-removal-success' => 'This instructor has been successfully removed from this master course.', |
| 351 | + 'ep-instructor-removal-success' => 'This instructor has been successfully removed from this course.', |
358 | 352 | 'ep-instructor-close-button' => 'Close', |
359 | 353 | 'ep-instructor-remove-retry' => 'Retry', |
360 | | - 'ep-instructor-remove-failed' => 'Something went wrong - could not remove the instructor from the master course.', |
| 354 | + 'ep-instructor-remove-failed' => 'Something went wrong - could not remove the instructor from the course.', |
361 | 355 | 'ep-instructor-cancel-button' => 'Cancel', |
362 | | - 'ep-instructor-remove-text' => 'You are about to remove $2 (Username: $1) as {{GENDER:$1|instructor}} from master course $3. Please enter a brief summary with the reason for this removal.', |
| 356 | + 'ep-instructor-remove-text' => 'You are about to remove $2 (Username: $1) as {{GENDER:$1|instructor}} from course $3. Please enter a brief summary with the reason for this removal.', |
363 | 357 | 'ep-instructor-adding' => 'Adding...', |
364 | | - 'ep-instructor-addittion-success' => '$1 has been successfully added as {{GENDER:$1|instructor}} for master course $2!', |
365 | | - 'ep-instructor-addittion-self-success' => 'You have been successfully added as {{GENDER:$1|instructor}} for master course $2!', |
| 358 | + 'ep-instructor-addittion-success' => '$1 has been successfully added as {{GENDER:$1|instructor}} for course $2!', |
| 359 | + 'ep-instructor-addittion-self-success' => 'You have been successfully added as {{GENDER:$1|instructor}} for course $2!', |
366 | 360 | 'ep-instructor-add-close-button' => 'Close', |
367 | 361 | 'ep-instructor-add-retry' => 'Retry', |
368 | | - 'ep-instructor-addittion-failed' => 'Something went wrong - could not add the instructor to the master course.', |
369 | | - 'ep-instructor-add-title' => 'Add an instructor to the master course', |
370 | | - 'ep-instructor-add-self-title' => 'Become an {{GENDER:$1|instructor}} for this master course', |
| 362 | + 'ep-instructor-addittion-failed' => 'Something went wrong - could not add the instructor to the course.', |
| 363 | + 'ep-instructor-add-title' => 'Add an instructor to the course', |
| 364 | + 'ep-instructor-add-self-title' => 'Become an {{GENDER:$1|instructor}} for this course', |
371 | 365 | 'ep-instructor-add-button' => 'Add instructor', |
372 | 366 | 'ep-instructor-add-self-button' => 'Become {{GENDER:$1|instructor}}', |
373 | | - 'ep-instructor-add-text' => 'You are adding an instructor for master course $1. Enter the username of the instructor and a brief description why this person is being added.', |
374 | | - 'ep-instructor-add-self-text' => 'You are adding yourself as {{GENDER:$1|instructor}} for master course $1. Please add a brief description why you are doing so.', |
| 367 | + 'ep-instructor-add-text' => 'You are adding an instructor for course $1. Enter the username of the instructor and a brief description why this person is being added.', |
| 368 | + 'ep-instructor-add-self-text' => 'You are adding yourself as {{GENDER:$1|instructor}} for course $1. Please add a brief description why you are doing so.', |
375 | 369 | 'ep-instructor-add-cancel-button' => 'Cancel', |
376 | 370 | 'ep-instructor-summary-input' => 'Summary', |
377 | 371 | 'ep-instructor-name-input' => 'User name', |
Index: trunk/extensions/EducationProgram/EducationProgram.php |
— | — | @@ -9,7 +9,6 @@ |
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 |
13 | | - * * MC for master course |
14 | 13 | * * CA for campus ambassador |
15 | 14 | * * OA for online ambassador |
16 | 15 | * |
— | — | @@ -270,7 +269,6 @@ |
271 | 270 | |
272 | 271 | $wgGroupPermissions['epinstructor']['ep-org'] = true; |
273 | 272 | $wgGroupPermissions['epinstructor']['ep-course'] = true; |
274 | | -$wgGroupPermissions['epinstructor']['ep-mc'] = true; |
275 | 273 | $wgGroupPermissions['epinstructor']['ep-token'] = true; |
276 | 274 | $wgGroupPermissions['epinstructor']['ep-remstudent'] = true; |
277 | 275 | $wgGroupPermissions['epinstructor']['ep-online'] = true; |
— | — | @@ -383,7 +381,7 @@ |
384 | 382 | 'ep-instructor-add-cancel-button', |
385 | 383 | 'ep-instructor-summary-input', |
386 | 384 | 'ep-instructor-name-input', |
387 | | - 'ep-mc-no-instructors', |
| 385 | + 'ep-course-no-instructors', |
388 | 386 | ), |
389 | 387 | ); |
390 | 388 | |
Index: trunk/extensions/EducationProgram/api/ApiInstructor.php |
— | — | @@ -37,9 +37,9 @@ |
38 | 38 | $this->dieUsageMsg( array( 'badaccess-groups' ) ); |
39 | 39 | } |
40 | 40 | |
41 | | - $masterCourse = EPCourse::selectRow( array( 'id', 'name', 'instructors' ), array( 'id' => $params['mcid'] ) ); |
| 41 | + $course = EPCourse::selectRow( array( 'id', 'name', 'instructors' ), array( 'id' => $params['orgid'] ) ); |
42 | 42 | |
43 | | - if ( $masterCourse === false ) { |
| 43 | + if ( $course === false ) { |
44 | 44 | $this->dieUsage( wfMsg( 'ep-addinstructor-invalid-course' ), 'invalid-course' ); |
45 | 45 | } |
46 | 46 | |
— | — | @@ -47,10 +47,10 @@ |
48 | 48 | |
49 | 49 | switch ( $params['subaction'] ) { |
50 | 50 | case 'add': |
51 | | - $success = $masterCourse->addInstructors( array( $userId ), $params['reason'] ); |
| 51 | + $success = $course->addInstructors( array( $userId ), $params['reason'] ); |
52 | 52 | break; |
53 | 53 | case 'remove': |
54 | | - $success = $masterCourse->removeInstructors( array( $userId ), $params['reason'] ); |
| 54 | + $success = $course->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 | | - 'mcid' => array( |
| 120 | + 'courseid' => 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 | | - 'mcid' => 'The ID of the master course to/from which the instructor should be added/removed', |
| 136 | + 'courseid' => 'The ID of the 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 master course.' |
| 146 | + 'API module for associating/disassociating a user as instructor with/from a 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 master course with the provided ID' ), |
| 154 | + array( 'code' => 'invalid-course', 'info' => 'There is no course with the provided ID' ), |
155 | 155 | ) ); |
156 | 156 | } |
157 | 157 | |
Index: trunk/extensions/EducationProgram/resources/ep.instructor.js |
— | — | @@ -14,8 +14,8 @@ |
15 | 15 | |
16 | 16 | $( '.ep-instructor-remove' ).click( function( event ) { |
17 | 17 | var $this = $( this ), |
18 | | - mcId = $this.attr( 'data-mcid' ), |
19 | | - mcName = $this.attr( 'data-mcname' ), |
| 18 | + courseId = $this.attr( 'data-courseid' ), |
| 19 | + courseName = $this.attr( 'data-mcname' ), |
20 | 20 | userId = $this.attr( 'data-userid' ), |
21 | 21 | userName = $this.attr( 'data-username' ), |
22 | 22 | bestName = $this.attr( 'data-bestname' ), |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | $remove.button( 'option', 'label', ep.msg( 'ep-instructor-removing' ) ); |
31 | 31 | |
32 | 32 | ep.api.removeInstructor( { |
33 | | - 'mcid': mcId, |
| 33 | + 'courseid': courseId, |
34 | 34 | 'userid': userId, |
35 | 35 | 'reason': summaryInput.val() |
36 | 36 | } ).done( function() { |
— | — | @@ -81,7 +81,7 @@ |
82 | 82 | 'ep-instructor-remove-text', |
83 | 83 | mw.html.escape( userName ), |
84 | 84 | '<b>' + mw.html.escape( bestName ) + '</b>', |
85 | | - '<b>' + mw.html.escape( mcName ) + '</b>' |
| 85 | + '<b>' + mw.html.escape( courseName ) + '</b>' |
86 | 86 | ) ); |
87 | 87 | |
88 | 88 | //$dialog.append( $( '<p>' ).msg( 'ep-instructor-remove-title' ) ); |
— | — | @@ -101,8 +101,8 @@ |
102 | 102 | $( '.ep-add-instructor' ).click( function( event ) { |
103 | 103 | var $this = $( this ), _this = this; |
104 | 104 | |
105 | | - this.mcId = $this.attr( 'data-mcid' ); |
106 | | - this.mcName = $this.attr( 'data-mcname' ); |
| 105 | + this.courseId = $this.attr( 'data-courseid' ); |
| 106 | + this.courseName = $this.attr( 'data-mcname' ); |
107 | 107 | this.selfMode = $this.attr( 'data-mode' ) === 'self'; |
108 | 108 | this.$dialog = null; |
109 | 109 | |
— | — | @@ -134,14 +134,14 @@ |
135 | 135 | $add.button( 'option', 'label', ep.msg( 'ep-instructor-adding' ) ); |
136 | 136 | |
137 | 137 | ep.api.addInstructor( { |
138 | | - 'mcid': _this.mcId, |
| 138 | + 'courseid': _this.courseId, |
139 | 139 | 'username': _this.getName(), |
140 | 140 | 'reason': _this.summaryInput.val() |
141 | 141 | } ).done( function() { |
142 | 142 | _this.$dialog.text( ep.msg( |
143 | 143 | _this.selfMode ? 'ep-instructor-addittion-self-success' : 'ep-instructor-addittion-success', |
144 | 144 | _this.getName(), |
145 | | - _this.mcName |
| 145 | + _this.courseName |
146 | 146 | ) ); |
147 | 147 | |
148 | 148 | $add.remove(); |
— | — | @@ -149,11 +149,11 @@ |
150 | 150 | $cancel.focus(); |
151 | 151 | |
152 | 152 | // TODO: link name to user page and show control links |
153 | | - $ul = $( '#ep-mc-instructors' ).find( 'ul' ); |
| 153 | + $ul = $( '#ep-course-instructors' ).find( 'ul' ); |
154 | 154 | |
155 | 155 | if ( $ul.length < 1 ) { |
156 | 156 | $ul = $( '<ul>' ); |
157 | | - $( '#ep-mc-instructors' ).html( $ul ); |
| 157 | + $( '#ep-course-instructors' ).html( $ul ); |
158 | 158 | } |
159 | 159 | |
160 | 160 | $ul.append( $( '<li>' ).text( _this.getName() ) ) |
— | — | @@ -187,7 +187,7 @@ |
188 | 188 | |
189 | 189 | this.$dialog.append( $( '<p>' ).text( gM( |
190 | 190 | this.selfMode ? 'ep-instructor-add-self-text' : 'ep-instructor-add-text', |
191 | | - this.mcName, |
| 191 | + this.courseName, |
192 | 192 | this.getName() |
193 | 193 | ) ) ); |
194 | 194 | |