Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_activity_results @javascript
2
Feature: The activity results block displays student in separate groups scores
3
  In order to be display student scores
4
  As a user
5
  I need to see the activity results block
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email | idnumber |
10
      | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
11
      | student1 | Student | 1 | student1@example.com | S1 |
12
      | student2 | Student | 2 | student2@example.com | S2 |
13
      | student3 | Student | 3 | student3@example.com | S3 |
14
      | student4 | Student | 4 | student4@example.com | S4 |
15
      | student5 | Student | 5 | student5@example.com | S5 |
16
      | student6 | Student | 6 | student6@example.com | S6 |
17
    And the following "courses" exist:
18
      | fullname | shortname | category |
19
      | Course 1 | C1 | 0 |
20
    And the following "groups" exist:
21
      | name | course | idnumber |
22
      | Group 1 | C1 | G1 |
23
      | Group 2 | C1 | G2 |
24
      | Group 3 | C1 | G3 |
25
      | Group 4 | C1 | G4 |
26
      | Group 5 | C1 | G5 |
27
    And the following "course enrolments" exist:
28
      | user | course | role |
29
      | teacher1 | C1 | editingteacher |
30
      | student1 | C1 | student |
31
      | student2 | C1 | student |
32
      | student3 | C1 | student |
33
      | student4 | C1 | student |
34
      | student5 | C1 | student |
35
      | student6 | C1 | student |
36
    And the following "group members" exist:
37
      | user     | group   |
38
      | student1 | G1 |
39
      | student2 | G1 |
40
      | student3 | G2 |
41
      | student4 | G2 |
42
      | student5 | G3 |
43
      | student6 | G3 |
44
    And the following "activity" exists:
45
      | activity                      | assign          |
46
      | course                        | C1              |
47
      | idnumber                      | 0001            |
48
      | name                          | Test assignment |
49
      | section                       | 1               |
50
      | assignsubmission_file_enabled | 0               |
51
      | groupmode                     | 1               |
52
    And the following "grade grades" exist:
53
      | gradeitem       | user     | grade  |
54
      | Test assignment | student1 | 100.00 |
55
      | Test assignment | student2 | 90.00  |
56
      | Test assignment | student3 | 90.00  |
57
      | Test assignment | student4 | 80.00  |
58
      | Test assignment | student5 | 80.00  |
59
      | Test assignment | student6 | 70.00  |
60
    And I log in as "teacher1"
61
    And I am on "Course 1" course homepage with editing mode on
62
 
63
  Scenario: Configure the block on the course page to show 1 high score
64
    Given I add the "Activity results" block to the default region with:
65
      | config_showbest | 1 |
66
      | config_showworst | 0 |
67
      | config_gradeformat | Percentages |
68
      | config_nameformat | Display full names |
69
      | config_decimalpoints | 0 |
70
      | config_usegroups | Yes |
71
    Then I should see "Group 1" in the "Activity results" "block"
72
    And I should see "95%" in the "Activity results" "block"
73
 
74
  Scenario: Try to configure the block on the course page to show 1 high score as a fraction
75
    Given I add the "Activity results" block to the default region with:
76
      | config_showbest | 1 |
77
      | config_showworst | 0 |
78
      | config_gradeformat | Fractions |
79
      | config_nameformat | Display full names |
80
      | config_usegroups | Yes |
81
    Then I should see "Group 1" in the "Activity results" "block"
82
    And I should see "95.00/100.00" in the "Activity results" "block"
83
    And I am on the "Course 1" course page logged in as student1
84
    And I should see "Student 1" in the "Activity results" "block"
85
    And I should see "100.00/100.00" in the "Activity results" "block"
86
 
87
  Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers
88
    Given I add the "Activity results" block to the default region with:
89
      | config_showbest | 1 |
90
      | config_showworst | 0 |
91
      | config_gradeformat | Absolute numbers |
92
      | config_nameformat | Display full names |
93
      | config_usegroups | Yes |
94
    Then I should see "Group 1" in the "Activity results" "block"
95
    And I should see "95.00" in the "Activity results" "block"
96
    And I am on the "Course 1" course page logged in as student1
97
    And I should see "Student 1" in the "Activity results" "block"
98
    And I should see "100.00" in the "Activity results" "block"
99
 
100
  Scenario: Try to configure the block on the course page to show multiple high scores as percentages
101
    Given I add the "Activity results" block to the default region with:
102
      | config_showbest | 3 |
103
      | config_showworst | 0 |
104
      | config_gradeformat | Percentages |
105
      | config_nameformat | Display full names |
106
      | config_decimalpoints | 0 |
107
      | config_usegroups | Yes |
108
    Then I should see "Group 1" in the "Activity results" "block"
109
    And I should see "95%" in the "Activity results" "block"
110
    And I should see "Group 2" in the "Activity results" "block"
111
    And I should see "85%" in the "Activity results" "block"
112
    And I should see "Group 3" in the "Activity results" "block"
113
    And I should see "75%" in the "Activity results" "block"
114
    And I am on the "Course 1" course page logged in as student1
115
    And I should see "Student 1" in the "Activity results" "block"
116
    And I should see "100%" in the "Activity results" "block"
117
    And I should see "Student 2" in the "Activity results" "block"
118
    And I should see "90%" in the "Activity results" "block"
119
 
120
  Scenario: Try to configure the block on the course page to show multiple high scores as fractions
121
    Given I add the "Activity results" block to the default region with:
122
      | config_showbest | 3 |
123
      | config_showworst | 0 |
124
      | config_gradeformat | Fractions |
125
      | config_nameformat | Display full names |
126
      | config_usegroups | Yes |
127
    Then I should see "Group 1" in the "Activity results" "block"
128
    And I should see "95.00/100.00" in the "Activity results" "block"
129
    And I should see "Group 2" in the "Activity results" "block"
130
    And I should see "85.00/100.00" in the "Activity results" "block"
131
    And I should see "Group 3" in the "Activity results" "block"
132
    And I should see "75.00/100.00" in the "Activity results" "block"
133
    And I am on the "Course 1" course page logged in as student3
134
    And I should see "Student 3" in the "Activity results" "block"
135
    And I should see "90.00/100.00" in the "Activity results" "block"
136
    And I should see "Student 4" in the "Activity results" "block"
137
    And I should see "80.00/100.00" in the "Activity results" "block"
138
 
139
  Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers
140
    Given I add the "Activity results" block to the default region with:
141
      | config_showbest | 3 |
142
      | config_showworst | 0 |
143
      | config_gradeformat | Absolute numbers |
144
      | config_nameformat | Display full names |
145
      | config_usegroups | Yes |
146
    Then I should see "Group 1" in the "Activity results" "block"
147
    And I should see "95.00" in the "Activity results" "block"
148
    And I should see "Group 2" in the "Activity results" "block"
149
    And I should see "85.00" in the "Activity results" "block"
150
    And I should see "Group 3" in the "Activity results" "block"
151
    And I should see "75.00" in the "Activity results" "block"
152
    And I am on the "Course 1" course page logged in as student1
153
    And I should see "Student 1" in the "Activity results" "block"
154
    And I should see "100.00" in the "Activity results" "block"
155
    And I should see "Student 2" in the "Activity results" "block"
156
    And I should see "90.00" in the "Activity results" "block"
157
 
158
  Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
159
    Given the following config values are set as admin:
160
      | showuseridentity | idnumber,email |
161
    And I add the "Activity results" block to the default region with:
162
      | config_showbest | 3 |
163
      | config_showworst | 0 |
164
      | config_gradeformat | Percentages |
165
      | config_nameformat | Display only ID numbers |
166
      | config_usegroups | Yes |
167
    Then I should see "Group" in the "Activity results" "block"
168
    And I should see "95.00%" in the "Activity results" "block"
169
    And I should see "85.00%" in the "Activity results" "block"
170
    And I should see "75.00%" in the "Activity results" "block"
171
    # Students cannot see user identity fields.
172
    And I am on the "Course 1" course page logged in as student1
173
    And I should see "User" in the "Activity results" "block"
174
    And I should not see "User S1" in the "Activity results" "block"
175
    And I should see "100.00%" in the "Activity results" "block"
176
    And I should not see "User S2" in the "Activity results" "block"
177
    And I should see "90.00%" in the "Activity results" "block"
178
 
179
  Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
180
    Given I add the "Activity results" block to the default region with:
181
      | config_showbest | 3 |
182
      | config_showworst | 0 |
183
      | config_gradeformat | Percentages |
184
      | config_nameformat | Anonymous results |
185
      | config_usegroups | Yes |
186
    Then I should see "Group" in the "Activity results" "block"
187
    And I should see "95.00%" in the "Activity results" "block"
188
    And I should see "85.00%" in the "Activity results" "block"
189
    And I should see "75.00%" in the "Activity results" "block"
190
    And I am on the "Course 1" course page logged in as student1
191
    And I should see "User" in the "Activity results" "block"
192
    And I should see "100.00%" in the "Activity results" "block"
193
    And I should see "90.00%" in the "Activity results" "block"