1 |
efrain |
1 |
@mod @mod_assign @_file_upload
|
|
|
2 |
Feature: Hide grader identities identity from students
|
|
|
3 |
In order to keep the grader's identity a secret
|
|
|
4 |
As a moodle teacher
|
|
|
5 |
I need to enable Hide Grader in the assignment settings
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | groupmode |
|
|
|
10 |
| Course 1 | C1 | 0 | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
| student1 | Student | 1 | student1@example.com |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
# Set up the test assignment
|
|
|
20 |
And the following "activity" exists:
|
|
|
21 |
| activity | assign |
|
|
|
22 |
| course | C1 |
|
|
|
23 |
| name | Test assignment name |
|
|
|
24 |
| submissiondrafts | 0 |
|
|
|
25 |
| teamsubmission | 1 |
|
|
|
26 |
| asignsubmission_onlinetext_enabled | 0 |
|
|
|
27 |
| assignsubmission_file_enabled | 1 |
|
|
|
28 |
| assignsubmission_file_maxfiles | 2 |
|
|
|
29 |
| assignsubmission_file_maxsizebytes | 1000000 |
|
|
|
30 |
| assignfeedback_comments_enabled | 1 |
|
|
|
31 |
| hidegrader | 0 |
|
|
|
32 |
And the following "mod_assign > submission" exists:
|
|
|
33 |
| assign | Test assignment name |
|
|
|
34 |
| user | student1 |
|
|
|
35 |
| file | lib/tests/fixtures/empty.txt |
|
|
|
36 |
|
|
|
37 |
# Grade the submission and leave feedback
|
|
|
38 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
39 |
And I follow "View all submissions"
|
|
|
40 |
And I should not see "Graded" in the "Student 1" "table_row"
|
|
|
41 |
And I click on "Grade" "link" in the "Student 1" "table_row"
|
|
|
42 |
And I set the field "Grade out of 100" to "50"
|
|
|
43 |
And I set the field "Feedback comments" to "Catch for us the foxes."
|
|
|
44 |
And I press "Save changes"
|
|
|
45 |
And I follow "Test assignment name"
|
|
|
46 |
And I follow "View all submissions"
|
|
|
47 |
And I should see "Graded" in the "Student 1" "table_row"
|
|
|
48 |
And I log out
|
|
|
49 |
|
|
|
50 |
@javascript
|
|
|
51 |
Scenario: Hidden grading is disabled.
|
|
|
52 |
Given I am on the "Test assignment name" Activity page logged in as student1
|
|
|
53 |
Then I should see "Graded" in the "Grading status" "table_row"
|
|
|
54 |
And I should see "Catch for us the foxes."
|
|
|
55 |
And I should see "Teacher" in the "Graded by" "table_row"
|
|
|
56 |
|
|
|
57 |
@javascript
|
|
|
58 |
Scenario: Hidden grading is enabled.
|
|
|
59 |
# Enable the hidden grader option
|
|
|
60 |
Given I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
61 |
And I navigate to "Settings" in current page administration
|
|
|
62 |
And I click on "Expand all" "link" in the "region-main" "region"
|
|
|
63 |
And I set the field "Hide grader identity from students" to "1"
|
|
|
64 |
And I press "Save and return to course"
|
|
|
65 |
And I log out
|
|
|
66 |
|
|
|
67 |
# Check the student doesn't see the grader's identity
|
|
|
68 |
When I am on the "Test assignment name" Activity page logged in as student1
|
|
|
69 |
Then I should see "Graded" in the "Grading status" "table_row"
|
|
|
70 |
And I should see "Catch for us the foxes."
|
|
|
71 |
And I should not see "Graded by"
|
|
|
72 |
|
|
|
73 |
@javascript
|
|
|
74 |
Scenario: Hidden grading is enabled, but students have the 'view' capability.
|
|
|
75 |
Given the following "permission overrides" exist:
|
|
|
76 |
| capability | permission | role | contextlevel | reference |
|
|
|
77 |
| mod/assign:showhiddengrader | Allow | student | Course | C1 |
|
|
|
78 |
When I am on the "Test assignment name" Activity page logged in as student1
|
|
|
79 |
And I should see "Graded" in the "Grading status" "table_row"
|
|
|
80 |
And I should see "Catch for us the foxes."
|
|
|
81 |
And I should see "Teacher" in the "Graded by" "table_row"
|