[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @gradereport @gradereport_grader 2 Feature: Using the AJAX grading feature of Grader report to update grades and feedback 3 In order to use AJAX grading 4 As a teacher 5 I need to be able to update and verify grades 6 7 8 Background: 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 | idnumber | 14 | teacher1 | Teacher | 1 | teacher1@example.com | t1 | 15 | student1 | Student | 1 | student1@example.com | s1 | 16 | student2 | Student | 2 | student2@example.com | s2 | 17 | student3 | Student | 3 | student3@example.com | s3 | 18 And the following "course enrolments" exist: 19 | user | course | role | 20 | teacher1 | C1 | editingteacher | 21 | student1 | C1 | student | 22 | student2 | C1 | student | 23 | student3 | C1 | student | 24 And the following "scales" exist: 25 | name | scale | 26 | Test Scale | Disappointing,Good,Very good,Excellent | 27 And the following "grade categories" exist: 28 | fullname | course | 29 | Grade Cat | C1 | 30 And the following "grade categories" exist: 31 | fullname | course | gradecategory | 32 | Grade Sub Cat | C1 | Grade Cat | 33 And the following "grade items" exist: 34 | itemname | course | locked | gradetype | gradecategory | 35 | Item 1 | C1 | 0 | value | Grade Cat | 36 | Item VU | C1 | 0 | value | Grade Cat | 37 | Item VL | C1 | 1 | value | Grade Cat | 38 | Item TU | C1 | 0 | text | Grade Cat | 39 | Item TL | C1 | 1 | text | Grade Cat | 40 | Item 3 | C1 | 0 | value | Grade Cat | 41 | Calc Item | C1 | 0 | value | Grade Cat | 42 | Item VUSub | C1 | 0 | value | Grade Sub Cat | 43 And the following "grade items" exist: 44 | itemname | course | locked | gradetype | scale | gradecategory | 45 | Item SU | C1 | 0 | scale | Test Scale | Grade Cat | 46 | Item SL | C1 | 1 | scale | Test Scale | Grade Cat | 47 And the following config values are set as admin: 48 | grade_report_showaverages | 0 | 49 | grade_report_enableajax | 1 | 50 51 @javascript 52 Scenario: Use the grader report without editing, with AJAX on and quick feedback off 53 When the following config values are set as admin: 54 | grade_overridecat | 1 | 55 | grade_report_showquickfeedback | 0 | 56 And I log in as "teacher1" 57 And I follow "Course 1" 58 And I navigate to "Grades" node in "Course administration" 59 And I click on student "Student 2" for grade item "Item VU" 60 Then I should see a grade field for "Student 2" and grade item "Item VU" 61 And I should not see a feedback field for "Student 2" and grade item "Item VU" 62 And I set the field "ajaxgrade" to "33" 63 And I press key "13" in the field "ajaxgrade" 64 And I should not see a grade field for "Student 2" and grade item "Item VU" 65 And I should not see a feedback field for "Student 2" and grade item "Item VU" 66 And I click on student "Student 3" for grade item "Item VU" 67 And I set the field "ajaxgrade" to "50" 68 And I press key "13" in the field "ajaxgrade" 69 And I click on student "Student 3" for grade item "Item 1" 70 And I set the field "ajaxgrade" to "80" 71 And I press key "13" in the field "ajaxgrade" 72 And I click on student "Student 3" for grade item "Item SU" 73 And I set the field "ajaxgrade" to "Very good" 74 And I press key "13" in the field "ajaxgrade" 75 And the following should exist in the "user-grades" table: 76 | -1- | -6- | -7- | -13- | -16- | 77 | Student 2 | - | 33.00 | - | 33.00 | 78 | Student 3 | 80.00 | 50.00 | Very good | 133.00 | 79 And I click on student "Student 3" for grade item "Item VL" 80 And I should not see a grade field for "Student 3" and grade item "Item VL" 81 And I should not see a feedback field for "Student 3" and grade item "Item VL" 82 And I click on student "Student 3" for grade item "Item SL" 83 And I should not see a grade field for "Student 3" and grade item "Item SL" 84 And I should not see a feedback field for "Student 3" and grade item "Item SL" 85 And I click on student "Student 3" for grade item "Item TU" 86 And I should not see a grade field for "Student 3" and grade item "Item TU" 87 And I should not see a feedback field for "Student 3" and grade item "Item TU" 88 And I click on student "Student 1" for grade item "Course total" 89 And I should see a grade field for "Student 1" and grade item "Course total" 90 And I should not see a feedback field for "Student 1" and grade item "Course total" 91 And I set the field "ajaxgrade" to "90" 92 And I press key "13" in the field "ajaxgrade" 93 And the following should exist in the "user-grades" table: 94 | -1- | -16- | 95 | Student 1 | 90.00 | 96 And I navigate to "Grader report" node in "Grade administration" 97 And the following should exist in the "user-grades" table: 98 | -1- | -6- | -7- | -13- | -16- | 99 | Student 1 | - | - | - | 90.00 | 100 | Student 2 | - | 33.00 | - | 33.00 | 101 | Student 3 | 80.00 | 50.00 | Very good | 133.00 | 102 103 @javascript 104 Scenario: Use the grader report without editing, with AJAX and quick feedback on 105 When the following config values are set as admin: 106 | grade_overridecat | 1 | 107 | grade_report_showquickfeedback | 1 | 108 And I log in as "teacher1" 109 And I follow "Course 1" 110 And I navigate to "Grades" node in "Course administration" 111 And I click on student "Student 2" for grade item "Item VU" 112 Then I should see a grade field for "Student 2" and grade item "Item VU" 113 And I should see a feedback field for "Student 2" and grade item "Item VU" 114 And I set the field "ajaxgrade" to "33" 115 And I set the field "ajaxfeedback" to "Student 2 VU feedback" 116 And I press key "13" in the field "ajaxfeedback" 117 And I click on student "Student 3" for grade item "Item VL" 118 And I should not see a grade field for "Student 3" and grade item "Item VL" 119 And I should not see a feedback field for "Student 3" and grade item "Item VL" 120 And I click on student "Student 3" for grade item "Item TU" 121 And I should not see a grade field for "Student 3" and grade item "Item TU" 122 And I should see a feedback field for "Student 3" and grade item "Item TU" 123 And I set the field "ajaxfeedback" to "Student 3 TU feedback" 124 And I press key "13" in the field "ajaxfeedback" 125 And I click on student "Student 2" for grade item "Item SU" 126 And I set the field "ajaxgrade" to "Very good" 127 And I set the field "ajaxfeedback" to "Student 2 SU feedback" 128 And I press key "13" in the field "ajaxfeedback" 129 And I navigate to "Grader report" node in "Grade administration" 130 And the following should exist in the "user-grades" table: 131 | -1- | -7- | -13- | -16- | 132 | Student 2 | 33.00 | Very good | 36.00 | 133 And I click on student "Student 3" for grade item "Item TU" 134 And the field "ajaxfeedback" matches value "Student 3 TU feedback" 135 And I click on student "Student 2" for grade item "Item SU" 136 And the field "ajaxfeedback" matches value "Student 2 SU feedback" 137 138 @javascript 139 Scenario: Use the grader report without editing, with AJAX and quick feedback on, without category override 140 When the following config values are set as admin: 141 | grade_overridecat | 0 | 142 | grade_report_showquickfeedback | 1 | 143 And I log in as "teacher1" 144 And I follow "Course 1" 145 And I navigate to "Grades" node in "Course administration" 146 And I click on student "Student 2" for grade item "Item VU" 147 Then I should see a grade field for "Student 2" and grade item "Item VU" 148 And I should see a feedback field for "Student 2" and grade item "Item VU" 149 And I set the field "ajaxgrade" to "33" 150 And I press key "13" in the field "ajaxgrade" 151 And I click on student "Student 2" for grade item "Course total" 152 And I should not see a grade field for "Student 3" and grade item "Course total" 153 And I should not see a feedback field for "Student 3" and grade item "Course total" 154 And the following should exist in the "user-grades" table: 155 | -1- | -7- | -16- | 156 | Student 2 | 33.00 | 33.00 | 157 158 @javascript 159 Scenario: Use the grader report with editing, with AJAX and quick feedback on, with category override 160 When the following config values are set as admin: 161 | grade_overridecat | 1 | 162 | grade_report_showquickfeedback | 1 | 163 And I log in as "teacher1" 164 And I follow "Course 1" 165 And I navigate to "Grades" node in "Course administration" 166 And I turn editing mode on 167 Then I should not see a grade field for "Student 2" and grade item "Item VL" 168 And I should not see a feedback field for "Student 2" and grade item "Item VL" 169 And I should not see a grade field for "Student 2" and grade item "Item TU" 170 And I should see a feedback field for "Student 2" and grade item "Item TU" 171 And I should see a grade field for "Student 2" and grade item "Course total" 172 And I should see a feedback field for "Student 2" and grade item "Course total" 173 And I give the grade "20.00" to the user "Student 2" for the grade item "Item VU" 174 And I click away from student "Student 2" and grade item "Item VU" value 175 And I give the grade "30.00" to the user "Student 2" for the grade item "Item 1" 176 And I give the feedback "Some feedback" to the user "Student 2" for the grade item "Item 1" 177 And I click away from student "Student 2" and grade item "Item 1" feedback 178 And I give the grade "Very good" to the user "Student 2" for the grade item "Item SU" 179 And I click away from student "Student 2" and grade item "Item SU" value 180 And the grade for "Student 2" in grade item "Grade Cat" should match "53.00" 181 And the grade for "Student 2" in grade item "Course total" should match "53.00" 182 And I turn editing mode off 183 And the following should exist in the "user-grades" table: 184 | -1- | -6- | -7- | -13- | -15- | -16- | 185 | Student 2 | 30.00 | 20.00 | Very good | 53.00 | 53.00 | 186 And I click on student "Student 2" for grade item "Item 1" 187 And the field "ajaxfeedback" matches value "Some feedback" 188 189 @javascript 190 Scenario: Use the grader report with editing, with AJAX and quick feedback on, without category override 191 When the following config values are set as admin: 192 | grade_overridecat | 0 | 193 | grade_report_showquickfeedback | 1 | 194 And I log in as "teacher1" 195 And I follow "Course 1" 196 And I navigate to "Grades" node in "Course administration" 197 And I turn editing mode on 198 And I change window size to "large" 199 And I set "=[[i1]] + [[i3]] + [[gsc]]" calculation for grade item "Calc Item" with idnumbers: 200 | Item 1 | i1 | 201 | Item 3 | i3 | 202 | Grade Sub Cat | gsc | 203 Then I should not see a grade field for "Student 2" and grade item "Course total" 204 And I should not see a feedback field for "Student 2" and grade item "Course total" 205 And I give the grade "20.00" to the user "Student 2" for the grade item "Item VU" 206 And I click away from student "Student 2" and grade item "Item VU" value 207 And the following should exist in the "user-grades" table: 208 | -1- | -15- | -16- | 209 | Student 2 | 20.00 | 20.00 | 210 And I give the grade "30.00" to the user "Student 2" for the grade item "Item 1" 211 And I click away from student "Student 2" and grade item "Item 1" value 212 And the following should exist in the "user-grades" table: 213 | -1- | -15- | -16- | 214 | Student 2 | 80.00 | 80.00 | 215 And the field "Student 2 Calc Item grade" matches value "30.00" 216 And I give the grade "5.00" to the user "Student 2" for the grade item "Item 3" 217 And I click away from student "Student 2" and grade item "Item 3" value 218 And the following should exist in the "user-grades" table: 219 | -1- | -15- | -16- | 220 | Student 2 | 90.00 | 90.00 | 221 And the field "Student 2 Calc Item grade" matches value "35.00" 222 And I give the grade "10.00" to the user "Student 2" for the grade item "Item VUSub" 223 And I click away from student "Student 2" and grade item "Item VUSub" value 224 And the following should exist in the "user-grades" table: 225 | -1- | -5- | -15- | -16- | 226 | Student 2 | 10.00 | 110.00 | 110.00 | 227 And the field "Student 2 Calc Item grade" matches value "45.00" 228 And I give the feedback "Some feedback" to the user "Student 2" for the grade item "Item 1" 229 And I click away from student "Student 2" and grade item "Item 1" feedback 230 And I turn editing mode off 231 And the following should exist in the "user-grades" table: 232 | -1- | -4- | -6- | -7- | -11- | -12- | -15- | -16- | 233 | Student 2 | 10.00 | 30.00 | 20.00 | 5.00 | 45.00 | 110.00 | 110.00 | 234 And I click on student "Student 2" for grade item "Item 1" 235 And the field "ajaxfeedback" matches value "Some feedback"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |