|
| 1 | +@addon_mod_assign @app @mod @mod_assign @javascript @lms_from5.0 |
| 2 | +Feature: Grade penalties in the assignment activity |
| 3 | + |
| 4 | + Background: |
| 5 | + Given the following "courses" exist: |
| 6 | + | fullname | shortname | category | |
| 7 | + | Course 1 | C1 | 0 | |
| 8 | + And the following "users" exist: |
| 9 | + | username | firstname | lastname | email | |
| 10 | + | teacher1 | Teacher | 1 | teacher1@example.com | |
| 11 | + | student1 | Student | 1 | student10@example.com | |
| 12 | + And the following "course enrolments" exist: |
| 13 | + | user | course | role | |
| 14 | + | teacher1 | C1 | editingteacher | |
| 15 | + | student1 | C1 | student | |
| 16 | + And I enable grade penalties for assignment |
| 17 | + And the following "activity" exists: |
| 18 | + | activity | assign | |
| 19 | + | course | C1 | |
| 20 | + | name | Test assignment name | |
| 21 | + | intro | Test assignment description | |
| 22 | + | grade | 100 | |
| 23 | + | duedate | ##yesterday## | |
| 24 | + | gradepenalty | 1 | |
| 25 | + | assignsubmission_onlinetext_enabled | 1 | |
| 26 | + | submissiondrafts | 0 | |
| 27 | + | maxattempts | -1 | |
| 28 | + | attemptreopenmethod | manual | |
| 29 | + # Add a submission. |
| 30 | + And the following "mod_assign > submissions" exist: |
| 31 | + | assign | user | onlinetext | |
| 32 | + | Test assignment name | student1 | I'm the student first submission | |
| 33 | + And I am on the "Test assignment name" Activity page logged in as teacher1 |
| 34 | + And I go to "Student 1" "Test assignment name" activity advanced grading page |
| 35 | + And I set the following fields to these values: |
| 36 | + | Grade out of 100 | 50 | |
| 37 | + | Notify student | 0 | |
| 38 | + | Allow another attempt | 1 | |
| 39 | + And I press "Save changes" |
| 40 | + And I log out |
| 41 | + |
| 42 | + Scenario: View submission with grade penalty as student |
| 43 | + Given I entered the assign activity "Test assignment name" on course "Course 1" as "student1" in the app |
| 44 | + When I press "Attempt 1" in the app |
| 45 | + Then I should find "Late penalty applied -10.00 marks" within "Feedback" "ion-card" in the app |
| 46 | + And I should find "Late penalty applied -10.00 marks" within "Attempt 1" "ion-accordion" in the app |
| 47 | + |
| 48 | + Scenario: View activity summary with grade penalty as student |
| 49 | + Given I entered the assign activity "Test assignment name" on course "Course 1" as "student1" in the app |
| 50 | + When I press "Information" "ion-button" in the app |
| 51 | + And I press "Grade" "ion-item" in the app |
| 52 | + Then I should find "Late penalty applied -10.00 marks" within "Gradebook" "ion-card" in the app |
| 53 | + |
| 54 | + Scenario: View submission with grade penalty as teacher |
| 55 | + Given I entered the assign activity "Test assignment name" on course "Course 1" as "teacher1" in the app |
| 56 | + When I press "Participants" in the app |
| 57 | + And I press "Student 1" in the app |
| 58 | + And I press "Attempt 1" in the app |
| 59 | + Then I should find "Late penalty applied -10.00 marks" within "Feedback" "ion-card" in the app |
| 60 | + And I should find "Late penalty applied -10.00 marks" within "Attempt 1" "ion-accordion" in the app |
| 61 | + |
| 62 | + Scenario: Edit feedback with grade penalty as teacher |
| 63 | + Given I entered the assign activity "Test assignment name" on course "Course 1" as "teacher1" in the app |
| 64 | + When I press "Participants" in the app |
| 65 | + And I press "Student 1" in the app |
| 66 | + And I press "Grade" "ion-button" in the app |
| 67 | + Then I should find "Late penalty applied -10.00 marks" in the app |
0 commit comments