1 |
efrain |
1 |
Feature: Locking Grade Items and Categories in Gradebook
|
|
|
2 |
In order to ensure that grade items and categories can be securely locked in the gradebook,
|
|
|
3 |
As a teacher,
|
|
|
4 |
I need to perform locking actions and verify the locking status.
|
|
|
5 |
|
|
|
6 |
Background:
|
|
|
7 |
Given the following "courses" exist:
|
|
|
8 |
| fullname | shortname |
|
|
|
9 |
| Course 1 | C1 |
|
|
|
10 |
And the following "users" exist:
|
|
|
11 |
| username | firstname | lastname |
|
|
|
12 |
| teacher1 | Teacher | 1 |
|
|
|
13 |
| student1 | Student | 1 |
|
|
|
14 |
| student2 | Student | 2 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
| student2 | C1 | student |
|
|
|
20 |
And the following "grade categories" exist:
|
|
|
21 |
| fullname | course |
|
|
|
22 |
| Category 1 | C1 |
|
|
|
23 |
And the following "grade items" exist:
|
|
|
24 |
| itemname | course | gradecategory |
|
|
|
25 |
| Manual grade 1 | C1 | Category 1 |
|
|
|
26 |
| Manual grade 2 | C1 | Category 1 |
|
|
|
27 |
And the following "grade items" exist:
|
|
|
28 |
| itemname | course |
|
|
|
29 |
| Manual grade 3 | C1 |
|
|
|
30 |
|
|
|
31 |
@javascript
|
|
|
32 |
Scenario: Locking and unlocking a grade item preserves individual student locks
|
|
|
33 |
Given I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
|
|
|
34 |
And I turn editing mode on
|
|
|
35 |
And I change window size to "large"
|
|
|
36 |
When I click on "Manual grade 1" "core_grades > grade_actions" in the "Student 1" "table_row"
|
|
|
37 |
And I choose "Lock" in the open action menu
|
|
|
38 |
And I click on grade item menu "Manual grade 1" of type "gradeitem" on "grader" page
|
|
|
39 |
And I choose "Lock" in the open action menu
|
|
|
40 |
And I click on grade item menu "Manual grade 1" of type "gradeitem" on "grader" page
|
|
|
41 |
And I choose "Unlock" in the open action menu
|
|
|
42 |
Then "Locked" "icon" should exist in the "Student 1" "table_row"
|
|
|
43 |
And "Locked" "icon" should not exist in the "Student 2" "table_row"
|
|
|
44 |
|
|
|
45 |
@javascript
|
|
|
46 |
Scenario: Locking and unlocking a grade item through editing form preserves individual student locks
|
|
|
47 |
Given I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
|
|
|
48 |
And I turn editing mode on
|
|
|
49 |
And I change window size to "large"
|
|
|
50 |
When I click on "Manual grade 1" "core_grades > grade_actions" in the "Student 1" "table_row"
|
|
|
51 |
And I choose "Edit grade" in the open action menu
|
|
|
52 |
And I set the field "Locked" to "1"
|
|
|
53 |
And I press "Save changes"
|
|
|
54 |
And I click on grade item menu "Manual grade 1" of type "gradeitem" on "grader" page
|
|
|
55 |
And I choose "Edit grade item" in the open action menu
|
|
|
56 |
And I set the field "Locked" to "1"
|
|
|
57 |
And I click on "Save" "button" in the "Edit grade item" "dialogue"
|
|
|
58 |
And I click on grade item menu "Manual grade 1" of type "gradeitem" on "grader" page
|
|
|
59 |
And I choose "Edit grade item" in the open action menu
|
|
|
60 |
And I set the field "Locked" to "0"
|
|
|
61 |
And I click on "Save" "button" in the "Edit grade item" "dialogue"
|
|
|
62 |
Then "Locked" "icon" should exist in the "Student 1" "table_row"
|
|
|
63 |
And "Locked" "icon" should not exist in the "Student 2" "table_row"
|