[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_feedback 2 Feature: Feedbacks in courses with groups 3 In order to collect feedbacks per group 4 As an teacher 5 I need to be able to filter feedback replies by groups 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | 10 | user1 | Username | 1 | 11 | user2 | Username | 2 | 12 | user3 | Username | 3 | 13 | user4 | Username | 4 | 14 | user5 | Username | 5 | 15 | user6 | Username | 6 | 16 | user7 | Username | 7 | 17 | teacher | Teacher | T | 18 | manager | Manager | M | 19 And the following "courses" exist: 20 | fullname | shortname | groupmode | 21 | Course 1 | C1 | 1 | 22 And the following "course enrolments" exist: 23 | user | course | role | 24 | user1 | C1 | student | 25 | user2 | C1 | student | 26 | user3 | C1 | student | 27 | user4 | C1 | student | 28 | user5 | C1 | student | 29 | user6 | C1 | student | 30 | user7 | C1 | student | 31 | teacher | C1 | editingteacher | 32 And the following "groups" exist: 33 | name | course | idnumber | 34 | Group 1 | C1 | G1 | 35 | Group 2 | C1 | G2 | 36 And the following "group members" exist: 37 | user | group | 38 | user1 | G1 | 39 | user2 | G1 | 40 | user2 | G2 | 41 | user3 | G2 | 42 | user4 | G1 | 43 | user5 | G1 | 44 | user6 | G2 | 45 And the following "system role assigns" exist: 46 | user | course | role | 47 | manager | Acceptance test site | manager | 48 And the following "activities" exist: 49 | activity | name | course | idnumber | anonymous | publish_stats | groupmode | 50 | feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 | 1 | 51 | feedback | Course feedback | C1 | feedback1 | 2 | 1 | 1 | 52 | feedback | Course anon feedback | C1 | feedback2 | 1 | 1 | 1 | 53 When I log in as "manager" 54 And I am on site homepage 55 And I follow "Site feedback" 56 And I follow "Edit questions" 57 And I add a "Multiple choice" question to the feedback with: 58 | Question | Do you like our site? | 59 | Label | multichoice2 | 60 | Multiple choice type | Multiple choice - single answer | 61 | Hide the "Not selected" option | Yes | 62 | Multiple choice values | Yes of course\nNot at all\nI don't know | 63 And I log out 64 65 @javascript 66 Scenario: Non anonymous feedback with groups in a course 67 When I log in as "teacher" 68 And I follow "Course 1" 69 And I follow "Course feedback" 70 And I follow "Edit questions" 71 And I add a "Multiple choice" question to the feedback with: 72 | Question | Do you like this course? | 73 | Label | multichoice1 | 74 | Multiple choice type | Multiple choice - single answer | 75 | Hide the "Not selected" option | Yes | 76 | Multiple choice values | Yes of course\nNot at all\nI don't know | 77 And I log out 78 And I log in as "user1" and complete feedback "Course feedback" in course "Course 1" with: 79 | Not at all | 1 | 80 And I log in as "user2" and complete feedback "Course feedback" in course "Course 1" with: 81 | I don't know | 1 | 82 And I log in as "user3" and complete feedback "Course feedback" in course "Course 1" with: 83 | Not at all | 1 | 84 And I log in as "user4" and complete feedback "Course feedback" in course "Course 1" with: 85 | Yes of course | 1 | 86 And I log in as "user5" and complete feedback "Course feedback" in course "Course 1" with: 87 | Yes of course | 1 | 88 And I log in as "user6" and complete feedback "Course feedback" in course "Course 1" with: 89 | Not at all | 1 | 90 And I log in as "user7" and complete feedback "Course feedback" in course "Course 1" with: 91 | I don't know | 1 | 92 # View analysis, user1 should only see one group - group 1 93 And I log in as "user1" 94 And I follow "Course 1" 95 And I follow "Course feedback" 96 And I follow "Submitted answers" 97 And I should see "Separate groups: Group 1" 98 And I show chart data for the "multichoice1" feedback 99 And I should see "2 (50.00 %)" in the "Yes of course" "table_row" 100 And I should see "1 (25.00 %)" in the "Not at all" "table_row" 101 And I log out 102 # View analysis, user3 should only see one group - group 2 103 And I log in as "user3" 104 And I follow "Course 1" 105 And I follow "Course feedback" 106 And I follow "Submitted answers" 107 And I should see "Separate groups: Group 2" 108 And I show chart data for the "multichoice1" feedback 109 And I should see "0" in the "Yes of course" "table_row" 110 And I should see "2 (66.67 %)" in the "Not at all" "table_row" 111 And I log out 112 # View analysis, user2 should see a group selector and be able to change the group but not view all. 113 And I log in as "user2" 114 And I follow "Course 1" 115 And I follow "Course feedback" 116 And I follow "Submitted answers" 117 And the field "Separate groups" matches value "Group 1" 118 And I show chart data for the "multichoice1" feedback 119 And I should see "2 (50.00 %)" in the "Yes of course" "table_row" 120 And I should see "1 (25.00 %)" in the "Not at all" "table_row" 121 And I select "Group 2" from the "Separate groups" singleselect 122 And I show chart data for the "multichoice1" feedback 123 And I should see "0" in the "Yes of course" "table_row" 124 And I should see "2 (66.67 %)" in the "Not at all" "table_row" 125 And the "Separate groups" select box should not contain "All participants" 126 And I log out 127 # User without group can see all participants only 128 And I log in as "user7" 129 And I follow "Course 1" 130 And I follow "Course feedback" 131 And I follow "Submitted answers" 132 And I should see "Separate groups: All participants" 133 And I show chart data for the "multichoice1" feedback 134 And I should see "2 (28.57 %)" in the "Yes of course" "table_row" 135 And I should see "3 (42.86 %)" in the "Not at all" "table_row" 136 And I should see "2 (28.57 %)" in the "I don't know" "table_row" 137 And I log out 138 # Teacher can browse everybody 139 And I log in as "teacher" 140 And I follow "Course 1" 141 And I follow "Course feedback" 142 And I follow "Analysis" 143 And the field "Separate groups" matches value "All participants" 144 And I show chart data for the "multichoice1" feedback 145 And I should see "2 (28.57 %)" in the "Yes of course" "table_row" 146 And I should see "3 (42.86 %)" in the "Not at all" "table_row" 147 And I should see "2 (28.57 %)" in the "I don't know" "table_row" 148 And I select "Group 1" from the "Separate groups" singleselect 149 And I show chart data for the "multichoice1" feedback 150 And I should see "2 (50.00 %)" in the "Yes of course" "table_row" 151 And I should see "1 (25.00 %)" in the "Not at all" "table_row" 152 And I select "Group 2" from the "Separate groups" singleselect 153 And I show chart data for the "multichoice1" feedback 154 And I should see "0" in the "Yes of course" "table_row" 155 And I should see "2 (66.67 %)" in the "Not at all" "table_row" 156 And I follow "Show responses" 157 And the field "Separate groups" matches value "Group 2" 158 And I should not see "Username 1" 159 And I should see "Username 3" 160 And I select "Group 1" from the "Separate groups" singleselect 161 And I should see "Username 1" 162 And I should not see "Username 3" 163 And I select "All participants" from the "Separate groups" singleselect 164 And I should see "Username 1" 165 And I should see "Username 3" 166 And I log out 167 168 @javascript 169 Scenario: Anonymous feedback with groups in a course 170 When I log in as "teacher" 171 And I follow "Course 1" 172 And I follow "Course anon feedback" 173 And I follow "Edit questions" 174 And I add a "Multiple choice" question to the feedback with: 175 | Question | Do you like this course? | 176 | Label | multichoice1 | 177 | Multiple choice type | Multiple choice - single answer | 178 | Hide the "Not selected" option | Yes | 179 | Multiple choice values | Yes of course\nNot at all\nI don't know | 180 And I log out 181 And I log in as "user1" and complete feedback "Course anon feedback" in course "Course 1" with: 182 | Not at all | 1 | 183 And I log in as "user1" 184 And I follow "Course 1" 185 And I follow "Course anon feedback" 186 And I follow "Submitted answers" 187 And I should see "There are insufficient responses for this group" 188 And I should not see "Yes of course" 189 And I log out 190 And I log in as "user2" and complete feedback "Course anon feedback" in course "Course 1" with: 191 | I don't know | 1 | 192 And I log in as "user3" and complete feedback "Course anon feedback" in course "Course 1" with: 193 | Not at all | 1 | 194 And I log in as "user4" and complete feedback "Course anon feedback" in course "Course 1" with: 195 | Yes of course | 1 | 196 And I log in as "user5" and complete feedback "Course anon feedback" in course "Course 1" with: 197 | Yes of course | 1 | 198 And I log in as "user6" and complete feedback "Course anon feedback" in course "Course 1" with: 199 | Not at all | 1 | 200 And I log in as "user7" and complete feedback "Course anon feedback" in course "Course 1" with: 201 | I don't know | 1 | 202 # View analysis, user1 should only see one group - group 1 203 And I log in as "user1" 204 And I follow "Course 1" 205 And I follow "Course anon feedback" 206 And I follow "Submitted answers" 207 And I should see "Separate groups: Group 1" 208 And I show chart data for the "multichoice1" feedback 209 And I should see "2 (50.00 %)" in the "Yes of course" "table_row" 210 And I should see "1 (25.00 %)" in the "Not at all" "table_row" 211 And I log out 212 # View analysis, user3 should only see one group - group 2 213 And I log in as "user3" 214 And I follow "Course 1" 215 And I follow "Course anon feedback" 216 And I follow "Submitted answers" 217 And I should see "Separate groups: Group 2" 218 And I show chart data for the "multichoice1" feedback 219 And I should see "0" in the "Yes of course" "table_row" 220 And I should see "2 (66.67 %)" in the "Not at all" "table_row" 221 And I log out 222 # View analysis, user2 should see a group selector and be able to change the group but not view all. 223 And I log in as "user2" 224 And I follow "Course 1" 225 And I follow "Course anon feedback" 226 And I follow "Submitted answers" 227 And the field "Separate groups" matches value "Group 1" 228 And I show chart data for the "multichoice1" feedback 229 And I should see "2 (50.00 %)" in the "Yes of course" "table_row" 230 And I should see "1 (25.00 %)" in the "Not at all" "table_row" 231 And I select "Group 2" from the "Separate groups" singleselect 232 And I show chart data for the "multichoice1" feedback 233 And I should see "0" in the "Yes of course" "table_row" 234 And I should see "2 (66.67 %)" in the "Not at all" "table_row" 235 And the "Separate groups" select box should not contain "All participants" 236 And I log out 237 # User without group can see all participants only 238 And I log in as "user7" 239 And I follow "Course 1" 240 And I follow "Course anon feedback" 241 And I follow "Submitted answers" 242 And I should see "Separate groups: All participants" 243 And I show chart data for the "multichoice1" feedback 244 And I should see "2 (28.57 %)" in the "Yes of course" "table_row" 245 And I should see "3 (42.86 %)" in the "Not at all" "table_row" 246 And I should see "2 (28.57 %)" in the "I don't know" "table_row" 247 And I log out 248 # Teacher can browse everybody 249 And I log in as "teacher" 250 And I follow "Course 1" 251 And I follow "Course anon feedback" 252 And I follow "Analysis" 253 And the field "Separate groups" matches value "All participants" 254 And I show chart data for the "multichoice1" feedback 255 And I should see "2 (28.57 %)" in the "Yes of course" "table_row" 256 And I should see "3 (42.86 %)" in the "Not at all" "table_row" 257 And I should see "2 (28.57 %)" in the "I don't know" "table_row" 258 And I select "Group 1" from the "Separate groups" singleselect 259 And I show chart data for the "multichoice1" feedback 260 And I should see "2 (50.00 %)" in the "Yes of course" "table_row" 261 And I should see "1 (25.00 %)" in the "Not at all" "table_row" 262 And I select "Group 2" from the "Separate groups" singleselect 263 And I show chart data for the "multichoice1" feedback 264 And I should see "0" in the "Yes of course" "table_row" 265 And I should see "2 (66.67 %)" in the "Not at all" "table_row" 266 And I follow "Show responses" 267 # The response numbers were randomly allocated, we only can assert the number of visible responses here: 268 And the field "Separate groups" matches value "Group 2" 269 And "//tr[contains(@id,'_r2') and contains(.,'Response number')]" "xpath_element" should exist 270 And "//tr[contains(@id,'_r3') and contains(@class,'emptyrow')]" "xpath_element" should exist 271 And I select "Group 1" from the "Separate groups" singleselect 272 And "//tr[contains(@id,'_r3') and contains(.,'Response number')]" "xpath_element" should exist 273 And "//tr[contains(@id,'_r4') and contains(@class,'emptyrow')]" "xpath_element" should exist 274 And I select "All participants" from the "Separate groups" singleselect 275 And "//tr[contains(@id,'_r6') and contains(.,'Response number')]" "xpath_element" should exist 276 And "//tr[contains(@id,'_r7') and contains(@class,'emptyrow')]" "xpath_element" should exist 277 And I log out
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |