Rev 1 | 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 || student3 | Student | 3 | student3@example.com |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student || student2 | C1 | student || student3 | 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 navigate to "Submissions" in current page administrationAnd 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"And I click on "Delete" "button" in the "sticky-footer" "region"And I click on "Delete" "button" in the "Remove submission" "dialogue"Then 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 navigate to "Submissions" in current page administrationAnd 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 "Delete" in the "sticky-footer" "region"@javascript @skip_chrome_zerosizeScenario: Bulk remove submission when shared group users are added to the bulkremoving submissions process in separate group mode without access all groups capabilityGiven the following "group members" exist:| user | group || teacher1 | G1 || student1 | G1 || student2 | G1 |Given 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 || Test assignment name | student3 | I'm the student3 submission |And the following "role capability" exists:| role | editingteacher || mod/assign:editothersubmission | allow || moodle/site:accessallgroups | prevent |And I am on the "Test assignment name" Activity page logged in as teacher1And I navigate to "Submissions" in current page administrationAnd I should see "I'm the student1 submission"And I should see "I'm the student2 submission"And I should not see "I'm the student3 submission"And I set the field "selectall" to "1"When I click on "Delete" "button" in the "sticky-footer" "region"And I click on "Delete" "button" in the "Remove submission" "dialogue"Then I should not see "I'm the student1 submission"Then I should not see "I'm the student2 submission"@javascript @skip_chrome_zerosizeScenario: Bulk remove submission when group users and non-group users are added to the bulkremoving submissions process in separate group mode with access all groups capabilityGiven 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 || Test assignment name | student3 | I'm the student3 submission |And the following "role capability" exists:| role | editingteacher || mod/assign:editothersubmission | allow || moodle/site:accessallgroups | allow |And I am on the "Test assignment name" Activity page logged in as teacher1And I navigate to "Submissions" in current page administrationAnd I should see "I'm the student1 submission"And I should see "I'm the student2 submission"And I should see "I'm the student3 submission"And I set the field "selectall" to "1"When I click on "Delete" "button" in the "sticky-footer" "region"And I click on "Delete" "button" in the "Remove submission" "dialogue"Then I should not see "I'm the student1 submission"And I should not see "I'm the student2 submission"And I should not see "I'm the student3 submission"