Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -58,28 +58,42 @@ |
59 | 59 | 'ep-prefs-showtoplink' => 'Show a link to [[Special:MyCourses|your courses]] at the top of every page.', |
60 | 60 | |
61 | 61 | // Rights |
62 | | - 'right-epadmin' => 'Manage the education program', |
63 | | - 'right-epstudent' => 'Enroll in the education program', |
64 | | - 'right-epmentor' => 'Mentor in the education program', |
| 62 | + 'right-ep-org' => 'Manage Education Program institutions', |
| 63 | + 'right-ep-course' => 'Manage Education Program courses', |
| 64 | + 'right-ep-term' => 'Manage Education Program terms', |
| 65 | + 'right-ep-token' => 'See Education Program enrollment tokens', |
| 66 | + 'right-ep-remstudent' => 'Remove students from terms', |
| 67 | + 'right-ep-enroll' => 'Enroll in Education Program terms', |
65 | 68 | |
66 | 69 | // Actions |
67 | | - 'action-epadmin' => 'manage the education program', |
68 | | - 'action-epstudent' => 'enroll in the education program', |
69 | | - 'action-epmentor' => 'mentor in the education program', |
| 70 | + 'right-ep-org' => 'manage institutions', |
| 71 | + 'right-ep-course' => 'manage courses', |
| 72 | + 'right-ep-term' => 'manage terms', |
| 73 | + 'right-ep-token' => 'see enrollment tokens', |
| 74 | + 'right-ep-remstudent' => 'remove students from terms', |
| 75 | + 'right-ep-enroll' => 'enroll in terms', |
70 | 76 | |
71 | 77 | // Groups |
72 | 78 | 'group-epadmin' => 'Education program admins', |
73 | | - 'group-epadmin-member' => '{{GENDER:$1|education program admin}}', |
| 79 | + 'group-epadmin-member' => '{{GENDER:$1|Education Program admin}}', |
74 | 80 | 'grouppage-epadmin' => '{{ns:project}}:Education_program_administrators', |
75 | 81 | |
76 | | - 'group-epstudent' => 'Education program students', |
77 | | - 'group-epstudent-member' => '{{GENDER:$1|education program student}}', |
78 | | - 'grouppage-epstudent' => '{{ns:project}}:Education_program_students', |
| 82 | + 'group-epstaff' => 'Education program staff', |
| 83 | + 'group-epstaff-member' => '{{GENDER:$1|Education Program staff}}', |
| 84 | + 'grouppage-epstaff' => '{{ns:project}}:Education_program_staff', |
79 | 85 | |
80 | | - 'group-epmentor' => 'Education program ambassadors', |
81 | | - 'group-epmentor-member' => '{{GENDER:$1|education program ambassador}}', |
82 | | - 'grouppage-epmentor' => '{{ns:project}}:Education_program_ambassadors', |
| 86 | + 'group-eponlineamb' => 'Education program online ambassador', |
| 87 | + 'group-eponlineamb-member' => '{{GENDER:$1|Education Program online ambassador}}', |
| 88 | + 'grouppage-eponlineamb' => '{{ns:project}}:Education_program_online_ambassadors', |
83 | 89 | |
| 90 | + 'group-epcampamb' => 'Education program campus ambassador', |
| 91 | + 'group-epcampamb-member' => '{{GENDER:$1|Education Program campus ambassador}}', |
| 92 | + 'grouppage-epcampamb' => '{{ns:project}}:Education_program_campus_ambassadors', |
| 93 | + |
| 94 | + 'group-epinstructor' => 'Education program instructor', |
| 95 | + 'group-epinstructor-member' => '{{GENDER:$1|Education Program instructor}}', |
| 96 | + 'grouppage-epinstructor' => '{{ns:project}}:Education_program_instructors', |
| 97 | + |
84 | 98 | // Special pages |
85 | 99 | 'specialpages-group-education' => 'Education', |
86 | 100 | 'special-mycourses' => 'My courses', |
Index: trunk/extensions/EducationProgram/EducationProgram.php |
— | — | @@ -152,39 +152,58 @@ |
153 | 153 | $wgLogActionsHandlers['course/*'] = 'LogFormatter'; |
154 | 154 | $wgLogActionsHandlers['term/*'] = 'LogFormatter'; |
155 | 155 | |
156 | | -// Rights |
157 | | -$wgAvailableRights[] = 'epadmin'; |
158 | | -$wgAvailableRights[] = 'epstudent'; |
159 | | -$wgAvailableRights[] = 'epmentor'; |
| 156 | +$wgAvailableRights[] = 'ep-org'; // Manage orgs |
| 157 | +$wgAvailableRights[] = 'ep-course'; // Manage courses |
| 158 | +$wgAvailableRights[] = 'ep-term'; // Manage terms |
| 159 | +$wgAvailableRights[] = 'ep-token'; // See enrollment tokens |
| 160 | +$wgAvailableRights[] = 'ep-enroll'; // Enroll as a student |
| 161 | +$wgAvailableRights[] = 'ep-remstudent'; // Dissasociate students from terms |
160 | 162 | |
161 | | -# Users that can manage the education program. |
162 | | -$wgGroupPermissions['*' ]['epadmin'] = false; |
163 | | -// $wgGroupPermissions['user' ]['epadmin'] = false; |
164 | | -// $wgGroupPermissions['autoconfirmed']['epadmin'] = false; |
165 | | -// $wgGroupPermissions['bot' ]['epadmin'] = false; |
166 | | -$wgGroupPermissions['sysop' ]['epadmin'] = true; |
167 | | -$wgGroupPermissions['epadmin' ]['epadmin'] = true; |
| 163 | +$wgGroupPermissions['*']['ep-org'] = false; |
| 164 | +$wgGroupPermissions['*']['ep-course'] = false; |
| 165 | +$wgGroupPermissions['*']['ep-term'] = false; |
| 166 | +$wgGroupPermissions['*']['ep-token'] = false; |
| 167 | +$wgGroupPermissions['*']['ep-remstudent'] = false; |
| 168 | +$wgGroupPermissions['*']['ep-enroll'] = true; |
168 | 169 | |
169 | | -# Users that can enroll as students in the education program. |
170 | | -$wgGroupPermissions['*' ]['epstudent'] = false; |
171 | | -$wgGroupPermissions['user' ]['epstudent'] = true; |
172 | | -// $wgGroupPermissions['autoconfirmed']['epstudent'] = true; |
173 | | -// $wgGroupPermissions['bot' ]['epstudent'] = false; |
174 | | -$wgGroupPermissions['sysop' ]['epstudent'] = true; |
175 | | -$wgGroupPermissions['epadmin']['epstudent'] = true; |
176 | | -$wgGroupPermissions['epstudent' ]['epstudent'] = true; |
177 | | -$wgGroupPermissions['epmentor' ]['epstudent'] = true; |
| 170 | +$wgGroupPermissions['epstaff']['ep-org'] = true; |
| 171 | +$wgGroupPermissions['epstaff']['ep-course'] = true; |
| 172 | +$wgGroupPermissions['epstaff']['ep-term'] = true; |
| 173 | +$wgGroupPermissions['epstaff']['ep-token'] = true; |
| 174 | +$wgGroupPermissions['epstaff']['ep-enroll'] = true; |
| 175 | +$wgGroupPermissions['epstaff']['ep-remstudent'] = true; |
178 | 176 | |
179 | | -# Users that act as mentors in the education program. |
180 | | -$wgGroupPermissions['*' ]['epmentor'] = false; |
181 | | -$wgGroupPermissions['user' ]['epmentor'] = true; |
182 | | -// $wgGroupPermissions['autoconfirmed']['epmentor'] = true; |
183 | | -// $wgGroupPermissions['bot' ]['epmentor'] = false; |
184 | | -$wgGroupPermissions['sysop' ]['epmentor'] = true; |
185 | | -$wgGroupPermissions['epadmin']['epmentor'] = true; |
186 | | -$wgGroupPermissions['epmentor' ]['epmentor'] = true; |
| 177 | +$wgGroupPermissions['epadmin']['ep-org'] = true; |
| 178 | +$wgGroupPermissions['epadmin']['ep-course'] = true; |
| 179 | +$wgGroupPermissions['epadmin']['ep-term'] = true; |
| 180 | +$wgGroupPermissions['epadmin']['ep-token'] = true; |
| 181 | +$wgGroupPermissions['epadmin']['ep-enroll'] = true; |
| 182 | +$wgGroupPermissions['epadmin']['ep-remstudent'] = true; |
187 | 183 | |
| 184 | +$wgGroupPermissions['eponlineamb']['ep-org'] = true; |
| 185 | +$wgGroupPermissions['eponlineamb']['ep-course'] = true; |
| 186 | +$wgGroupPermissions['eponlineamb']['ep-term'] = true; |
| 187 | +$wgGroupPermissions['eponlineamb']['ep-token'] = true; |
188 | 188 | |
| 189 | +$wgGroupPermissions['epcampamb']['ep-org'] = true; |
| 190 | +$wgGroupPermissions['epcampamb']['ep-course'] = true; |
| 191 | +$wgGroupPermissions['epcampamb']['ep-term'] = true; |
| 192 | +$wgGroupPermissions['epcampamb']['ep-token'] = true; |
| 193 | + |
| 194 | +$wgGroupPermissions['epinstructor']['ep-org'] = true; |
| 195 | +$wgGroupPermissions['epinstructor']['ep-course'] = true; |
| 196 | +$wgGroupPermissions['epinstructor']['ep-term'] = true; |
| 197 | +$wgGroupPermissions['epinstructor']['ep-token'] = true; |
| 198 | +$wgGroupPermissions['epinstructor']['ep-remstudent'] = true; |
| 199 | + |
| 200 | +$wgGroupPermissions['epstaff']['userrights'] = false; |
| 201 | +$wgAddGroups['epstaff'] = array( 'epstaff', 'epadmin', 'eponlineamb', 'epcampamb', 'epinstructor' ); |
| 202 | +$wgRemoveGroups['epstaff'] = array( 'epstaff', 'epadmin', 'eponlineamb', 'epcampamb', 'epinstructor' ); |
| 203 | + |
| 204 | +$wgGroupPermissions['epadmin']['userrights'] = false; |
| 205 | +$wgAddGroups['epadmin'] = array( 'eponlineamb', 'epcampamb', 'epinstructor' ); |
| 206 | +$wgRemoveGroups['epadmin'] = array( 'eponlineamb', 'epcampamb', 'epinstructor' ); |
| 207 | + |
189 | 208 | // Resource loader modules |
190 | 209 | $moduleTemplate = array( |
191 | 210 | 'localBasePath' => dirname( __FILE__ ) . '/resources', |