Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | 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
1441 ariadna 31
    And I go to "Student 1" "Test assignment name" activity advanced grading page
1 efrain 32
    And I set the field "Grade out of 100" to "40"
33
    And I press "Save changes"
34
    And I follow "View all submissions"
35
    And "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
36
    And I am on the "Test assignment name" "assign activity" page
37
 
38
  Scenario: Update the max grade for an assignment without rescaling existing grades
39
    Given I navigate to "Settings" in current page administration
40
    And I expand all fieldsets
41
    And I set the field "Rescale existing grades" to "No"
42
    And I set the field "Maximum grade" to "80"
43
    When I press "Save and display"
1441 ariadna 44
    And I navigate to "Submissions" in current page administration
1 efrain 45
    Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
46
 
47
  Scenario: Update an assignment without touching the max grades
48
    Given I navigate to "Settings" in current page administration
49
    And I expand all fieldsets
50
    And I set the field "Rescale existing grades" to "No"
51
    And I set the field "Maximum grade" to "80"
52
    And I press "Save and display"
53
    And I navigate to "Settings" in current page administration
54
    And I press "Save and display"
55
    And I navigate to "Settings" in current page administration
56
    And I expand all fieldsets
57
    And I set the field "Rescale existing grades" to "Yes"
58
    And I set the field "Maximum grade" to "80"
59
    When I press "Save and display"
1441 ariadna 60
    And I navigate to "Submissions" in current page administration
1 efrain 61
    Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
62
 
63
  Scenario: Update the max grade for an assignment rescaling existing grades
64
    Given I navigate to "Settings" in current page administration
65
    And I expand all fieldsets
66
    And I set the field "Rescale existing grades" to "Yes"
67
    And I set the field "Maximum grade" to "50"
68
    When I press "Save and display"
1441 ariadna 69
    And I navigate to "Submissions" in current page administration
1 efrain 70
    Then "Student 1" row "Grade" column of "generaltable" table should contain "20.00"
71
 
72
  Scenario: Rescaling should not produce negative grades
1441 ariadna 73
    Given I change window size to "large"
74
    And I go to "Student 2" "Test assignment name" activity advanced grading page
75
    And I change window size to "medium"
1 efrain 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"
1441 ariadna 83
    And I navigate to "Submissions" in current page administration
1 efrain 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"