|
| 1 | +@addon_mod_assign @app @javascript @lms_upto4.4 |
| 2 | +Feature: Test marking workflow in assignment activity in app |
| 3 | + |
| 4 | + Background: |
| 5 | + Given the Moodle site is compatible with this feature |
| 6 | + And the following "users" exist: |
| 7 | + | username | firstname | lastname | email | |
| 8 | + | teacher1 | Teacher | teacher | teacher1@example.com | |
| 9 | + | student1 | Student1 | student1 | student1@example.com | |
| 10 | + | student2 | Student2 | student2 | student2@example.com | |
| 11 | + | student3 | Student3 | student3 | student3@example.com | |
| 12 | + | student4 | Student4 | student4 | student4@example.com | |
| 13 | + | student5 | Student5 | student5 | student5@example.com | |
| 14 | + And the following "courses" exist: |
| 15 | + | fullname | shortname | category | |
| 16 | + | Course 1 | C1 | 0 | |
| 17 | + And the following "course enrolments" exist: |
| 18 | + | user | course | role | |
| 19 | + | teacher1 | C1 | editingteacher | |
| 20 | + | student1 | C1 | student | |
| 21 | + | student2 | C1 | student | |
| 22 | + | student3 | C1 | student | |
| 23 | + | student4 | C1 | student | |
| 24 | + | student5 | C1 | student | |
| 25 | + And the following "groups" exist: |
| 26 | + | name | course | idnumber | |
| 27 | + | Group 1 | C1 | G1 | |
| 28 | + | Group 2 | C1 | G2 | |
| 29 | + | Group 3 | C1 | G3 | |
| 30 | + And the following "group members" exist: |
| 31 | + | user | group | |
| 32 | + | student1 | G1 | |
| 33 | + | student2 | G1 | |
| 34 | + | student3 | G2 | |
| 35 | + | student4 | G3 | |
| 36 | + And the following "activities" exist: |
| 37 | + | activity | course | idnumber | name | assignsubmission_onlinetext_enabled | assignfeedback_comments_enabled | markingworkflow | teamsubmission | groupmode | submissiondrafts | |
| 38 | + | assign | C1 | assign1 | Group Assign | 1 | 1 | 1 | 1 | 1 | 0 | |
| 39 | + And the following "mod_assign > submissions" exist: |
| 40 | + | assign | user | onlinetext | |
| 41 | + | assign1 | student1 | Lorem | |
| 42 | + | assign1 | student3 | Ipsum | |
| 43 | + | assign1 | student4 | Dolor | |
| 44 | + # Mark submissions. |
| 45 | + And I am on the "Group Assign" "assign activity" page logged in as teacher1 |
| 46 | + And I follow "View all submissions" |
| 47 | + And I change window size to "large" |
| 48 | + And I click on "Grade" "link" in the "Student1" "table_row" |
| 49 | + And I set the field "Grade out of 100" to "50" |
| 50 | + And I set the field "Marking workflow state" to "In review" |
| 51 | + And I set the field "Feedback comments" to "Great job! Lol, not really." |
| 52 | + And I set the field "Notify student" to "0" |
| 53 | + And I press "Save changes" |
| 54 | + And I am on the "Group Assign" "assign activity" page |
| 55 | + And I follow "View all submissions" |
| 56 | + And I click on "Grade" "link" in the "Student3" "table_row" |
| 57 | + And I set the field "Grade out of 100" to "30" |
| 58 | + And I set the field "Marking workflow state" to "Released" |
| 59 | + And I set the field "Feedback comments" to "Needs to be improved." |
| 60 | + And I set the field "Notify student" to "0" |
| 61 | + And I press "Save changes" |
| 62 | + And I log out |
| 63 | + |
| 64 | + Scenario: View submissions with marking workflow and using points as teacher |
| 65 | + Given I entered the assign activity "Group Assign" on course "Course 1" as "teacher1" in the app |
| 66 | + When I press "Groups" in the app |
| 67 | + Then I should find "Submitted for grading" within "Student1" "ion-item" in the app |
| 68 | + And I should find "In review" within "Student1" "ion-item" in the app |
| 69 | + And I should find "Submitted for grading" within "Student2" "ion-item" in the app |
| 70 | + And I should find "In review" within "Student2" "ion-item" in the app |
| 71 | + And I should find "Submitted for grading" within "Student3" "ion-item" in the app |
| 72 | + And I should find "Released" within "Student3" "ion-item" in the app |
| 73 | + And I should find "Submitted for grading" within "Student4" "ion-item" in the app |
| 74 | + And I should find "Not marked" within "Student4" "ion-item" in the app |
| 75 | + And I should find "No submission" within "Student5" "ion-item" in the app |
| 76 | + And I should not find "Not marked" within "Student5" "ion-item" in the app |
| 77 | + |
| 78 | + When I press "Student1" in the app |
| 79 | + And I press "Grade" in the app |
| 80 | + Then I should find "Submitted for grading" in the app |
| 81 | + And I should find "50 / 100" within "Current grade in assignment" "ion-item" in the app |
| 82 | + And I should find "-" within "Current grade in gradebook" "ion-item" in the app |
| 83 | + And I should find "In review" within "Marking workflow state" "ion-item" in the app |
| 84 | + And the field "Grade out of 100" matches value "50" in the app |
| 85 | + And I should not find "Graded by" in the app |
| 86 | + |
| 87 | + When I press the back button in the app |
| 88 | + And I press "Student3" in the app |
| 89 | + And I press "Grade" in the app |
| 90 | + Then I should find "Submitted for grading" in the app |
| 91 | + And I should find "30" within "Current grade in gradebook" "ion-item" in the app |
| 92 | + And I should find "Released" within "Marking workflow state" "ion-item" in the app |
| 93 | + And I should find "Teacher teacher" within "Graded by" "ion-item" in the app |
| 94 | + And the field "Grade out of 100" matches value "30" in the app |
| 95 | + And I should not find "Current grade in assignment" in the app |
| 96 | + |
| 97 | + Scenario: Grade submissions with marking workflow and using points |
| 98 | + Given I entered the assign activity "Group Assign" on course "Course 1" as "teacher1" in the app |
| 99 | + And I press "Groups" in the app |
| 100 | + And I press "Student1" in the app |
| 101 | + And I press "Grade" in the app |
| 102 | + When I set the field "Grade out of 100" to "60" in the app |
| 103 | + And I press "Done" in the app |
| 104 | + And I wait loading to finish in the app |
| 105 | + And I press "Student1" in the app |
| 106 | + And I press "Grade" in the app |
| 107 | + Then I should find "60 / 100" within "Current grade in assignment" "ion-item" in the app |
| 108 | + And I should find "-" within "Current grade in gradebook" "ion-item" in the app |
| 109 | + And I should find "In review" within "Marking workflow state" "ion-item" in the app |
| 110 | + And the field "Grade out of 100" matches value "60" in the app |
| 111 | + |
| 112 | + When I press the back button in the app |
| 113 | + And I press "Student3" in the app |
| 114 | + And I press "Grade" in the app |
| 115 | + When I set the field "Grade out of 100" to "80" in the app |
| 116 | + And I press "Done" in the app |
| 117 | + And I wait loading to finish in the app |
| 118 | + And I press "Student3" in the app |
| 119 | + And I press "Grade" in the app |
| 120 | + Then I should find "80" within "Current grade in gradebook" "ion-item" in the app |
| 121 | + And I should find "Released" within "Marking workflow state" "ion-item" in the app |
| 122 | + And I should find "Teacher teacher" within "Graded by" "ion-item" in the app |
| 123 | + And the field "Grade out of 100" matches value "80" in the app |
| 124 | + And I should not find "Current grade in assignment" in the app |
0 commit comments