Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@mod @mod_assign @assign_grade
1 efrain 2
Feature: Check that the assignment grade can be updated correctly
3
  In order to ensure that the grade is shown correctly in the grading table
4
  As a teacher
5
  I need to grade a student and ensure the grade is shown correctly
6
 
7
  @javascript
8
  Scenario: Update the grade for an assignment
9
    Given the following "courses" exist:
10
      | fullname | shortname | category | groupmode |
11
      | Course 1 | C1 | 0 | 1 |
12
    And the following "users" exist:
13
      | username | firstname | lastname | email |
14
      | teacher1 | Teacher | 1 | teacher1@example.com |
15
      | student1 | Student | 1 | student10@example.com |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
    And the following "groups" exist:
21
      | name     | course  | idnumber  |
22
      | Group 1  | C1      | G1        |
23
    And the following "activity" exists:
24
      | activity         | assign                      |
25
      | course           | C1                          |
26
      | name             | Test assignment name        |
27
      | intro            | Test assignment description |
28
      | markingworkflow  | 1                           |
29
      | submissiondrafts | 0                           |
30
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 31
    Then I change window size to "large"
32
    And I go to "Student 1" "Test assignment name" activity advanced grading page
1 efrain 33
    And I set the field "Grade out of 100" to "50"
34
    And I set the field "Notify student" to "0"
35
    And I press "Save changes"
36
    And I follow "View all submissions"
37
    And "Student 1" row "Grade" column of "generaltable" table should contain "50.00"
38
 
39
  @javascript
40
  Scenario: Update the grade for a team assignment
41
    Given the following "courses" exist:
42
      | fullname | shortname | category | groupmode |
43
      | Course 1 | C1 | 0 | 1 |
44
    And the following "users" exist:
45
      | username | firstname | lastname | email |
46
      | teacher1 | Teacher | 1 | teacher1@example.com |
47
      | student1 | Student | 1 | student10@example.com |
48
    And the following "course enrolments" exist:
49
      | user | course | role |
50
      | teacher1 | C1 | editingteacher |
51
      | student1 | C1 | student |
52
    And the following "groups" exist:
53
      | name | course | idnumber |
54
      | Group 1 | C1 | G1 |
55
    And the following "activity" exists:
56
      | activity         | assign                      |
57
      | course           | C1                          |
58
      | name             | Test assignment name        |
59
      | intro            | Test assignment description |
60
      | markingworkflow  | 1                           |
61
      | submissiondrafts | 0                           |
62
      | teamsubmission   | 1                           |
63
      | groupmode        | 0                           |
64
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 65
    When I change window size to "large"
66
    And I go to "Student 1" "Test assignment name" activity advanced grading page
67
    And I change window size to "medium"
1 efrain 68
    And I set the field "Grade out of 100" to "50"
69
    And I set the field "Notify student" to "0"
70
    And I press "Save changes"
71
    And I follow "View all submissions"
72
    Then "Student 1" row "Grade" column of "generaltable" table should contain "50.00"
1441 ariadna 73
 
74
  @javascript
75
  Scenario: Update the grade for an assignment with penalty
76
    Given the following "courses" exist:
77
      | fullname | shortname | category | groupmode |
78
      | Course 1 | C1 | 0 | 1 |
79
    And the following "users" exist:
80
      | username | firstname | lastname | email |
81
      | teacher1 | Teacher | 1 | teacher1@example.com |
82
      | student1 | Student | 1 | student10@example.com |
83
    And the following "course enrolments" exist:
84
      | user | course | role |
85
      | teacher1 | C1 | editingteacher |
86
      | student1 | C1 | student |
87
    And the following "groups" exist:
88
      | name     | course  | idnumber  |
89
      | Group 1  | C1      | G1        |
90
    And I enable grade penalties for assignment
91
    And the following "activity" exists:
92
      | activity                             | assign                      |
93
      | course                               | C1                          |
94
      | name                                 | Test assignment name        |
95
      | intro                                | Test assignment description |
96
      | grade                                | 100                         |
97
      | duedate                              | ##yesterday##               |
98
      | gradepenalty                         | 1                           |
99
      | assignsubmission_onlinetext_enabled  | 1                           |
100
      | submissiondrafts                     | 0                           |
101
    # Add a submission.
102
    And the following "mod_assign > submissions" exist:
103
      | assign                | user      | onlinetext                        |
104
      | Test assignment name  | student1  | I'm the student first submission  |
105
    And I am on the "Test assignment name" Activity page logged in as teacher1
106
    And I change window size to "large"
107
    And I go to "Student 1" "Test assignment name" activity advanced grading page
108
    When I set the field "Grade out of 100" to "90"
109
    And I set the field "Notify student" to "0"
110
    And I press "Save changes"
111
    Then the "data-bs-original-title" attribute of ".penalty-indicator-icon" "css_element" should contain "Late penalty applied -10.00 marks"
112
    And I follow "View all submissions"
113
    And "Student 1" row "Grade" column of "submissions" table should contain "90.00"
114
    And "Student 1" row "Final grade" column of "submissions" table should contain "80.00"
115
    And the "data-bs-original-title" attribute of ".penalty-indicator-icon" "css_element" should contain "Late penalty applied -10.00 marks"
116
    # Override the grade.
117
    And I am on the "Course 1" "grades > Grader report > View" page
118
    And the following should exist in the "user-grades" table:
119
      | -1-                | -2-                   | -3-       | -4-      |
120
      | Student 1          | student10@example.com | 80        | 80       |
121
    And the "data-bs-original-title" attribute of ".penalty-indicator-icon" "css_element" should contain "Late penalty applied -10.00 marks"
122
    And I turn editing mode on
123
    And I set the following fields to these values:
124
      | Student 1 Test assignment name grade | 100 |
125
    And I click on "Save changes" "button"
126
    And I turn editing mode off
127
    And the following should exist in the "user-grades" table:
128
      | -1-                | -2-                   | -3-       | -4-      |
129
      | Student 1          | student10@example.com | 100       | 100      |
130
    And ".penalty-indicator-icon" "css_element" should not exist
131
    And I go to "Student 1" "Test assignment name" activity advanced grading page
132
    And ".penalty-indicator-icon" "css_element" should not exist
133
    And I follow "View all submissions"
134
    And ".penalty-indicator-icon" "css_element" should not exist