Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_assign
2
Feature: View the grading status of an assignment
3
  In order to test the grading status for assignments is displaying correctly
4
  As a student
5
  I need to view my grading status
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
      | student2 | Student | 2 | student2@example.com |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
      | student2 | C1 | student |
21
 
22
  @javascript
23
  Scenario: View the grading status for an assignment with marking workflow enabled
24
    Given the following "activity" exists:
25
      | activity                            | assign                  |
26
      | course                              | C1                      |
27
      | name                                | Test assignment name    |
28
      | intro                               | Submit your online text |
29
      | submissiondrafts                    | 0                       |
30
      | markingworkflow                     | 1                       |
31
      | assignfeedback_comments_enabled     | 1                       |
32
      | assignsubmission_onlinetext_enabled | 1                       |
33
    # Add a submission.
34
    And the following "mod_assign > submissions" exist:
35
      | assign                | user      | onlinetext                        |
36
      | Test assignment name  | student1  | I'm the student first submission  |
37
    # Mark the submission.
38
    And I am on the "Test assignment name" "assign activity" page logged in as teacher1
39
    And I follow "View all submissions"
40
    And I should see "Not marked" in the "Student 1" "table_row"
41
    And I click on "Grade" "link" in the "Student 1" "table_row"
42
    And I should see "1 of 2"
43
    And I click on "Change filters" "link"
44
    And I set the field "Filter" to "submitted"
45
    And I should see "1 of 1"
46
    And I set the field "Grade out of 100" to "50"
47
    And I set the field "Marking workflow state" to "In review"
48
    And I set the field "Feedback comments" to "Great job! Lol, not really."
49
    And I set the field "Notify student" to "0"
50
    And I press "Save changes"
51
    And I am on the "Test assignment name" "assign activity" page
52
    And I follow "View all submissions"
53
    And I should see "In review" in the "Student 1" "table_row"
54
    And I log out
55
    # View the grading status as a student.
56
    And I am on the "Test assignment name" "assign activity" page logged in as student1
57
    And I should see "In review" in the "Grading status" "table_row"
58
    And I should not see "Great job! Lol, not really."
59
    And I log out
60
    # Mark the submission again but set the marking workflow to 'Released'.
61
    And I am on the "Test assignment name" "assign activity" page logged in as teacher1
62
    And I follow "View all submissions"
63
    And I should see "In review" in the "Student 1" "table_row"
64
    And I click on "Grade" "link" in the "Student 1" "table_row"
65
    And I should see "1 of 1"
66
    And I set the field "Marking workflow state" to "Released"
67
    And I press "Save changes"
68
    And I follow "View all submissions"
69
    And I should see "Released" in the "Student 1" "table_row"
70
    And I log out
71
    # View the grading status as a student.
72
    And I am on the "Test assignment name" "assign activity" page logged in as student1
73
    And I should see "Released" in the "Grading status" "table_row"
74
    And I should see "Great job! Lol, not really."
75
    And I log out
76
    # Now, change the status from 'Released' to 'In marking' (this will remove the grade from the gradebook).
77
    And I am on the "Test assignment name" "assign activity" page logged in as teacher1
78
    And I follow "View all submissions"
79
    And I should see "Released" in the "Student 1" "table_row"
80
    And I click on "Grade" "link" in the "Student 1" "table_row"
81
    And I should see "1 of 1"
82
    And I set the field "Marking workflow state" to "In marking"
83
    And I set the field "Notify student" to "0"
84
    And I press "Save changes"
85
    And I am on the "Test assignment name" "assign activity" page
86
    And I follow "View all submissions"
87
    And I should see "In marking" in the "Student 1" "table_row"
88
    # The grade should also remain displayed as it's stored in the assign DB tables, but the final grade should be empty.
89
    And "Student 1" row "Grade" column of "generaltable" table should contain "50.00"
90
    And "Student 1" row "Final grade" column of "generaltable" table should contain "-"
91
    And I click on "Grade" "link" in the "Student 1" "table_row"
92
    And I click on "Change filters" "link"
93
    And I set the field "Workflow filter" to "In review"
94
    And I should see "0 of 0"
95
 
96
  @javascript
97
  Scenario: View the grading status for an assignment with marking workflow disabled
98
    Given the following "activity" exists:
99
      | activity                            | assign                  |
100
      | course                              | C1                      |
101
      | name                                | Test assignment name    |
102
      | intro                               | Submit your online text |
103
      | submissiondrafts                    | 0                       |
104
      | assignfeedback_comments_enabled     | 1                       |
105
      | markingworkflow                     | 0                       |
106
      | assignsubmission_onlinetext_enabled | 1                       |
107
    # Add a submission.
108
    And the following "mod_assign > submissions" exist:
109
      | assign                | user      | onlinetext                        |
110
      | Test assignment name  | student1  | I'm the student first submission  |
111
    # Mark the submission.
112
    And I am on the "Test assignment name" "assign activity" page logged in as teacher1
113
    And I follow "View all submissions"
114
    And I should not see "Graded" in the "Student 1" "table_row"
115
    And I click on "Grade" "link" in the "Student 1" "table_row"
116
    And I should see "1 of 2"
117
    And I click on "Change filters" "link"
118
    And I set the field "Filter" to "submitted"
119
    And I should see "1 of 1"
120
    And I set the field "Grade out of 100" to "50"
121
    And I set the field "Feedback comments" to "Great job! Lol, not really."
122
    And I press "Save changes"
123
    And I click on "Edit settings" "link"
124
    And I am on the "Test assignment name" "assign activity" page
125
    And I follow "View all submissions"
126
    And I should see "Graded" in the "Student 1" "table_row"
127
    And I log out
128
    # View the grading status as a student.
129
    And I am on the "Test assignment name" "assign activity" page logged in as student1
130
    And I should see "Graded" in the "Grading status" "table_row"
131
    And I should see "Great job! Lol, not really."
132
    And I log out
133
    # Student makes a subsequent submission.
134
    And I am on the "Test assignment name" "assign activity" page logged in as student1
135
    And I press "Edit submission"
136
    And I set the following fields to these values:
137
      | Online text | I'm the student's second submission |
138
    And I press "Save changes"
139
    And I log out
140
    # Teacher marks the submission again after noticing the 'Graded - resubmitted'.
141
    And I am on the "Test assignment name" "assign activity" page logged in as teacher1
142
    And I follow "View all submissions"
143
    And I should see "Graded - resubmitted" in the "Student 1" "table_row"
144
    And I wait "10" seconds
145
    And I click on "Grade" "link" in the "Student 1" "table_row"
146
    And I should see "1 of 1"
147
    And I set the field "Grade out of 100" to "99.99"
148
    And I set the field "Feedback comments" to "Even better job! Really."
149
    And I press "Save changes"
150
    And I click on "Edit settings" "link"
151
    And I am on the "Test assignment name" "assign activity" page
152
    And I follow "View all submissions"
153
    And I should see "Graded" in the "Student 1" "table_row"
154
    And I log out
155
    # View the grading status as a student again.
156
    And I am on the "Test assignment name" "assign activity" page logged in as student1
157
    And I should see "Graded" in the "Grading status" "table_row"
158
    And I should see "Even better job! Really."