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 visible 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 | name             | course | idnumber | section | assignsubmission_file_enabled | groupmode |
46
      | assign   | Test assignment  | C1     | assign1  | 1       | 0                             | 2         |
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 am on the "Course 1" course page logged in as teacher1
56
    And I turn editing mode on
57
 
58
  Scenario: Configure the block on the course page to show 1 high score
59
    Given I add the "Activity results" block to the default region with:
60
      | config_showbest | 1 |
61
      | config_showworst | 0 |
62
      | config_gradeformat | Percentages |
63
      | config_nameformat | Display full names |
64
      | config_decimalpoints | 0 |
65
      | config_usegroups | Yes |
66
    Then I should see "Group 1" in the "Activity results" "block"
67
    And I should see "95%" in the "Activity results" "block"
68
 
69
  Scenario: Try to configure the block on the course page to show 1 high score as a fraction
70
    Given I add the "Activity results" block to the default region with:
71
      | config_showbest | 1 |
72
      | config_showworst | 0 |
73
      | config_gradeformat | Fractions |
74
      | config_nameformat | Display full names |
75
      | config_usegroups | Yes |
76
    And I am on the "Course 1" course page logged in as student1
77
    Then I should see "Group 1" in the "Activity results" "block"
78
    And I should see "95.00/100.00" in the "Activity results" "block"
79
 
80
  Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers
81
    Given I add the "Activity results" block to the default region with:
82
      | config_showbest | 1 |
83
      | config_showworst | 0 |
84
      | config_gradeformat | Absolute numbers |
85
      | config_nameformat | Display full names |
86
      | config_usegroups | Yes |
87
    Then I am on the "Course 1" course page logged in as student1
88
    And I should see "Group 1" in the "Activity results" "block"
89
    And I should see "95.00" in the "Activity results" "block"
90
 
91
  Scenario: Try to configure the block on the course page to show multiple high scores as percentages
92
    Given I add the "Activity results" block to the default region with:
93
      | config_showbest | 3 |
94
      | config_showworst | 0 |
95
      | config_gradeformat | Percentages |
96
      | config_nameformat | Display full names |
97
      | config_decimalpoints | 0 |
98
      | config_usegroups | Yes |
99
    Then I am on the "Course 1" course page logged in as student1
100
    And I should see "Group 1" in the "Activity results" "block"
101
    And I should see "95%" in the "Activity results" "block"
102
    And I should see "Group 2" in the "Activity results" "block"
103
    And I should see "85%" in the "Activity results" "block"
104
    And I should see "Group 3" in the "Activity results" "block"
105
    And I should see "75%" in the "Activity results" "block"
106
 
107
  Scenario: Try to configure the block on the course page to show multiple high scores as fractions
108
    Given I add the "Activity results" block to the default region with:
109
      | config_showbest | 3 |
110
      | config_showworst | 0 |
111
      | config_gradeformat | Fractions |
112
      | config_nameformat | Display full names |
113
      | config_usegroups | Yes |
114
    Then I am on the "Course 1" course page logged in as student1
115
    And I should see "Group 1" in the "Activity results" "block"
116
    And I should see "95.00/100.00" in the "Activity results" "block"
117
    And I should see "Group 2" in the "Activity results" "block"
118
    And I should see "85.00/100.00" in the "Activity results" "block"
119
    And I should see "Group 3" in the "Activity results" "block"
120
    And I should see "75.00/100.00" in the "Activity results" "block"
121
 
122
  Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers
123
    Given I add the "Activity results" block to the default region with:
124
      | config_showbest | 3 |
125
      | config_showworst | 0 |
126
      | config_gradeformat | Absolute numbers |
127
      | config_nameformat | Display full names |
128
      | config_usegroups | Yes |
129
    Then I am on the "Course 1" course page logged in as student1
130
    And I should see "Group 1" in the "Activity results" "block"
131
    And I should see "95.00" in the "Activity results" "block"
132
    And I should see "Group 2" in the "Activity results" "block"
133
    And I should see "85.00" in the "Activity results" "block"
134
    And I should see "Group 3" in the "Activity results" "block"
135
    And I should see "75.00" in the "Activity results" "block"
136
 
137
  Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
138
    Given the following config values are set as admin:
139
      | showuseridentity | idnumber,email |
140
    And I add the "Activity results" block to the default region with:
141
      | config_showbest | 3 |
142
      | config_showworst | 0 |
143
      | config_gradeformat | Percentages |
144
      | config_nameformat | Display only ID numbers |
145
      | config_usegroups | Yes |
146
    Then I am on the "Course 1" course page logged in as student1
147
    And I should see "Group" in the "Activity results" "block"
148
    And I should see "95.00%" in the "Activity results" "block"
149
    And I should see "85.00%" in the "Activity results" "block"
150
    And I should see "75.00%" in the "Activity results" "block"
151
 
152
  Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
153
    Given I add the "Activity results" block to the default region with:
154
      | config_showbest | 3 |
155
      | config_showworst | 0 |
156
      | config_gradeformat | Percentages |
157
      | config_nameformat | Anonymous results |
158
      | config_usegroups | Yes |
159
    Then I am on the "Course 1" course page logged in as student1
160
    And I should see "Group" in the "Activity results" "block"
161
    And I should see "95.00%" in the "Activity results" "block"
162
    And I should see "85.00%" in the "Activity results" "block"
163
    And I should see "75.00%" in the "Activity results" "block"