Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_assign @javascript
2
Feature: Check that the assignment grade can be rescaled when the max grade is changed
3
  In order to ensure that the percentages are not affected by changes to the max grade
4
  As a teacher
5
  I need to rescale all grades when updating the max grade
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 | student10@example.com |
15
      | student2 | Student | 2 | student10@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
    And the following "groups" exist:
22
      | name | course | idnumber |
23
      | Group 1 | C1 | G1 |
24
    And the following "activity" exists:
25
      | activity         | assign                      |
26
      | course           | C1                          |
27
      | name             | Test assignment name        |
28
      | submissiondrafts | 0                           |
29
 
30
    And I am on the "Test assignment name" Activity page logged in as teacher1
31
    And I follow "View all submissions"
32
    And I click on "Grade" "link" in the "Student 1" "table_row"
33
    And I set the field "Grade out of 100" to "40"
34
    And I press "Save changes"
35
    And I follow "View all submissions"
36
    And "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
37
    And I am on the "Test assignment name" "assign activity" page
38
 
39
  Scenario: Update the max grade for an assignment without rescaling existing grades
40
    Given I navigate to "Settings" in current page administration
41
    And I expand all fieldsets
42
    And I set the field "Rescale existing grades" to "No"
43
    And I set the field "Maximum grade" to "80"
44
    When I press "Save and display"
45
    And I follow "View all submissions"
46
    Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
47
 
48
  Scenario: Update an assignment without touching the max grades
49
    Given I navigate to "Settings" in current page administration
50
    And I expand all fieldsets
51
    And I set the field "Rescale existing grades" to "No"
52
    And I set the field "Maximum grade" to "80"
53
    And I press "Save and display"
54
    And I navigate to "Settings" in current page administration
55
    And I press "Save and display"
56
    And I navigate to "Settings" in current page administration
57
    And I expand all fieldsets
58
    And I set the field "Rescale existing grades" to "Yes"
59
    And I set the field "Maximum grade" to "80"
60
    When I press "Save and display"
61
    And I follow "View all submissions"
62
    Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
63
 
64
  Scenario: Update the max grade for an assignment rescaling existing grades
65
    Given I navigate to "Settings" in current page administration
66
    And I expand all fieldsets
67
    And I set the field "Rescale existing grades" to "Yes"
68
    And I set the field "Maximum grade" to "50"
69
    When I press "Save and display"
70
    And I follow "View all submissions"
71
    Then "Student 1" row "Grade" column of "generaltable" table should contain "20.00"
72
 
73
  Scenario: Rescaling should not produce negative grades
74
    Given I follow "View all submissions"
75
    And I click on "Grade" "link" in the "Student 2" "table_row"
76
    And I wait until the page is ready
77
    And I am on the "Test assignment name" "assign activity" page
78
    And I navigate to "Settings" in current page administration
79
    And I expand all fieldsets
80
    And I set the field "Rescale existing grades" to "Yes"
81
    And I set the field "Maximum grade" to "50"
82
    When I press "Save and display"
83
    And I follow "View all submissions"
84
    # Make sure the student did not receive a negative grade.
85
    Then "Student 2" row "Grade" column of "generaltable" table should not contain "-0.50"