[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_assign 2 Feature: Prevent or allow assignment submission changes 3 In order to control when a student can change his/her submission 4 As a teacher 5 I need to prevent or allow student submission at any time 6 7 Background: 8 Given the following "courses" exist: 9 | fullname | shortname | category | groupmode | 10 | Course 1 | C1 | 0 | 1 | 11 And the following "users" exist: 12 | username | firstname | lastname | email | 13 | teacher1 | Teacher | 1 | teacher1@example.com | 14 | student1 | Student | 1 | student1@example.com | 15 | student2 | Student | 2 | student2@example.com | 16 And the following "course enrolments" exist: 17 | user | course | role | 18 | teacher1 | C1 | editingteacher | 19 | student1 | C1 | student | 20 | student2 | C1 | student | 21 22 @javascript 23 Scenario: Preventing changes and allowing them again 24 Given 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 | Test assignment name | 29 | Description | Submit your online text | 30 | assignsubmission_onlinetext_enabled | 1 | 31 | assignsubmission_file_enabled | 0 | 32 And I log out 33 And I log in as "student1" 34 And I follow "Course 1" 35 And I follow "Test assignment name" 36 And I press "Add submission" 37 And I set the following fields to these values: 38 | Online text | I'm the student submission | 39 And I press "Save changes" 40 And I press "Edit submission" 41 And I set the following fields to these values: 42 | Online text | I'm the student submission and he/she edited me | 43 And I press "Save changes" 44 And I log out 45 And I log in as "teacher1" 46 And I follow "Course 1" 47 And I follow "Test assignment name" 48 When I follow "View all submissions" 49 And I click on "Edit" "link" in the "Student 1" "table_row" 50 And I follow "Prevent submission changes" 51 Then I should see "Submission changes not allowed" 52 And I log out 53 And I log in as "student1" 54 And I follow "Course 1" 55 And I follow "Test assignment name" 56 And "Edit submission" "button" should not exist 57 And I should see "This assignment is not accepting submissions" 58 And I log out 59 And I log in as "teacher1" 60 And I follow "Course 1" 61 And I follow "Test assignment name" 62 And I follow "View all submissions" 63 And I click on "Edit" "link" in the "Student 1" "table_row" 64 And I follow "Allow submission changes" 65 And I should not see "Submission changes not allowed" 66 And I log out 67 And I log in as "student1" 68 And I follow "Course 1" 69 And I follow "Test assignment name" 70 And I should not see "This assignment is not accepting submissions" 71 And I press "Edit submission" 72 And I set the following fields to these values: 73 | Online text | I'm the student submission edited again | 74 And I press "Save changes" 75 And I should see "I'm the student submission edited again" 76 77 @javascript @_alert 78 Scenario: Preventing changes and allowing them again (batch action) 79 Given the following "activities" exist: 80 | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | 81 | assign | C1 | assign1 | Test assignment name | Test assignment description | 1 | 0 | 82 And I log in as "student1" 83 And I follow "Course 1" 84 And I follow "Test assignment name" 85 And I press "Add submission" 86 And I set the following fields to these values: 87 | Online text | I'm the student submission | 88 And I press "Save changes" 89 And I log out 90 And I log in as "student2" 91 And I follow "Course 1" 92 And I follow "Test assignment name" 93 And I press "Add submission" 94 And I set the following fields to these values: 95 | Online text | I'm the student2 submission | 96 And I press "Save changes" 97 And I log out 98 And I log in as "teacher1" 99 And I follow "Course 1" 100 And I follow "Test assignment name" 101 When I follow "View all submissions" 102 And I set the field "selectall" to "1" 103 And I click on "Go" "button" confirming the dialogue 104 Then I should see "Submission changes not allowed" in the "Student 1" "table_row" 105 And I should see "Submission changes not allowed" in the "Student 2" "table_row" 106 And I log out 107 And I log in as "student2" 108 And I follow "Course 1" 109 And I follow "Test assignment name" 110 And I should not see "Edit submission" 111 And I log out 112 And I log in as "teacher1" 113 And I follow "Course 1" 114 And I follow "Test assignment name" 115 And I follow "View all submissions" 116 And I set the field "selectall" to "1" 117 And I set the field "id_operation" to "Unlock submissions" 118 And I click on "Go" "button" confirming the dialogue 119 And I should not see "Submission changes not allowed" in the "Student 1" "table_row" 120 And I should not see "Submission changes not allowed" in the "Student 2" "table_row" 121 And I log out 122 And I log in as "student2" 123 And I follow "Course 1" 124 And I follow "Test assignment name" 125 And I press "Edit submission" 126 And I set the following fields to these values: 127 | Online text | I'm the student2 submission and he/she edited me | 128 And I press "Save changes" 129 And I log out
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 |