Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@mod @mod_assignFeature: Bulk remove submissionsIn order to reset the assignment submission of multiple studentsAs a teacher with the capability to edit submissionsI need to be able to remove student submissions by bulkBackground:Given the following "courses" exist:| fullname | shortname | category | groupmode || Course 1 | C1 | 0 | 0 |And the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || student1 | Student | 1 | student1@example.com || student2 | Student | 2 | student2@example.com |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student || student2 | C1 | student |And the following "groups" exist:| name | course | idnumber || Group 1 | C1 | G1 |@javascript @skip_chrome_zerosizeScenario: Bulk remove submissions should remove the data that was submittedGiven the following "activity" exists:| activity | assign || course | C1 || name | Test assignment name || assignsubmission_onlinetext_enabled | 1 || assignsubmission_file_enabled | 0 || submissiondrafts | 0 |And the following "mod_assign > submissions" exist:| assign | user | onlinetext || Test assignment name | student1 | I'm the student1 submission || Test assignment name | student2 | I'm the student2 submission |And the following "role capability" exists:| role | editingteacher || mod/assign:editothersubmission | allow |And I am on the "Test assignment name" Activity page logged in as teacher1And I follow "View all submissions"And I should see "I'm the student1 submission"And I should see "I'm the student2 submission"And I set the field "selectall" to "1"When I set the field "operation" to "Remove submission"And I click on "Go" "button" confirming the dialogueThen I should not see "I'm the student1 submission"And I should not see "I'm the student2 submission"And I log outAnd I am on the "Test assignment name" Activity page logged in as student1And I should not see "I'm the student1 submission"And I log outAnd I am on the "Test assignment name" Activity page logged in as student2And I should not see "I'm the student2 submission1"@javascriptScenario: Bulk remove submissions should be unavailable if the user is missing the editing submission capabilityGiven the following "activity" exists:| activity | assign || course | C1 || name | Test assignment name || intro | Submit your online text || assignsubmission_onlinetext_enabled | 1 || assignsubmission_file_enabled | 0 || submissiondrafts | 0 |And the following "mod_assign > submissions" exist:| assign | user | onlinetext || Test assignment name | student1 | I'm the student1 submission || Test assignment name | student2 | I'm the student2 submission |When I am on the "Test assignment name" Activity page logged in as teacher1And I follow "View all submissions"And I should see "I'm the student1 submission"And I should see "I'm the student2 submission"And I set the field "selectall" to "1"Then I should not see "Remove submission" in the "Choose operation" "select"@javascript @skip_chrome_zerosizeScenario: Notification should be displayed when non-group users are selected for submission bulk removalin separate group modeGiven the following "activity" exists:| activity | assign || course | C1 || name | Test assignment name || assignsubmission_onlinetext_enabled | 1 || assignsubmission_file_enabled | 0 || groupmode | 1 || submissiondrafts | 0 |And the following "mod_assign > submissions" exist:| assign | user | onlinetext || Test assignment name | student1 | I'm the student1 submission || Test assignment name | student2 | I'm the student2 submission |And the following "role capability" exists:| role | editingteacher || mod/assign:editothersubmission | allow |And I am on the "Test assignment name" Activity page logged in as teacher1And I follow "View all submissions"And I should see "I'm the student1 submission"And I should see "I'm the student2 submission"And I set the field "selectall" to "1"When I set the field "operation" to "Remove submission"And I click on "Go" "button" confirming the dialogueThen I should see "I'm the student1 submission"And I should see "I'm the student2 submission"And I should see "The submission of Student 1 cannot be removed"And I should see "The submission of Student 2 cannot be removed"@javascript @skip_chrome_zerosizeScenario: Bulk remove submission when group users are added to the bulkremoving submissions process in separate group modeGiven the following "group members" exist:| user | group || student1 | G1 || student2 | G1 |And the following "activity" exists:| activity | assign || course | C1 || name | Test assignment name || assignsubmission_onlinetext_enabled | 1 || assignsubmission_file_enabled | 0 || groupmode | 1 || submissiondrafts | 0 |And the following "mod_assign > submissions" exist:| assign | user | onlinetext || Test assignment name | student1 | I'm the student1 submission || Test assignment name | student2 | I'm the student2 submission |And the following "role capability" exists:| role | editingteacher || mod/assign:editothersubmission | allow |And I am on the "Test assignment name" Activity page logged in as teacher1And I follow "View all submissions"And I should see "I'm the student1 submission"And I should see "I'm the student2 submission"And I set the field "selectall" to "1"When I set the field "operation" to "Remove submission"And I click on "Go" "button" confirming the dialogueThen I should not see "I'm the student1 submission"And I should not see "I'm the student2 submission"