Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_grades
2
Feature: We can change the grading type and maximum grade point values
3
  In order to verify that we can change the system-level maximum grade point value
4
  As an admin
5
  I need to modify the system maximum grade point and ensure that activities can use the full range.
6
  I need to ensure that using scales for activities still works correctly.
7
  I need to ensure that the maximum grade point value is enforced for new and existing activities.
8
 
9
  Background:
10
    Given the following "courses" exist:
11
      | fullname | shortname | category | format |
12
      | Course 1 | C1 | 0 | topics |
13
    Given the following "activities" exist:
14
      | activity | course | idnumber | name              | intro             |
15
      | assign   | C1     | assign1  | Test Assignment 1 | Test Assignment 1 |
16
    And I log in as "admin"
17
    And I navigate to "Grades > General settings" in site administration
18
    And I set the following fields to these values:
19
      | Grade point maximum | 900 |
20
      | Grade point default | 800 |
21
    And I press "Save changes"
22
    And I am on "Course 1" course homepage
23
 
24
  @javascript
25
  Scenario: Validate that switching the type of grading used correctly disables input form elements
26
    Given I am on the "Test Assignment 1" "assign activity editing" page
27
    When I expand all fieldsets
28
    And I set the field "grade[modgrade_type]" to "Point"
29
    Then the "Scale" "select" should be disabled
30
    And the "Maximum grade" "field" should be enabled
31
    And I set the field "grade[modgrade_type]" to "Scale"
32
    And the "Maximum grade" "field" should be disabled
33
    Then the "Scale" "select" should be enabled
34
    And I set the field "grade[modgrade_type]" to "None"
35
    Then the "Scale" "select" should be disabled
36
    And the "Maximum grade" "field" should be disabled
37
    And I press "Save and return to course"
38
 
39
  @javascript
40
  Scenario: Create an activity with a maximum grade point value less than the system maximum
41
    Given I am on the "Test Assignment 1" "assign activity editing" page
42
    When I expand all fieldsets
43
    And I set the field "grade[modgrade_type]" to "point"
44
    And I set the field "grade[modgrade_point]" to "600"
45
    And I press "Save and display"
46
    And I am on the "Test Assignment 1" "assign activity editing" page
47
    Then the field "grade[modgrade_point]" matches value "600"
48
    And the "Scale" "select" should be disabled
49
    And I press "Save and return to course"
50
 
51
  @javascript
52
  Scenario: Create an activity with a scale as the grade type
53
    Given I am on the "Test Assignment 1" "assign activity editing" page
54
    When I expand all fieldsets
55
    And I set the field "grade[modgrade_type]" to "Scale"
56
    And I set the field "grade[modgrade_scale]" to "Separate and Connected ways of knowing"
57
    And I press "Save and display"
58
    And I am on the "Test Assignment 1" "assign activity editing" page
59
    Then the field "grade[modgrade_scale]" matches value "Separate and Connected ways of knowing"
60
    And the "Maximum grade" "field" should be disabled
61
    And I press "Save and return to course"
62
 
63
  @javascript
64
  Scenario: Create an activity with no grade as the grade type
65
    Given I am on the "Test Assignment 1" "assign activity editing" page
66
    When I expand all fieldsets
67
    And I set the field "grade[modgrade_type]" to "None"
68
    And I press "Save and display"
69
    And I am on the "Test Assignment 1" "assign activity editing" page
70
    And the "Scale" "select" should be disabled
71
    And the "Maximum grade" "field" should be disabled
72
    And I press "Save and return to course"
73
 
74
  Scenario: Create an activity with a maximum grade point value higher than the system maximum
75
    Given I am on the "Test Assignment 1" "assign activity editing" page
76
    When I expand all fieldsets
77
    And I set the field "grade[modgrade_type]" to "Point"
78
    And I set the field "grade[modgrade_point]" to "20000"
79
    And I press "Save and display"
80
    Then I should see "Invalid grade value. This must be an integer between 1 and 900"
81
    And I press "Cancel"
82
 
83
  Scenario: Create an activity with a valid maximum grade point and then change the system maximum to be lower
84
    Given I am on the "Test Assignment 1" "assign activity editing" page
85
    When I expand all fieldsets
86
    And I set the field "grade[modgrade_type]" to "point"
87
    And I set the field "grade[modgrade_point]" to "600"
88
    And I press "Save and display"
89
    And I navigate to "Grades > General settings" in site administration
90
    And I set the following fields to these values:
91
      | Grade point maximum | 100 |
92
    And I press "Save changes"
93
    And I am on the "Test Assignment 1" "assign activity editing" page
94
    And I press "Save and display"
95
    Then I should see "Invalid grade value. This must be an integer between 1 and 100"
96
    And I press "Cancel"