mirrored from git://git.moodle.org/moodle.git
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
/
highscoreswithoutgroups.feature
141 lines (131 loc) · 7.34 KB
/
highscoreswithoutgroups.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@block @block_activity_results @javascript
Feature: The activity results block displays student high scores
In order to be display student scores
As a user
I need to see the activity results block
Background:
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | section | idnumber | assignsubmission_file_enabled |
| assign | Test assignment | Offline text | C1 | 1 | assign1 | 0 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I navigate to "View > Grader report" in the course gradebook
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment"
And I press "Save changes"
And I am on "Course 1" course homepage
Scenario: Configure the block on the course page to show 0 high scores
Given I add the "Activity results" block to the default region with:
| config_showbest | 0 |
| config_showworst | 0 |
| config_gradeformat | Percentages |
| config_nameformat | Display full names |
Then I should see "This block's configuration currently does not allow it to show any results." in the "Activity results" "block"
Scenario: Configure the block on the course page to show 1 high score
Given I add the "Activity results" block to the default region with:
| config_showbest | 1 |
| config_showworst | 0 |
| config_gradeformat | Percentages |
| config_nameformat | Display full names |
| config_decimalpoints | 0 |
Then I should see "Student 1" in the "Activity results" "block"
And I should see "90%" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show 1 high score as a fraction
Given I add the "Activity results" block to the default region with:
| config_showbest | 1 |
| config_showworst | 0 |
| config_gradeformat | Fractions |
| config_nameformat | Display full names |
Then I should see "Student 1" in the "Activity results" "block"
And I should see "90.00/100.00" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers
Given I add the "Activity results" block to the default region with:
| config_showbest | 1 |
| config_showworst | 0 |
| config_gradeformat | Absolute numbers |
| config_nameformat | Display full names |
Then I should see "Student 1" in the "Activity results" "block"
And I should see "90.00" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores as percentages
Given I add the "Activity results" block to the default region with:
| config_showbest | 3 |
| config_showworst | 0 |
| config_gradeformat | Percentages |
| config_nameformat | Display full names |
| config_decimalpoints | 0 |
Then I should see "Student 1" in the "Activity results" "block"
And I should see "90%" in the "Activity results" "block"
And I should see "Student 2" in the "Activity results" "block"
And I should see "80%" in the "Activity results" "block"
And I should see "Student 3" in the "Activity results" "block"
And I should see "70%" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores as fractions
Given I add the "Activity results" block to the default region with:
| config_showbest | 3 |
| config_showworst | 0 |
| config_gradeformat | Fractions |
| config_nameformat | Display full names |
Then I should see "Student 1" in the "Activity results" "block"
And I should see "90.00/100.00" in the "Activity results" "block"
And I should see "Student 2" in the "Activity results" "block"
And I should see "80.00/100.00" in the "Activity results" "block"
And I should see "Student 3" in the "Activity results" "block"
And I should see "70.00/100.00" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers
Given I add the "Activity results" block to the default region with:
| config_showbest | 3 |
| config_showworst | 0 |
| config_gradeformat | Absolute numbers |
| config_nameformat | Display full names |
Then I should see "Student 1" in the "Activity results" "block"
And I should see "90.00" in the "Activity results" "block"
And I should see "Student 2" in the "Activity results" "block"
And I should see "80.00" in the "Activity results" "block"
And I should see "Student 3" in the "Activity results" "block"
And I should see "70.00" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
Given the following config values are set as admin:
| showuseridentity | idnumber,email |
And I add the "Activity results" block to the default region with:
| config_showbest | 3 |
| config_showworst | 0 |
| config_gradeformat | Percentages |
| config_nameformat | Display only ID numbers |
Then I should see "User S1" in the "Activity results" "block"
And I should see "90.00%" in the "Activity results" "block"
And I should see "User S2" in the "Activity results" "block"
And I should see "80.00%" in the "Activity results" "block"
And I should see "User S3" in the "Activity results" "block"
And I should see "70.00%" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
Given I add the "Activity results" block to the default region with:
| config_showbest | 3 |
| config_showworst | 0 |
| config_gradeformat | Percentages |
| config_nameformat | Anonymous results |
Then I should see "User" in the "Activity results" "block"
And I should see "90.00%" in the "Activity results" "block"
And I should see "80.00%" in the "Activity results" "block"
And I should see "70.00%" in the "Activity results" "block"