[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @gradereport @gradereport_history @_bug_phantomjs 2 Feature: A teacher checks the grade history report in a course 3 In order to check the history of the grades 4 As a teacher 5 I need to check that the history report is correctly displaying changes 6 7 @javascript 8 Scenario: Check the history report displays results correctly 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 | 14 | teacher1 | Teacher | 1 | teacher1@example.com | 15 | teacher2 | Teacher | 2 | teacher2@example.com | 16 | student1 | Student | 1 | student1@example.com | 17 | student2 | Student | 2 | student2@example.com | 18 And the following "course enrolments" exist: 19 | user | course | role | 20 | teacher1 | C1 | editingteacher | 21 | teacher2 | C1 | editingteacher | 22 | student1 | C1 | student | 23 | student2 | C1 | student | 24 And I log in as "teacher1" 25 And I follow "Course 1" 26 And I turn editing mode on 27 And I add a "Assignment" to section "1" and I fill the form with: 28 | Assignment name | The greatest assignment ever | 29 | Description | Write a behat test for Moodle - it's amazing! | 30 And I add a "Assignment" to section "1" and I fill the form with: 31 | Assignment name | Rewarding assignment | 32 | Description | After writing your behat test go grab a beer! | 33 And I navigate to "Grades" node in "Course administration" 34 And I turn editing mode on 35 And I give the grade "50.00" to the user "Student 1" for the grade item "The greatest assignment ever" 36 And I give the grade "60.00" to the user "Student 1" for the grade item "Rewarding assignment" 37 And I give the grade "50.00" to the user "Student 2" for the grade item "The greatest assignment ever" 38 And I give the grade "60.00" to the user "Student 2" for the grade item "Rewarding assignment" 39 And I press "Save changes" 40 And I log out 41 And I log in as "teacher2" 42 And I follow "Course 1" 43 And I navigate to "Grades" node in "Course administration" 44 And I turn editing mode on 45 And I give the grade "70.00" to the user "Student 1" for the grade item "The greatest assignment ever" 46 And I give the grade "80.00" to the user "Student 1" for the grade item "Rewarding assignment" 47 And I give the grade "70.00" to the user "Student 2" for the grade item "The greatest assignment ever" 48 And I give the grade "80.00" to the user "Student 2" for the grade item "Rewarding assignment" 49 And I press "Save changes" 50 And I follow "Grade history" 51 When I press "Submit" 52 Then the following should exist in the "gradereport_history" table: 53 | First name/Surname | Grade item | Original grade | Revised grade | Grader | 54 | Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 | 55 | Student 1 | Rewarding assignment | | 60.00 | Teacher 1 | 56 | Student 2 | The greatest assignment ever | | 50.00 | Teacher 1 | 57 | Student 2 | Rewarding assignment | | 60.00 | Teacher 1 | 58 | Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 | 59 | Student 1 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 | 60 | Student 2 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 | 61 | Student 2 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 | 62 # Test filtering by student. 63 And I press "Select users" 64 And I set the field with xpath "//form/input[@class='usp-search-field']" to "Student 1" 65 And I press "Search" 66 And I set the field with xpath "//div[@class='usp-checkbox']/input" to "1" 67 And I press "Finish selecting users" 68 And I press "Submit" 69 And the following should exist in the "gradereport_history" table: 70 | First name/Surname | Grade item | Original grade | Revised grade | Grader | 71 | Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 | 72 | Student 1 | Rewarding assignment | | 60.00 | Teacher 1 | 73 | Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 | 74 | Student 1 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 | 75 And the following should not exist in the "gradereport_history" table: 76 | Student 2 | The greatest assignment ever | | 50.00 | Teacher 1 | 77 | Student 2 | Rewarding assignment | | 60.00 | Teacher 1 | 78 | Student 2 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 | 79 | Student 2 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 | 80 # Test filtering by assignment. 81 And I click on "The greatest assignment ever" "option" in the "#id_itemid" "css_element" 82 And I press "Submit" 83 And the following should exist in the "gradereport_history" table: 84 | First name/Surname | Grade item | Original grade | Revised grade | Grader | 85 | Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 | 86 | Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 | 87 And the following should not exist in the "gradereport_history" table: 88 | Student 1 | Rewarding assignment | | 60.00 | Teacher 1 | 89 | Student 1 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 | 90 # Test filtering by grader. 91 And I click on "Teacher 1" "option" in the "#id_grader" "css_element" 92 And I press "Submit" 93 And the following should exist in the "gradereport_history" table: 94 | First name/Surname | Grade item | Original grade | Revised grade | Grader | 95 | Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 | 96 And the following should not exist in the "gradereport_history" table: 97 | Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 | 98 # Test filtering by revised grades. 99 And I click on "id_revisedonly" "checkbox" 100 And I press "Submit" 101 And the following should exist in the "gradereport_history" table: 102 | First name/Surname | Grade item | Original grade | Revised grade | Grader | 103 | Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
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 |