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 students 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 "activities" exist:
45
      | activity | course | idnumber | name            | assignsubmission_file_enabled | groupmode |
46
      | assign   | C1     | a1       | Test assignment | 0                             | 1         |
47
    And the following "grade grades" exist:
48
      | gradeitem       | user     | grade  |
49
      | Test assignment | student1 | 100.00 |
50
      | Test assignment | student2 | 90.00  |
51
      | Test assignment | student3 | 90.00  |
52
      | Test assignment | student4 | 80.00  |
53
      | Test assignment | student5 | 80.00  |
54
      | Test assignment | student6 | 70.00  |
55
    And I log in as "teacher1"
56
    And I am on "Course 1" course homepage with editing mode on
57
 
58
  Scenario: Configure the block on the course page to show 1 low score
59
    Given I add the "Activity results" block to the default region with:
60
      | config_showbest | 0 |
61
      | config_showworst | 1 |
62
      | config_gradeformat | Percentages |
63
      | config_nameformat | Display full names |
64
      | config_decimalpoints | 0 |
65
      | config_usegroups | Yes |
66
    Then I should see "Group 3" in the "Activity results" "block"
67
    And I should see "75%" in the "Activity results" "block"
68
 
69
  Scenario: Try to configure the block on the course page to show 1 low score as a fraction
70
    Given I add the "Activity results" block to the default region with:
71
      | config_showbest | 0 |
72
      | config_showworst | 1 |
73
      | config_gradeformat | Fractions |
74
      | config_nameformat | Display full names |
75
      | config_usegroups | Yes |
76
    Then I should see "Group 3" in the "Activity results" "block"
77
    And I should see "75.00/100.00" in the "Activity results" "block"
78
    And I am on the "Course 1" course page logged in as student5
79
    And I should see "Student 6" in the "Activity results" "block"
80
    And I should see "70.00/100.00" in the "Activity results" "block"
81
 
82
  Scenario: Try to configure the block on the course page to show 1 low score as a absolute numbers
83
    Given I add the "Activity results" block to the default region with:
84
      | config_showbest | 0 |
85
      | config_showworst | 1 |
86
      | config_gradeformat | Absolute numbers |
87
      | config_nameformat | Display full names |
88
      | config_usegroups | Yes |
89
    Then I should see "Group 3" in the "Activity results" "block"
90
    And I should see "75.00" in the "Activity results" "block"
91
    And I am on the "Course 1" course page logged in as student5
92
    And I should see "Student 6" in the "Activity results" "block"
93
    And I should see "70.00" in the "Activity results" "block"
94
 
95
  Scenario: Try to configure the block on the course page to show multiple low scores as percentages
96
    Given I add the "Activity results" block to the default region with:
97
      | config_showbest | 0 |
98
      | config_showworst | 2 |
99
      | config_gradeformat | Percentages |
100
      | config_nameformat | Display full names |
101
      | config_decimalpoints | 0 |
102
      | config_usegroups | Yes |
103
    Then I should see "Group 2" in the "Activity results" "block"
104
    And I should see "85%" in the "Activity results" "block"
105
    And I should see "Group 3" in the "Activity results" "block"
106
    And I should see "75%" in the "Activity results" "block"
107
    And I am on the "Course 1" course page logged in as student5
108
    And I should see "Student 6" in the "Activity results" "block"
109
    And I should see "70%" in the "Activity results" "block"
110
    And I should see "Student 5" in the "Activity results" "block"
111
    And I should see "80%" in the "Activity results" "block"
112
 
113
  Scenario: Try to configure the block on the course page to show multiple low scores as fractions
114
    Given I add the "Activity results" block to the default region with:
115
      | config_showbest | 0 |
116
      | config_showworst | 2 |
117
      | config_gradeformat | Fractions |
118
      | config_nameformat | Display full names |
119
      | config_usegroups | Yes |
120
    Then I should see "Group 2" in the "Activity results" "block"
121
    And I should see "85.00/100.00" in the "Activity results" "block"
122
    And I should see "Group 3" in the "Activity results" "block"
123
    And I should see "75.00/100.00" in the "Activity results" "block"
124
    And I am on the "Course 1" course page logged in as student3
125
    And I should see "Student 3" in the "Activity results" "block"
126
    And I should see "90.00/100.00" in the "Activity results" "block"
127
    And I should see "Student 4" in the "Activity results" "block"
128
    And I should see "80.00/100.00" in the "Activity results" "block"
129
 
130
  Scenario: Try to configure the block on the course page to show multiple low scores as absolute numbers
131
    Given I add the "Activity results" block to the default region with:
132
      | config_showbest | 0 |
133
      | config_showworst | 2 |
134
      | config_gradeformat | Absolute numbers |
135
      | config_nameformat | Display full names |
136
      | config_usegroups | Yes |
137
    Then I should see "Group 2" in the "Activity results" "block"
138
    And I should see "85.00" in the "Activity results" "block"
139
    And I should see "Group 3" in the "Activity results" "block"
140
    And I should see "75.00" in the "Activity results" "block"
141
    And I am on the "Course 1" course page logged in as student5
142
    And I should see "Student 5" in the "Activity results" "block"
143
    And I should see "80.00" in the "Activity results" "block"
144
    And I should see "Student 6" in the "Activity results" "block"
145
    And I should see "70.00" in the "Activity results" "block"
146
 
147
  Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers
148
    Given the following config values are set as admin:
149
      | showuseridentity | idnumber,email |
150
    And I add the "Activity results" block to the default region with:
151
      | config_showbest | 0 |
152
      | config_showworst | 2 |
153
      | config_gradeformat | Percentages |
154
      | config_nameformat | Display only ID numbers |
155
      | config_usegroups | Yes |
156
    Then I should see "Group" in the "Activity results" "block"
157
    And I should see "85.00%" in the "Activity results" "block"
158
    And I should see "75.00%" in the "Activity results" "block"
159
    # Students cannot see user identity fields.
160
    And I am on the "Course 1" course page logged in as student1
161
    And I should see "User" in the "Activity results" "block"
162
    And I should not see "User S1" in the "Activity results" "block"
163
    And I should see "100.00%" in the "Activity results" "block"
164
    And I should not see "User S2" in the "Activity results" "block"
165
    And I should see "90.00%" in the "Activity results" "block"
166
 
167
  Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names
168
    Given I add the "Activity results" block to the default region with:
169
      | config_showbest | 0 |
170
      | config_showworst | 2 |
171
      | config_gradeformat | Percentages |
172
      | config_nameformat | Anonymous results |
173
      | config_usegroups | Yes |
174
    Then I should see "Group" in the "Activity results" "block"
175
    And I should see "85.00%" in the "Activity results" "block"
176
    And I should see "75.00%" in the "Activity results" "block"
177
    And I am on the "Course 1" course page logged in as student1
178
    And I should see "User" in the "Activity results" "block"
179
    And I should see "100.00%" in the "Activity results" "block"
180
    And I should see "90.00%" in the "Activity results" "block"