Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_grades @gradereport_singleview @javascript
2
Feature: We can bulk insert grades for students in a course
3
  As a teacher
4
  In order to quickly grade items
5
  I can bulk insert values for all or empty grades.
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category |
10
      | Course 1 | C1        | 0        |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email                | idnumber | alternatename |
13
      | teacher1 | Teacher   | 1        | teacher1@example.com | t1       | fred          |
14
      | student1 | Student   | 1        | student1@example.com | s1       | james         |
15
      | student2 | Student   | 2        | student1@example.com | s2       | holly         |
16
      | student3 | Student   | 3        | student1@example.com | s3       | anna          |
17
      | student4 | Student   | 4        | student1@example.com | s4       | zac           |
18
    And the following "course enrolments" exist:
19
      | user     | course | role           |
20
      | teacher1 | C1     | editingteacher |
21
      | student1 | C1     | student        |
22
      | student2 | C1     | student        |
23
      | student3 | C1     | student        |
24
      | student4 | C1     | student        |
25
    And the following "activities" exist:
26
      | activity | course | idnumber | name                  | intro             |
27
      | assign   | C1     | a1       | Test assignment one   | Submit something! |
28
      | assign   | C1     | a2       | Test assignment two   | Submit something! |
29
      | assign   | C1     | a3       | Test assignment three | Submit something! |
30
      | assign   | C1     | a4       | Test assignment four  | Submit nothing!   |
31
    And I am on the "Course 1" "Course" page logged in as "teacher1"
32
    And I turn editing mode on
33
 
34
  Scenario: I can not save bulk insert until I fill required form elements
35
    Given I navigate to "View > Grader report" in the course gradebook
36
    And I click on grade item menu "Test assignment one" of type "gradeitem" on "grader" page
37
    And I choose "Single view for this item" in the open action menu
38
    And I click on "Actions" "link"
39
    When I click on "Bulk insert" "link"
40
    And the "Empty grades" "radio" should be disabled
41
    And the "All grades" "radio" should be disabled
42
    And the "[name=bulkinsertmodal]" "css_element" should be disabled
43
    And the "[data-action=save]" "css_element" should be disabled
44
    And I click on "I understand that my unsaved changes will be lost." "checkbox"
45
    And the "Empty grades" "radio" should be enabled
46
    And the "All grades" "radio" should be enabled
47
    And the "[name=bulkinsertmodal]" "css_element" should be enabled
48
    And the "[data-action=save]" "css_element" should be disabled
49
    And I click on "Empty grades" "radio"
50
    And the "Empty grades" "radio" should be enabled
51
    And the "All grades" "radio" should be enabled
52
    And the "[name=bulkinsertmodal]" "css_element" should be enabled
53
    Then the "[data-action=save]" "css_element" should be enabled
54
 
55
  Scenario: I can bulk insert grades and check their override flags for grade view.
56
    Given I am on the "Test assignment one" "assign activity" page
1441 ariadna 57
    And I go to "Student 1" "Test assignment one" activity advanced grading page
1 efrain 58
    And I set the following fields to these values:
59
      | Grade out of 100 | 50 |
60
    And I press "Save changes"
61
    And I am on "Course 1" course homepage with editing mode on
62
    And I navigate to "View > Grader report" in the course gradebook
63
    And I click on grade item menu "Test assignment one" of type "gradeitem" on "grader" page
64
    And I choose "Single view for this item" in the open action menu
65
    And the field "Grade for Student 1" matches value "50.00"
66
    And the field "Override for Student 1" matches value "0"
67
    And I click on "Actions" "link"
68
    And I click on "Bulk insert" "link"
69
    And I click on "I understand that my unsaved changes will be lost." "checkbox"
70
    And I click on "Empty grades" "radio"
71
    And I set the field "Insert new grade" to "1.0"
72
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
73
    And the field "Grade for Student 1" matches value "50.00"
74
    And the field "Override for Student 1" matches value "0"
75
    And the field "Grade for Student 2" matches value "1.00"
76
    And the field "Override for Student 2" matches value "1"
77
    And the field "Grade for Student 3" matches value "1.00"
78
    And the field "Override for Student 3" matches value "1"
79
    And the field "Grade for Student 4" matches value "1.00"
80
    And the field "Override for Student 4" matches value "1"
81
 
82
    And I click on "Actions" "link"
83
    When I click on "Bulk insert" "link"
84
    And I click on "I understand that my unsaved changes will be lost." "checkbox"
85
    And I click on "All grades" "radio"
86
    And I set the field "Insert new grade" to "2.0"
87
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
88
    And the field "Grade for Student 1" matches value "2.00"
89
    And the field "Override for Student 1" matches value "1"
90
    And the field "Grade for Student 2" matches value "2.00"
91
    And the field "Override for Student 2" matches value "1"
92
    And the field "Grade for Student 3" matches value "2.00"
93
    And the field "Override for Student 3" matches value "1"
94
    And the field "Grade for Student 4" matches value "2.00"
95
    Then the field "Override for Student 4" matches value "1"
96
 
97
  Scenario: I can bulk insert grades and check their override flags for user view.
98
    Given I am on the "Test assignment two" "assign activity" page
1441 ariadna 99
    And I go to "Student 1" "Test assignment two" activity advanced grading page
1 efrain 100
    And I set the following fields to these values:
101
      | Grade out of 100 | 50 |
102
    And I press "Save changes"
103
    And I am on "Course 1" course homepage with editing mode on
104
    And I navigate to "View > Grader report" in the course gradebook
105
    And I click on user menu "Student 1"
106
    And I choose "Single view for this user" in the open action menu
107
    And the field "Grade for Test assignment two" matches value "50.00"
108
    And the field "Override for Test assignment two" matches value "0"
109
    And I click on "Actions" "link"
110
    When I click on "Bulk insert" "link"
111
    And I click on "I understand that my unsaved changes will be lost." "checkbox"
112
    And I click on "Empty grades" "radio"
113
    And I set the field "Insert new grade" to "1.0"
114
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
115
    And the field "Grade for Test assignment two" matches value "50.00"
116
    And the field "Override for Test assignment two" matches value "0"
117
    And the field "Grade for Test assignment one" matches value "1.00"
118
    And the field "Override for Test assignment one" matches value "1"
119
    And the field "Grade for Test assignment three" matches value "1.00"
120
    And the field "Override for Test assignment three" matches value "1"
121
    And the field "Grade for Test assignment four" matches value "1.00"
122
    Then the field "Override for Test assignment four" matches value "1"
123
 
124
  Scenario: I can not update grades if the value is out of bounds.
125
    Given I navigate to "View > Grader report" in the course gradebook
126
    And I click on grade item menu "Test assignment one" of type "gradeitem" on "grader" page
127
    And I choose "Single view for this item" in the open action menu
128
    And I click on "Actions" "link"
129
    When I click on "Bulk insert" "link"
130
    And I click on "I understand that my unsaved changes will be lost." "checkbox"
131
    And I click on "Empty grades" "radio"
132
    And I set the field "Insert new grade" to "-1"
133
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
134
    And I should see "The grade entered for Test assignment one for Student 1 is less than the minimum allowed"
135
    And I should see "The grade entered for Test assignment one for Student 2 is less than the minimum allowed"
136
    And I should see "The grade entered for Test assignment one for Student 3 is less than the minimum allowed"
137
    And I should see "The grade entered for Test assignment one for Student 4 is less than the minimum allowed"
138
    Then I should see "Grades were set for 0 items"