Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_forum @core_grades @javascript
2
Feature: I can grade a students interaction across a forum
3
  In order to assess a student's contributions
4
  As a teacher
5
  I can assign grades to a student based on their contributions
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Teacher | 1 | teacher1@example.com |
11
      | student1 | Student | 1 | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | format | numsections |
14
      | Course 1 | C1 | weeks | 5 |
15
    And the following "grade categories" exist:
16
      | fullname | course |
17
      | Tutor | C1 |
18
      | Peers | C1 |
19
    And the following "course enrolments" exist:
20
      | user | course | role |
21
      | teacher1 | C1 | editingteacher |
22
      | student1 | C1 | student |
23
    And the following "scales" exist:
24
      | name | scale |
25
      | Test Scale 1 | Disappointing, Good, Very good, Excellent |
26
    And the following "activity" exists:
27
      | activity    | forum        |
28
      | course      | C1           |
29
      | idnumber    | 0001         |
30
      | name        | Test Forum 1 |
31
    And I log in as "teacher1"
32
    And I change window size to "large"
33
    And I am on "Course 1" course homepage with editing mode on
34
 
35
  Scenario: Ensure that forum grade settings do not leak to Ratings
36
    Given I am on the "Test Forum 1" "forum activity editing" page
37
    And I expand all fieldsets
38
 
39
    # Fields should be hidden when grading is not set.
40
    When I set the field "Whole forum grading > Type" to "None"
41
    Then "Whole forum grading > Grade to pass" "field" should not be visible
42
    And "Whole forum grading > Grade category" "field" should not be visible
43
    And "Whole forum grading > Maximum grade" "field" should not be visible
44
    And "Ratings > Grade to pass" "field" should not be visible
45
    And "Ratings > Grade category" "field" should not be visible
46
    And "Ratings > Maximum grade" "field" should not be visible
47
 
48
    # Only Whole forum grading fields should be visible.
49
    When I set the field "Whole forum grading > Type" to "Point"
50
    Then "Whole forum grading > Grade to pass" "field" should be visible
51
    And "Whole forum grading > Grade category" "field" should be visible
52
    And "Whole forum grading > Maximum grade" "field" should be visible
53
    But "Ratings > Grade to pass" "field" should not be visible
54
    And "Ratings > Grade category" "field" should not be visible
55
    And "Ratings > Maximum grade" "field" should not be visible
56
 
57
    # Save some values.
58
    Given I set the field "Whole forum grading > Maximum grade" to "10"
59
    And I set the field "Whole forum grading > Grade category" to "Tutor"
60
    And I set the field "Whole forum grading > Grade to pass" to "4"
61
    When I press "Save and return to course"
62
    And I navigate to "View > Grader report" in the course gradebook
63
 
64
    # There shouldn't be any Ratings grade item.
65
    Then I should see "Test Forum 1 whole forum"
66
    But I should not see "Test Forum 1 rating"
67
 
68
    # The values saved should be reflected here.
69
    And I click on grade item menu "Test Forum 1 whole forum" of type "gradeitem" on "grader" page
70
    And I choose "Edit grade item" in the open action menu
71
    When I click on "Show more..." "link" in the ".modal-dialog" "css_element"
72
    Then the field "Maximum grade" matches value "10"
73
    Then the field "Grade to pass" matches value "4"
74
    And I should see "Tutor" in the "Parent category" "fieldset"
75
 
76
  Scenario: Ensure that Ratings settings do not leak to Forum grading
77
    Given I am on the "Test Forum 1" "forum activity editing" page
78
    And I expand all fieldsets
79
 
80
    # Fields should be hidden when grading is not set.
81
    When I set the field "Ratings > Aggregate type" to "No ratings"
82
    Then "Ratings > Type" "field" should not be visible
83
    And "Ratings > Grade to pass" "field" should not be visible
84
    And "Ratings > Grade category" "field" should not be visible
85
    And "Ratings > Maximum grade" "field" should not be visible
86
    And "Whole forum grading > Grade to pass" "field" should not be visible
87
    And "Whole forum grading > Grade category" "field" should not be visible
88
    And "Whole forum grading > Maximum grade" "field" should not be visible
89
 
90
    # Set to "Count of ratings"
91
    When I set the field "Ratings > Aggregate type" to "Count of ratings"
92
    Then "Ratings > Type" "field" should be visible
93
    When I set the field "Ratings > Type" to "None"
94
    Then "Ratings > Grade to pass" "field" should not be visible
95
    And "Ratings > Grade category" "field" should not be visible
96
    And "Ratings > Maximum grade" "field" should not be visible
97
    And "Whole forum grading > Grade to pass" "field" should not be visible
98
    And "Whole forum grading > Grade category" "field" should not be visible
99
    And "Whole forum grading > Maximum grade" "field" should not be visible
100
 
101
    # Use point grading
102
    When I set the field "Ratings > Type" to "Point"
103
    Then "Ratings > Grade to pass" "field" should be visible
104
    And "Ratings > Grade category" "field" should be visible
105
    And "Ratings > Maximum grade" "field" should be visible
106
    And "Whole forum grading > Grade to pass" "field" should not be visible
107
    And "Whole forum grading > Grade category" "field" should not be visible
108
    And "Whole forum grading > Maximum grade" "field" should not be visible
109
 
110
    # Save some values.
111
    Given I set the field "Ratings > Maximum grade" to "10"
112
    And I set the field "Ratings > Grade category" to "Tutor"
113
    And I set the field "Ratings > Grade to pass" to "4"
114
    When I press "Save and return to course"
115
    And I navigate to "View > Grader report" in the course gradebook
116
 
117
    # There shouldn't be any Whole forum grade gradeitem.
118
    Then I should see "Test Forum 1 rating"
119
    But I should not see "Test Forum 1 whole forum"
120
 
121
    # The values saved should be reflected here.
122
    And I click on grade item menu "Test Forum 1 rating" of type "gradeitem" on "grader" page
123
    And I choose "Edit grade item" in the open action menu
124
    When I click on "Show more..." "link" in the ".modal-dialog" "css_element"
125
    Then the field "Maximum grade" matches value "10"
126
    Then the field "Grade to pass" matches value "4"
127
    And I should see "Tutor" in the "Parent category" "fieldset"
128
 
129
  Scenario: Setting both a rating and a whole forum grade does not bleed
130
    Given I am on the "Test Forum 1" "forum activity editing" page
131
    And I expand all fieldsets
132
 
133
    And I set the field "Ratings > Aggregate type" to "Count of ratings"
134
    And I set the field "Ratings > Type" to "Point"
135
    And I set the field "Ratings > Maximum grade" to "100"
136
    And I set the field "Ratings > Grade category" to "Peers"
137
    And I set the field "Ratings > Grade to pass" to "40"
138
    And I set the field "Whole forum grading > Type" to "Point"
139
    And I set the field "Whole forum grading > Maximum grade" to "10"
140
    And I set the field "Whole forum grading > Grade category" to "Tutor"
141
    And I set the field "Whole forum grading > Grade to pass" to "4"
142
    And I press "Save and return to course"
143
    And I navigate to "View > Grader report" in the course gradebook
144
 
145
    # There shouldn't be any Whole forum grade gradeitem.
146
    Then I should see "Test Forum 1 rating"
147
    And I should see "Test Forum 1 whole forum"
148
 
149
    # The values saved should be reflected here.
150
    And I click on grade item menu "Test Forum 1 rating" of type "gradeitem" on "grader" page
151
    And I choose "Edit grade item" in the open action menu
152
    When I click on "Show more..." "link" in the ".modal-dialog" "css_element"
153
    Then the field "Maximum grade" matches value "100"
154
    Then the field "Grade to pass" matches value "40"
155
    And I should see "Peers" in the "Parent category" "fieldset"
156
    And I press "Cancel"
157
 
158
    And I click on grade item menu "Test Forum 1 whole forum" of type "gradeitem" on "grader" page
159
    And I choose "Edit grade item" in the open action menu
160
    When I click on "Show more..." "link" in the ".modal-dialog" "css_element"
161
    Then the field "Maximum grade" matches value "10"
162
    Then the field "Grade to pass" matches value "4"
163
    And I should see "Tutor" in the "Parent category" "fieldset"
164
 
165
  Scenario: Ensure that only gradable users are available in forum grading interface
166
    Given I am on the "Test Forum 1" "forum activity editing" page logged in as "admin"
167
    And I expand all fieldsets
168
    When I set the field "Whole forum grading > Type" to "Point"
169
    And I set the field "Whole forum grading > Maximum grade" to "10"
170
    And I set the field "Whole forum grading > Grade to pass" to "4"
171
    And I press "Save and display"
172
    And I press "Grade users"
173
    Then I should see "1 out of 1"
174
    And I should see "Student 1"
175
    And I should not see "Teacher 1"
176
    And I press "Save changes and proceed to the next user"
177
    And I should see "Student 1"
178
    And I should not see "Teacher 1"