1 |
efrain |
1 |
@core @core_grades
|
|
|
2 |
Feature: Teacher can unhide grades on the edit page allowing students to view their grades
|
|
|
3 |
In order to show the grades of an activity to a student
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to unhide an activity on the edit page
|
|
|
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 |
|
|
|
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 |
And the following "activities" exist:
|
|
|
20 |
| activity | course | idnumber | name | intro | assignfeedback_comments_enabled |
|
|
|
21 |
| assign | C1 | assign1 | Test assignment name | Test assignment description | 1 |
|
|
|
22 |
And I am on the "Test assignment name" "assign activity" page logged in as teacher1
|
|
|
23 |
And I follow "View all submissions"
|
|
|
24 |
And I click on "Grade" "link" in the "Student 1" "table_row"
|
|
|
25 |
And I set the following fields to these values:
|
|
|
26 |
| Grade out of 100 | 50 |
|
|
|
27 |
| Feedback comments | I'm the teacher feedback |
|
|
|
28 |
And I press "Save changes"
|
|
|
29 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
|
|
|
30 |
And I should see "50.00"
|
|
|
31 |
And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row"
|
|
|
32 |
And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1"
|
|
|
33 |
|
|
|
34 |
@javascript
|
|
|
35 |
Scenario: Hiding the activity using the drop-down hide link and then unhiding the activity using the edit settings form page
|
|
|
36 |
Given I hide the grade item "Test assignment name" of type "gradeitem" on "setup" page
|
|
|
37 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
|
|
|
38 |
And I should not see "50.00"
|
|
|
39 |
And I should not see "I'm the teacher feedback"
|
|
|
40 |
And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1"
|
|
|
41 |
And I click on grade item menu "Test assignment name" of type "gradeitem" on "setup" page
|
|
|
42 |
And I choose "Edit grade item" in the open action menu
|
|
|
43 |
And the field "Hidden" matches value "1"
|
|
|
44 |
And I set the field "Hidden" to "0"
|
|
|
45 |
And I click on "Save" "button" in the "Edit grade item" "dialogue"
|
|
|
46 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
|
|
|
47 |
Then I should see "50.00"
|
|
|
48 |
And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row"
|
|
|
49 |
|
|
|
50 |
@javascript
|
|
|
51 |
Scenario: Hiding the activity using the edit settings form page and then unhiding the activity using the drop-down show link
|
|
|
52 |
Given I click on grade item menu "Test assignment name" of type "gradeitem" on "setup" page
|
|
|
53 |
And I choose "Edit grade item" in the open action menu
|
|
|
54 |
And I set the field "Hidden" to "1"
|
|
|
55 |
And I click on "Save" "button" in the "Edit grade item" "dialogue"
|
|
|
56 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
|
|
|
57 |
And I should not see "50.00"
|
|
|
58 |
And I should not see "I'm the teacher feedback"
|
|
|
59 |
And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1"
|
|
|
60 |
And I click on grade item menu "Test assignment name" of type "gradeitem" on "setup" page
|
|
|
61 |
And I choose "Show" in the open action menu
|
|
|
62 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
|
|
|
63 |
Then I should see "50.00"
|
|
|
64 |
And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row"
|
|
|
65 |
|
|
|
66 |
@javascript
|
|
|
67 |
Scenario: Hiding the category using the drop-down hide link and then unhiding the category using the edit settings form page
|
|
|
68 |
Given I hide the grade item "Course 1" of type "course" on "setup" page
|
|
|
69 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
|
|
|
70 |
And I should not see "50.00"
|
|
|
71 |
And I should not see "I'm the teacher feedback"
|
|
|
72 |
And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1"
|
|
|
73 |
And I click on grade item menu "Course 1" of type "course" on "setup" page
|
|
|
74 |
And I choose "Edit category" in the open action menu
|
|
|
75 |
And the field "Hidden" matches value "1"
|
|
|
76 |
And I set the field "Hidden" to "0"
|
|
|
77 |
And I click on "Save" "button" in the "Edit category" "dialogue"
|
|
|
78 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
|
|
|
79 |
Then I should see "50.00"
|
|
|
80 |
And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row"
|
|
|
81 |
|
|
|
82 |
@javascript
|
|
|
83 |
Scenario: Hiding the category using the edit settings form page and then unhiding the category using the drop-down show link
|
|
|
84 |
Given I set the following settings for grade item "Course 1" of type "course" on "setup" page:
|
|
|
85 |
| Hidden | 1 |
|
|
|
86 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
|
|
|
87 |
And I should not see "50.00"
|
|
|
88 |
And I should not see "I'm the teacher feedback"
|
|
|
89 |
And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1"
|
|
|
90 |
And I click on grade item menu "Course 1" of type "course" on "setup" page
|
|
|
91 |
And I choose "Show" in the open action menu
|
|
|
92 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
|
|
|
93 |
Then I should see "50.00"
|
|
|
94 |
And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row"
|