[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_grades @gradereport_singleview 2 Feature: We can use Single view 3 As a teacher 4 In order to view and edit grades 5 For users and activities for a course. 6 7 Background: 8 Given the following "courses" exist: 9 | fullname | shortname | category | 10 | Course 1 | C1 | 0 | 11 And the following "users" exist: 12 | username | firstname | lastname | email | idnumber | alternatename | 13 | teacher1 | Teacher | 1 | teacher1@example.com | t1 | fred | 14 | teacher2 | No edit | 1 | teacher2@example.com | t2 | nick | 15 | student1 | Student | 1 | student1@example.com | s1 | james | 16 | student2 | Student | 2 | student1@example.com | s2 | holly | 17 | student3 | Student | 3 | student1@example.com | s3 | anna | 18 | student4 | Student | 4 | student1@example.com | s4 | zac | 19 And the following "scales" exist: 20 | name | scale | 21 | Test Scale | Disappointing, Good, Very good, Excellent | 22 And the following "grade items" exist: 23 | itemname | course | gradetype | scale | 24 | new grade item 1 | C1 | Scale | Test Scale | 25 And the following "scales" exist: 26 | name | scale | 27 | Test Scale | Disappointing, Good, Very good, Excellent | 28 And the following "course enrolments" exist: 29 | user | course | role | 30 | teacher1 | C1 | editingteacher | 31 | teacher2 | C1 | teacher | 32 | student1 | C1 | student | 33 | student2 | C1 | student | 34 | student3 | C1 | student | 35 | student4 | C1 | student | 36 And the following "grade categories" exist: 37 | fullname | course | 38 | Sub category 1 | C1| 39 | Sub category 2 | C1| 40 And the following "activities" exist: 41 | activity | course | idnumber | name | intro | grade | 42 | assign | C1 | a1 | Test assignment one | Submit something! | 300 | 43 | assign | C1 | a2 | Test assignment two | Submit something! | 100 | 44 | assign | C1 | a3 | Test assignment three | Submit something! | 150 | 45 | assign | C1 | a4 | Test assignment four | Submit nothing! | 150 | 46 And the following "grade items" exist: 47 | itemname | course | gradetype | 48 | Test grade item | C1 | Scale | 49 And the following "permission overrides" exist: 50 | capability | permission | role | contextlevel | reference | 51 | moodle/grade:edit | Allow | teacher | Course | C1 | 52 | gradereport/singleview:view | Allow | teacher | Course | C1 | 53 And I log in as "teacher1" 54 And I follow "Course 1" 55 And I navigate to "Grades" node in "Course administration" 56 57 @javascript 58 Scenario: I can update grades, add feedback and exclude grades. 59 Given I select "Single view" from the "Grade report" singleselect 60 And I select "Student 4" from the "Select user..." singleselect 61 And I set the field "Override for Test assignment one" to "1" 62 When I set the following fields to these values: 63 | Grade for Test assignment one | 10.00 | 64 | Feedback for Test assignment one | test data | 65 And I set the field "Exclude for Test assignment four" to "1" 66 And I press "Save" 67 Then I should see "Grades were set for 2 items" 68 And I press "Continue" 69 And the field "Exclude for Test assignment four" matches value "1" 70 And the field "Grade for Test assignment one" matches value "10.00" 71 And I set the following fields to these values: 72 | Test grade item | 45 | 73 And I press "Save" 74 Then I should see "Grades were set for 1 items" 75 And I press "Continue" 76 And the field "Grade for Test grade item" matches value "45.00" 77 And the field "Grade for Course total" matches value "55.00" 78 And I click on "Show grades for Test assignment three" "link" 79 And I click on "Override for james (Student) 1" "checkbox" 80 And I set the following fields to these values: 81 | Grade for james (Student) 1 | 12.05 | 82 | Feedback for james (Student) 1 | test data2 | 83 And I set the field "Exclude for holly (Student) 2" to "1" 84 And I press "Save" 85 Then I should see "Grades were set for 2 items" 86 And I press "Continue" 87 And the field "Grade for james (Student) 1" matches value "12.05" 88 And the field "Exclude for holly (Student) 2" matches value "1" 89 And I select "new grade item 1" from the "Select grade item..." singleselect 90 And I click on "Very good" "option" 91 And I press "Save" 92 Then I should see "Grades were set for 1 items" 93 And I press "Continue" 94 And the following should exist in the "generaltable" table: 95 | First name (Alternate name) Surname | Grade | 96 | james (Student) 1 | Very good | 97 And I log out 98 And I log in as "teacher2" 99 And I follow "Course 1" 100 And I navigate to "Grades" node in "Course administration" 101 And I click on "Single view" "option" 102 And I click on "Student 4" "option" 103 And the "Exclude for Test assignment one" "checkbox" should be disabled 104 And the "Override for Test assignment one" "checkbox" should be enabled 105 106 Scenario: Single view links work on grade report. 107 Given I follow "Single view for Test assignment one" 108 Then I should see "Test assignment one" 109 Then I follow "Grader report" 110 And I follow "Single view for Student 1" 111 Then I should see "Student 1" 112 113 Scenario: I can bulk update grades. 114 Given I follow "Single view for Student 1" 115 Then I should see "Student 1" 116 When I set the field "For" to "All grades" 117 And I set the field "Insert value" to "1.0" 118 And I set the field "Perform bulk insert" to "1" 119 And I press "Save" 120 Then I should see "Grades were set for 8 items" 121 122 Scenario: Navigation works in the Single view. 123 Given I follow "Single view for Student 1" 124 Then I should see "Student 1" 125 And I follow "Student 2" 126 Then I should see "Student 2" 127 And I follow "Student 1" 128 Then I should see "Student 1" 129 And I click on "Show grades for Test assignment four" "link" 130 Then I should see "Test assignment four" 131 And I follow "Test assignment three" 132 Then I should see "Test assignment three" 133 And I follow "Test assignment four" 134 Then I should see "Test assignment four" 135 136 Scenario: Activities are clickable only when 137 it has a valid activity page. 138 Given I follow "Single view for Student 1" 139 And "new grade item 1" "link" should not exist in the "//tbody//tr[position()=1]//td[position()=2]" "xpath_element" 140 Then "Category total" "link" should not exist in the "//tbody//tr[position()=2]//td[position()=2]" "xpath_element" 141 And "Course total" "link" should not exist in the "//tbody//tr[position()=last()]//td[position()=2]" "xpath_element"
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 |