1 |
efrain |
1 |
@mod @mod_lesson
|
|
|
2 |
Feature: In a lesson activity, teachers can review student attempts
|
|
|
3 |
To review student attempts in a lesson
|
|
|
4 |
As a Teacher
|
|
|
5 |
I need to view the reports.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
1441 |
ariadna |
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
| student2 | Student | 2 | student2@example.com |
|
|
|
13 |
# Force group mode so you don't need to set it manually on the activity.
|
1 |
efrain |
14 |
And the following "courses" exist:
|
1441 |
ariadna |
15 |
| fullname | shortname | category | groupmodeforce |
|
|
|
16 |
| Course 1 | C1 | 0 | |
|
|
|
17 |
| Course 2 | C2 | | 1 |
|
1 |
efrain |
18 |
And the following "course enrolments" exist:
|
1441 |
ariadna |
19 |
| user | course | role |
|
|
|
20 |
| teacher1 | C1 | editingteacher |
|
|
|
21 |
| student1 | C1 | student |
|
|
|
22 |
| teacher1 | C2 | editingteacher |
|
|
|
23 |
| student1 | C2 | student |
|
|
|
24 |
| student2 | C2 | student |
|
1 |
efrain |
25 |
And the following "activities" exist:
|
1441 |
ariadna |
26 |
| activity | name | course | idnumber | retake |
|
|
|
27 |
| lesson | Test lesson name | C1 | lesson1 | 1 |
|
|
|
28 |
| lesson | Lesson 1 | C2 | | |
|
|
|
29 |
And the following "groups" exist:
|
|
|
30 |
| name | course | idnumber |
|
|
|
31 |
| Group 1 | C2 | G1 |
|
|
|
32 |
| Group 2 | C2 | G2 |
|
|
|
33 |
And the following "group members" exist:
|
|
|
34 |
| user | group |
|
|
|
35 |
| student1 | G1 |
|
|
|
36 |
| student2 | G2 |
|
|
|
37 |
And the following "mod_lesson > page" exist:
|
|
|
38 |
| lesson | qtype | title | content |
|
|
|
39 |
| Lesson 1 | multichoice | Multichoice question | This is a multichoice question. |
|
|
|
40 |
| Lesson 1 | essay | Essay question | Write an essay about anything. |
|
|
|
41 |
| Lesson 1 | content | Content page | First page contents. |
|
|
|
42 |
And the following "mod_lesson > answers" exist:
|
|
|
43 |
| page | answer | jumpto | score |
|
|
|
44 |
| Multichoice question | Correct answer | Next page | 1 |
|
|
|
45 |
| Multichoice question | Incorrect answer | This page | 0 |
|
|
|
46 |
| Essay question | | Next page | 1 |
|
|
|
47 |
| Content page | Previous page | Previous page | 0 |
|
|
|
48 |
| Content page | Next page | Next page | 0 |
|
|
|
49 |
And I am on the "Lesson 1" "lesson activity" page logged in as student1
|
|
|
50 |
And I set the following fields to these values:
|
|
|
51 |
| Correct answer | 1 |
|
|
|
52 |
And I press "Submit"
|
|
|
53 |
And I set the field "Your answer" to "School is awesome!"
|
|
|
54 |
And I press "Submit"
|
|
|
55 |
And I am on the "Lesson 1" "lesson activity" page logged in as student2
|
|
|
56 |
And I set the following fields to these values:
|
|
|
57 |
| Incorrect answer | 1 |
|
|
|
58 |
And I press "Submit"
|
|
|
59 |
And I set the field "Your answer" to "Once upon an essay."
|
|
|
60 |
And I press "Submit"
|
1 |
efrain |
61 |
|
|
|
62 |
Scenario: View student attempts in a lesson containing both content and question pages
|
|
|
63 |
Given the following "mod_lesson > pages" exist:
|
|
|
64 |
| lesson | qtype | title | content |
|
|
|
65 |
| Test lesson name | content | First page name | First page contents |
|
|
|
66 |
| Test lesson name | content | Second page name | Second page contents |
|
|
|
67 |
| Test lesson name | content | Third page name | Third page contents |
|
|
|
68 |
| Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
|
|
|
69 |
| Test lesson name | truefalse | True/false question 2 | Kermit is a frog |
|
|
|
70 |
And the following "mod_lesson > answers" exist:
|
|
|
71 |
| page | answer | response | jumpto | score |
|
|
|
72 |
| First page name | Next page | | Next page | 0 |
|
|
|
73 |
| Second page name | Previous page | | Previous page | 0 |
|
|
|
74 |
| Second page name | Next page | | Next page | 0 |
|
|
|
75 |
| Third page name | Previous page | | Previous page | 0 |
|
|
|
76 |
| Third page name | Next page | | Next page | 0 |
|
|
|
77 |
| True/false question 1 | True | Correct | Next page | 1 |
|
|
|
78 |
| True/false question 1 | False | Wrong | This page | 0 |
|
|
|
79 |
| True/false question 2 | True | Correct | Next page | 1 |
|
|
|
80 |
| True/false question 2 | False | Wrong | This page | 0 |
|
|
|
81 |
When I am on the "Test lesson name" "lesson activity" page logged in as student1
|
|
|
82 |
And I should see "First page contents"
|
|
|
83 |
And I press "Next page"
|
|
|
84 |
And I should see "Second page contents"
|
|
|
85 |
And I press "Next page"
|
|
|
86 |
And I should see "Third page contents"
|
|
|
87 |
And I press "Next page"
|
|
|
88 |
And I should see "Paper is made from trees."
|
|
|
89 |
And I set the following fields to these values:
|
|
|
90 |
| True | 1 |
|
|
|
91 |
And I press "Submit"
|
|
|
92 |
And I press "Continue"
|
|
|
93 |
And I should see "Kermit is a frog"
|
|
|
94 |
And I set the following fields to these values:
|
|
|
95 |
| True | 1 |
|
|
|
96 |
And I press "Submit"
|
|
|
97 |
And I press "Continue"
|
|
|
98 |
And I should see "Congratulations - end of lesson reached"
|
|
|
99 |
Then I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
|
|
100 |
And I navigate to "Reports" in current page administration
|
|
|
101 |
And I should see "Student 1"
|
|
|
102 |
And I should see "100%"
|
|
|
103 |
And I should see "High score"
|
|
|
104 |
And I should see "Average score"
|
|
|
105 |
And I should see "Low score"
|
|
|
106 |
|
|
|
107 |
Scenario: View student attempts in a lesson containing only content pages
|
|
|
108 |
Given the following "mod_lesson > pages" exist:
|
|
|
109 |
| lesson | qtype | title | content |
|
|
|
110 |
| Test lesson name | content | First page name | First page contents |
|
|
|
111 |
| Test lesson name | content | Second page name | Second page contents |
|
|
|
112 |
| Test lesson name | content | Third page name | Third page contents |
|
|
|
113 |
| Test lesson name | content | Fourth page name | Fourth page contents |
|
|
|
114 |
And the following "mod_lesson > answers" exist:
|
|
|
115 |
| page | answer | jumpto |
|
|
|
116 |
| First page name | Next page | Next page |
|
|
|
117 |
| Second page name | Previous page | Previous page |
|
|
|
118 |
| Second page name | Next page | Next page |
|
|
|
119 |
| Third page name | Previous page | Previous page |
|
|
|
120 |
| Third page name | Next page | Next page |
|
|
|
121 |
| Fourth page name | Previous page | Previous page |
|
|
|
122 |
| Fourth page name | End of lesson | End of lesson |
|
|
|
123 |
When I am on the "Test lesson name" "lesson activity" page logged in as student1
|
|
|
124 |
And I should see "First page contents"
|
|
|
125 |
And I press "Next page"
|
|
|
126 |
And I should see "Second page contents"
|
|
|
127 |
And I press "Next page"
|
|
|
128 |
And I should see "Third page contents"
|
|
|
129 |
And I press "Next page"
|
|
|
130 |
And I should see "Fourth page contents"
|
|
|
131 |
And I press "End of lesson"
|
|
|
132 |
Then I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
|
|
133 |
And I navigate to "Reports" in current page administration
|
|
|
134 |
And I should see "Student 1"
|
|
|
135 |
And I should not see "High score"
|
|
|
136 |
And I should not see "Average score"
|
|
|
137 |
And I should not see "Low score"
|
1441 |
ariadna |
138 |
|
|
|
139 |
Scenario Outline: Teacher can filter lesson essay grading by group
|
|
|
140 |
Given I am on the "C2" "course editing" page logged in as teacher1
|
|
|
141 |
And I set the field "Group mode" to "<groupmode>"
|
|
|
142 |
And I press "Save and display"
|
|
|
143 |
And I am on the "Lesson 1" "lesson activity" page
|
|
|
144 |
And I press "Grade essays"
|
|
|
145 |
When I select "Group 1" from the "<groupmode>" singleselect
|
|
|
146 |
Then I should see "Student 1"
|
|
|
147 |
And I should not see "Student 2"
|
|
|
148 |
And I select "Group 2" from the "<groupmode>" singleselect
|
|
|
149 |
And I should see "Student 2"
|
|
|
150 |
And I should not see "Student 1"
|
|
|
151 |
And I select "All participants" from the "<groupmode>" singleselect
|
|
|
152 |
And I should see "Student 1"
|
|
|
153 |
And I should see "Student 2"
|
|
|
154 |
|
|
|
155 |
Examples:
|
|
|
156 |
| groupmode |
|
|
|
157 |
| Separate groups |
|
|
|
158 |
| Visible groups |
|
|
|
159 |
|
|
|
160 |
Scenario Outline: Teacher can filter lesson reports by group
|
|
|
161 |
Given I am on the "C2" "course editing" page logged in as teacher1
|
|
|
162 |
And I set the field "Group mode" to "<groupmode>"
|
|
|
163 |
And I press "Save and display"
|
|
|
164 |
And I am on the "Lesson 1" "lesson activity" page
|
|
|
165 |
And I navigate to "Reports" in current page administration
|
|
|
166 |
When I select "Group 1" from the "<groupmode>" singleselect
|
|
|
167 |
Then I should see "Student 1"
|
|
|
168 |
And I should not see "Student 2"
|
|
|
169 |
And I select "Group 2" from the "<groupmode>" singleselect
|
|
|
170 |
And I should see "Student 2"
|
|
|
171 |
And I should not see "Student 1"
|
|
|
172 |
And I select "All participants" from the "<groupmode>" singleselect
|
|
|
173 |
And I should see "Student 1"
|
|
|
174 |
And I should see "Student 2"
|
|
|
175 |
|
|
|
176 |
Examples:
|
|
|
177 |
| groupmode |
|
|
|
178 |
| Separate groups |
|
|
|
179 |
| Visible groups |
|
|
|
180 |
|
|
|
181 |
@javascript
|
|
|
182 |
Scenario: Teacher can delete selected attempts
|
|
|
183 |
Given I am on the "Lesson 1" "lesson activity" page logged in as teacher1
|
|
|
184 |
And I navigate to "Reports" in current page administration
|
|
|
185 |
When I click on "selectall-attempts" "checkbox"
|
|
|
186 |
And I select "Delete selected" from the "With selected attempts..." singleselect
|
|
|
187 |
Then I should see "No attempts have been made on this lesson."
|