Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 4... Línea 4...
4
  As a Teacher
4
  As a Teacher
5
  I need to view the reports.
5
  I need to view the reports.
Línea 6... Línea 6...
6
 
6
 
7
  Background:
7
  Background:
8
    Given the following "users" exist:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Teacher | 1 | teacher1@example.com |
10
      | teacher1 | Teacher   | 1        | teacher1@example.com |
-
 
11
      | student1 | Student   | 1        | student1@example.com |
-
 
12
      | student2 | Student   | 2        | student2@example.com |
11
      | student1 | Student | 1 | student1@example.com |
13
    # Force group mode so you don't need to set it manually on the activity.
12
    And the following "courses" exist:
14
    And the following "courses" exist:
13
      | fullname | shortname | category |
15
      | fullname | shortname | category | groupmodeforce |
-
 
16
      | Course 1 | C1        | 0        |                |
14
      | Course 1 | C1 | 0 |
17
      | Course 2 | C2        |          | 1              |
15
    And the following "course enrolments" exist:
18
    And the following "course enrolments" exist:
16
      | user | course | role |
19
      | user     | course | role           |
17
      | teacher1 | C1 | editingteacher |
20
      | teacher1 | C1     | editingteacher |
-
 
21
      | student1 | C1     | student        |
-
 
22
      | teacher1 | C2     | editingteacher |
-
 
23
      | student1 | C2     | student        |
18
      | student1 | C1 | student |
24
      | student2 | C2     | student        |
19
    And the following "activities" exist:
25
    And the following "activities" exist:
20
      | activity   | name             | course | idnumber    | retake |
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."
Línea 21... Línea 60...
21
      | lesson     | Test lesson name | C1     | lesson1     | 1      |
60
    And I press "Submit"
22
 
61
 
23
  Scenario: View student attempts in a lesson containing both content and question pages
62
  Scenario: View student attempts in a lesson containing both content and question pages
24
    Given the following "mod_lesson > pages" exist:
63
    Given the following "mod_lesson > pages" exist:
Línea 94... Línea 133...
94
    And I navigate to "Reports" in current page administration
133
    And I navigate to "Reports" in current page administration
95
    And I should see "Student 1"
134
    And I should see "Student 1"
96
    And I should not see "High score"
135
    And I should not see "High score"
97
    And I should not see "Average score"
136
    And I should not see "Average score"
98
    And I should not see "Low score"
137
    And I should not see "Low score"
-
 
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."