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 low 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
    And the following "courses" exist:
17
      | fullname | shortname | category |
18
      | Course 1 | C1 | 0 |
19
    And the following "course enrolments" exist:
20
      | user | course | role |
21
      | teacher1 | C1 | editingteacher |
22
      | student1 | C1 | student |
23
      | student2 | C1 | student |
24
      | student3 | C1 | student |
25
      | student4 | C1 | student |
26
      | student5 | C1 | student |
27
    And the following "activity" exists:
28
      | activity                      | assign          |
29
      | course                        | C1              |
30
      | idnumber                      | 0001            |
31
      | name                          | Test assignment |
32
      | assignsubmission_file_enabled | 0               |
33
    And the following "grade grades" exist:
34
      | gradeitem       | user     | grade |
35
      | Test assignment | student1 | 90.00 |
36
      | Test assignment | student2 | 80.00 |
37
      | Test assignment | student3 | 70.00 |
38
      | Test assignment | student4 | 60.00 |
39
      | Test assignment | student5 | 50.00 |
40
    And I log in as "teacher1"
41
    And I am on "Course 1" course homepage with editing mode on
42
 
43
  Scenario: Configure the block on the course page to show 1 low score
44
    Given I add the "Activity results" block to the default region with:
45
      | config_showbest | 0 |
46
      | config_showworst | 1 |
47
      | config_gradeformat | Percentages |
48
      | config_nameformat | Display full names |
49
      | config_decimalpoints | 0 |
50
    Then I should see "Student 5" in the "Activity results" "block"
51
    And I should see "50%" in the "Activity results" "block"
52
 
53
  Scenario: Try to configure the block on the course page to show 1 low score as a fraction
54
    Given I add the "Activity results" block to the default region with:
55
      | config_showbest | 0 |
56
      | config_showworst | 1 |
57
      | config_gradeformat | Fractions |
58
      | config_nameformat | Display full names |
59
    Then I should see "Student 5" in the "Activity results" "block"
60
    And I should see "50.00/100.00" in the "Activity results" "block"
61
 
62
  Scenario: Try to configure the block on the course page to show 1 low score as a absolute number
63
    Given I add the "Activity results" block to the default region with:
64
      | config_showbest | 0 |
65
      | config_showworst | 1 |
66
      | config_gradeformat | Absolute numbers |
67
      | config_nameformat | Display full names |
68
    Then I should see "Student 5" in the "Activity results" "block"
69
    And I should see "50.00" in the "Activity results" "block"
70
 
71
  Scenario: Try to configure the block on the course page to show multiple low scores as percentages
72
    Given I add the "Activity results" block to the default region with:
73
      | config_showbest | 0 |
74
      | config_showworst | 3 |
75
      | config_gradeformat | Percentages |
76
      | config_nameformat | Display full names |
77
      | config_decimalpoints | 0 |
78
    Then I should see "Student 5" in the "Activity results" "block"
79
    And I should see "50%" in the "Activity results" "block"
80
    And I should see "Student 4" in the "Activity results" "block"
81
    And I should see "60%" in the "Activity results" "block"
82
    And I should see "Student 3" in the "Activity results" "block"
83
    And I should see "70%" in the "Activity results" "block"
84
 
85
  Scenario: Try to configure the block on the course page to show multiple low scores as fractions
86
    Given I add the "Activity results" block to the default region with:
87
      | config_showbest | 0 |
88
      | config_showworst | 3 |
89
      | config_gradeformat | Fractions |
90
      | config_nameformat | Display full names |
91
    Then I should see "Student 5" in the "Activity results" "block"
92
    And I should see "50.00/100.00" in the "Activity results" "block"
93
    And I should see "Student 4" in the "Activity results" "block"
94
    And I should see "60.00/100.00" in the "Activity results" "block"
95
    And I should see "Student 3" in the "Activity results" "block"
96
    And I should see "70.00/100.00" in the "Activity results" "block"
97
 
98
  Scenario: Try to configure the block on the course page to show multiple low scores as absolute numbers
99
    Given I add the "Activity results" block to the default region with:
100
      | config_showbest | 0 |
101
      | config_showworst | 3 |
102
      | config_gradeformat | Absolute numbers |
103
      | config_nameformat | Display full names |
104
    Then I should see "Student 5" in the "Activity results" "block"
105
    And I should see "50.00" in the "Activity results" "block"
106
    And I should see "Student 4" in the "Activity results" "block"
107
    And I should see "60.00" in the "Activity results" "block"
108
    And I should see "Student 3" in the "Activity results" "block"
109
    And I should see "70.00" in the "Activity results" "block"
110
 
111
  Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers
112
    Given the following config values are set as admin:
113
      | showuseridentity | idnumber,email |
114
    And I add the "Activity results" block to the default region with:
115
      | config_showbest | 0 |
116
      | config_showworst | 3 |
117
      | config_gradeformat | Percentages |
118
      | config_nameformat | Display only ID numbers |
119
    Then I should see "User S5" in the "Activity results" "block"
120
    And I should see "50.00%" in the "Activity results" "block"
121
    And I should see "User S4" in the "Activity results" "block"
122
    And I should see "60.00%" in the "Activity results" "block"
123
    And I should see "User S3" in the "Activity results" "block"
124
    And I should see "70.00%" in the "Activity results" "block"
125
 
126
  Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names
127
    Given I add the "Activity results" block to the default region with:
128
      | config_showbest | 0 |
129
      | config_showworst | 3 |
130
      | config_gradeformat | Percentages |
131
      | config_nameformat | Anonymous results |
132
    Then I should see "User" in the "Activity results" "block"
133
    And I should see "50.00%" in the "Activity results" "block"
134
    And I should see "60.00%" in the "Activity results" "block"
135
    And I should see "70.00%" in the "Activity results" "block"