source: moodle/trunk/fuentes/grade/report/singleview/tests/behat/bulk_insert_grades.feature @ 1331

Last change on this file since 1331 was 1331, checked in by jrpelegrina, 3 years ago

Updated to moodle 3.0.3

File size: 4.9 KB
Line 
1@core @core_grades @gradereport_singleview
2Feature: 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
32  @javascript
33  Scenario: I can bulk insert grades and check their override flags for grade view.
34    Given I log in as "teacher1"
35    And I follow "Course 1"
36    And I follow "Test assignment one"
37    And I follow "View/grade all submissions"
38    And I follow "Grade Student 1"
39    And I set the following fields to these values:
40      | Grade out of 100 | 50 |
41    And I press "Save changes"
42    And I press "Continue"
43    And I follow "View gradebook"
44    And I follow "Single view for Test assignment one"
45    Then the field "Grade for james (Student) 1" matches value "50.00"
46    And the field "Override for james (Student) 1" matches value "0"
47    And I click on "Perform bulk insert" "checkbox"
48    And I set the field "Insert value" to "1.0"
49    And I press "Save"
50    And I press "Continue"
51    And the field "Grade for james (Student) 1" matches value "50.00"
52    And the field "Override for james (Student) 1" matches value "0"
53    And the field "Grade for holly (Student) 2" matches value "1.00"
54    And the field "Override for holly (Student) 2" matches value "1"
55    And the field "Grade for anna (Student) 3" matches value "1.00"
56    And the field "Override for anna (Student) 3" matches value "1"
57    And the field "Grade for zac (Student) 4" matches value "1.00"
58    And the field "Override for zac (Student) 4" matches value "1"
59    And I click on "All grades" "option"
60    And I click on "Perform bulk insert" "checkbox"
61    And I set the field "Insert value" to "2.0"
62    And I press "Save"
63    And I press "Continue"
64    And the field "Grade for james (Student) 1" matches value "2.00"
65    And the field "Override for james (Student) 1" matches value "1"
66    And the field "Grade for holly (Student) 2" matches value "2.00"
67    And the field "Override for holly (Student) 2" matches value "1"
68    And the field "Grade for anna (Student) 3" matches value "2.00"
69    And the field "Override for anna (Student) 3" matches value "1"
70    And the field "Grade for zac (Student) 4" matches value "2.00"
71    And the field "Override for zac (Student) 4" matches value "1"
72
73  @javascript
74  Scenario: I can bulk insert grades and check their override flags for user view.
75    Given I log in as "teacher1"
76    And I follow "Course 1"
77    And I follow "Test assignment two"
78    And I follow "View/grade all submissions"
79    And I follow "Grade Student 1"
80    And I set the following fields to these values:
81      | Grade out of 100 | 50 |
82    And I press "Save changes"
83    And I press "Continue"
84    And I follow "View gradebook"
85    And I follow "Single view for Test assignment two"
86    And I click on "Student 1" "option"
87    Then the field "Grade for Test assignment two" matches value "50.00"
88    And the field "Override for Test assignment two" matches value "0"
89    And I click on "Perform bulk insert" "checkbox"
90    And I click on "Empty grades" "option"
91    And I set the field "Insert value" to "1.0"
92    And I press "Save"
93    And I press "Continue"
94    And the field "Grade for Test assignment two" matches value "50.00"
95    And the field "Override for Test assignment two" matches value "0"
96    And the field "Grade for Test assignment one" matches value "1.00"
97    And the field "Override for Test assignment one" matches value "1"
98    And the field "Grade for Test assignment three" matches value "1.00"
99    And the field "Override for Test assignment three" matches value "1"
100    And the field "Grade for Test assignment four" matches value "1.00"
101    And the field "Override for Test assignment four" matches value "1"
Note: See TracBrowser for help on using the repository browser.