first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,150 @@
@mod @mod_assign
Feature: In an assignment, students start a new attempt based on their previous one
In order to improve my submission
As a student
I need to submit my assignment editing an online form, receive feedback, and then improve my submission.
@javascript
Scenario: Submit a text online and edit the submission
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And 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 |
| attemptreopenmethod | manual |
| hidegrader | 1 |
| submissiondrafts | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student first submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the following fields to these values:
| Allow another attempt | 1 |
And I press "Save changes"
And I click on "Edit settings" "link"
And I log out
When I am on the "Test assignment name" Activity page logged in as student1
Then I should not see "Teacher 1"
And I press "Add a new attempt based on previous submission"
And I press "Save changes"
And I log out
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I should see "I'm the student first submission"
@javascript @_alert
Scenario: Allow new attempt does not display incorrect error message on group submission
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
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 |
| student4 | Student | 4 | student4@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| attemptreopenmethod | manual |
| submissiondrafts | 0 |
| groupmode | 1 |
| teamsubmission | 1 |
| hidegrader | 1 |
| maxattempts | 3 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student first submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 3" row "Status" column of "generaltable" table should contain "No submission"
And "Student 4" row "Status" column of "generaltable" table should contain "No submission"
And I click on "Quick grading" "checkbox"
And I click on "Student 1" "checkbox"
And I set the field "User grade" to "60.0"
And I press "Save all quick grading changes"
And I should see "The grade changes were saved"
And I press "Continue"
And I click on "Student 1" "checkbox"
And I set the following fields to these values:
| operation | Allow another attempt |
And I click on "Go" "button" confirming the dialogue
And I should not see "The grades were not saved because someone has modified one or more records more recently than when you loaded the page."
And I log out
And I am on the "Test assignment name" Activity page logged in as student3
And I should see "This is attempt 1 ( 3 attempts allowed )."
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student's 3 group 2 first attempt |
And I press "Save changes"
And I log out
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And "Student 1" row "Status" column of "generaltable" table should contain "Reopened"
And "Student 2" row "Status" column of "generaltable" table should contain "Reopened"
And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 4" row "Status" column of "generaltable" table should contain "Submitted for grading"
And I click on "Grade" "link" in the "Student 3" "table_row"
And I set the following fields to these values:
| Allow another attempt | 1 |
And I press "Save changes"
And I follow "Assignment: Test assignment name"
And I log out
And I am on the "Test assignment name" Activity page logged in as student4
And I should see "This is attempt 2 ( 3 attempts allowed )."
And I press "Add a new attempt"
And I set the following fields to these values:
| Online text | I'm the student's 4 group 2 second attempt |
And I press "Save changes"
And I log out
And I am on the "Test assignment name" Activity page logged in as teacher1
And I select "Group 2" from the "group" singleselect
And I click on "Grade" "link" in the ".tertiary-navigation" "css_element"
And I should see "2" in the "#id_attemptsettings" "css_element"
@@ -0,0 +1,158 @@
@mod @mod_assign @core_completion
Feature: View activity completion in the assignment activity
In order to have visibility of assignment completion requirements
As a student
I need to be able to view my assignment completion progress
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Vinnie | Student1 | student1@example.com |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | enablecompletion | showcompletionconditions |
| Course 1 | C1 | 1 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| idnumber | mh1 |
| name | Music history |
| section | 1 |
| completion | 1 |
| grade[modgrade_type] | point |
| grade[modgrade_point] | 100 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| idnumber | mh2 |
| name | Music history 2 |
| section | 1 |
| assignsubmission_onlinetext_enabled | 1 |
| attemptreopenmethod | manual |
| maxattempts | -1 |
| completion | 2 |
| completionsubmit | 1 |
| grade[modgrade_type] | point |
| grade[modgrade_point] | 100 |
@javascript
Scenario: The manual completion button will be shown on the course page if the Show activity completion conditions is set to Yes
Given I am on the "Course 1" course page logged in as teacher1
# Teacher view.
And "Music history" should have the "Mark as done" completion condition
And I log out
# Student view.
When I log in as "student1"
And I am on "Course 1" course homepage
Then the manual completion button for "Music history" should exist
And the manual completion button of "Music history" is displayed as "Mark as done"
And I toggle the manual completion state of "Music history"
And the manual completion button of "Music history" is displayed as "Done"
@javascript
Scenario: The manual completion button will not be shown on the course page if the Show activity completion conditions is set to No
Given I am on the "Course 1" course page logged in as teacher1
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Show activity completion conditions" to "No"
And I press "Save and display"
# Teacher view.
And "Completion" "button" should not exist in the "Music history" "activity"
And I log out
# Student view.
When I am on the "Course 1" course page logged in as "student1"
Then the manual completion button for "Music history" should not exist
And I am on the "Music history" "assign activity" page
And the manual completion button for "Music history" should exist
@javascript
Scenario: Use manual completion from the activity page
Given I am on the "Music history" "assign activity" page logged in as teacher1
# Teacher view.
And the manual completion button for "Music history" should be disabled
And I log out
# Student view.
And I am on the "Music history" "assign activity" page logged in as student1
Then the manual completion button of "Music history" is displayed as "Mark as done"
And I toggle the manual completion state of "Music history"
And the manual completion button of "Music history" is displayed as "Done"
Scenario: View automatic completion items as a teacher
Given I am on the "Music history" "assign activity editing" page logged in as teacher1
And I expand all fieldsets
And I set the following fields to these values:
| Add requirements | 1 |
| View the activity | 1 |
| completionusegrade | 1 |
| completionsubmit | 1 |
And I press "Save and display"
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Make a submission" completion condition
And "Music history" should have the "Receive a grade" completion condition
@javascript
Scenario: View automatic completion items as a student
Given I am on the "Music history" "assign activity editing" page logged in as teacher1
And I expand all fieldsets
And I set the following fields to these values:
| assignsubmission_onlinetext_enabled | 1 |
| Add requirements | 1 |
| View the activity | 1 |
| completionusegrade | 1 |
| completionsubmit | 1 |
And I press "Save and display"
And I log out
And I am on the "Music history" "assign activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make a submission" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And I am on the "Music history" "assign activity" page
And I press "Add submission"
And I set the field "Online text" to "History of playing with drumsticks reversed"
And I press "Save changes"
And I press "Submit assignment"
And I press "Continue"
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make a submission" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And I log out
And I am on the "Music history" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Vinnie Student1" "table_row"
And I set the field "Grade out of 100" to "33"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I follow "View all submissions"
And I log out
When I am on the "Music history" "assign activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Make a submission" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
@javascript
Scenario: Automatic completion items should reset when a new attempt is manually given.
Given I am on the "Music history 2" "assign activity" page logged in as student1
And the "Make a submission" completion condition of "Music history 2" is displayed as "todo"
And I press "Add submission"
And I set the field "Online text" to "History of playing with drumsticks reversed"
And I press "Save changes"
And I press "Submit assignment"
And I press "Continue"
And the "Make a submission" completion condition of "Music history 2" is displayed as "done"
And I log out
And I am on the "Music history 2" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Vinnie Student1" "table_row"
And I set the field "Grade out of 100" to "33"
And I set the field "Notify student" to "0"
And I set the field "Allow another attempt" to "Yes"
And I press "Save changes"
And I log out
When I am on the "Music history 2" "assign activity" page logged in as student1
And I should see "Reopened"
And "Add a new attempt based on previous submission" "button" should exist
Then the "Make a submission" completion condition of "Music history 2" is displayed as "todo"
@@ -0,0 +1,46 @@
@mod @mod_assign
Feature: Teacher can enable anonymous submissions for an assignment
In order to make an anonymous submission to an assignment
As a teacher
I should be able to enable anonymous submissions
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | One | teacher1@example.com |
| student1 | Student | One | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | course | name | assignsubmission_onlinetext_enabled | blindmarking |
| assign | C1 | Assign 1 | 1 | 1 |
@javascript
Scenario: Teacher can enable anonymous submissions
# Submit an assignment as student1
Given the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Assign 1 | student1 | I'm the student's first submission |
When I am on the "Assign 1" "assign activity editing" page logged in as teacher1
# Confirm that anonymous submissions can't be changed to no anymore
Then "blindmarking" "select" should not exist
And I press "Cancel"
And I am on the "Assign 1" "assign activity" page
And I click on "View all submissions" "link"
# Confirm that Participant [n] is displayed instead of Student One - student name is hidden
And I should not see "Student One" in the "Participant" "table_row"
And I click on "Grade" "link" in the "Participant" "table_row"
And I set the field "Grade out of 100" to "70"
And I press "Save changes"
And I am on the "Assign 1" "assign activity" page
And I follow "Reveal student identities"
And I should see "Are you sure you want to reveal student identities for this assignment? This operation cannot be undone. Once the student identities have been revealed, the marks will be released to the gradebook."
And I press "Continue"
# Confirm that student identity is no longer hidden and grade is retained
And I should not see "Participant" in the "Student One" "table_row"
And I should see "70.00" in the "Student One" "table_row"
@@ -0,0 +1,29 @@
@mod @mod_assign
Feature: Switch role does not cause an error message in assignsubmission_comments
Scenario: I switch role to student and an error doesn't occur
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist:
| username |
| teacher1 |
And the following "course enrolments" exist:
| course | user | role |
| C1 | teacher1 | editingteacher |
And the following "activities" exist:
| activity | course | idnumber | name | intro | teamsubmission |
| assign | C1 | a1 | Test assignment one | This is the description text | 1 |
And the following "activity" exists:
| activity | assign |
| idnumber | ass1 |
| course | C1 |
| name | Test assignment |
| intro | This is the description text |
| teamsubmission | 1 |
| submissiondrafts | 0 |
And I am on the "C1" Course page logged in as teacher1
When I follow "Switch role to..." in the user menu
And I press "Student"
And I follow "Test assignment"
Then I should see "This is the description text"
@@ -0,0 +1,126 @@
@mod @mod_assign
Feature: Assign reset
In order to reuse past Assignss
As a teacher
I need to remove all previous data.
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
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 |
| Group 2 | C1 | G2 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_onlinetext_wordlimit_enabled | 1 |
| assignsubmission_onlinetext_wordlimit | 10 |
| assignsubmission_file_enabled | 0 |
| submissiondrafts | 0 |
Scenario: Use course reset to clear all attempt data
Given the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student first submission |
And I am on the "Test assignment name" Activity page logged in as student1
And I should see "Submitted for grading"
And I should see "I'm the student first submission"
And I should see "Not graded"
And I log out
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I should see "Submitted for grading"
When I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all submissions | 1 |
And I press "Reset course"
And I press "Continue"
And I am on the "Test assignment name" Activity page
And I follow "View all submissions"
Then I should not see "Submitted for grading"
@javascript
Scenario: Use course reset to remove user overrides.
And I am on the "Test assignment name" Activity page logged in as teacher1
And I navigate to "Overrides" in current page administration
And I press "Add user override"
And I set the following fields to these values:
| Override user | Student1 |
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save"
And I should see "Sam1 Student1"
When I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all user overrides | 1 |
And I press "Reset course"
And I press "Continue"
And I am on "Course 1" course homepage
And I click on "Test assignment name" "link" in the "region-main" "region"
And I navigate to "Overrides" in current page administration
Then I should not see "Sam1 Student1"
Scenario: Use course reset to remove group overrides.
When I am on the "Test assignment name" Activity page logged in as teacher1
And I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
And I press "Add group override"
And I set the following fields to these values:
| Override group | Group 1 |
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save"
And I should see "Group 1"
And I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all group overrides | 1 |
And I press "Reset course"
And I press "Continue"
And I am on the "Test assignment name" Activity page
And I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
Then I should not see "Group 1"
Scenario: Use course reset to reset blind marking assignment.
When I am on the "Test assignment name" Activity page logged in as teacher1
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| blindmarking | 1 |
And I press "Save"
When I am on the "Test assignment name" Activity page
And I follow "View all submissions"
And I select "Reveal student identities" from the "Grading action" singleselect
And I press "Continue"
And I should see "Sam1 Student1"
When I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all submissions | 1 |
And I press "Reset course"
And I press "Continue"
And I am on the "Test assignment name" Activity page
And I follow "View all submissions"
Then I should not see "Sam1 Student1"
@@ -0,0 +1,259 @@
@mod @mod_assign
Feature: Assign group override
In order to grant a group special access to an assignment
As a teacher
I need to create an override for that group.
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
| student3 | Sam3 | Student3 | student3@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
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 |
| Group 2 | C1 | G2 |
Given the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G2 |
| student3 | G1 |
And the following "activities" exist:
| activity | name | intro | course | assignsubmission_onlinetext_enabled |
| assign | Test assignment name | Submit your online text | C1 | 1 |
Scenario: Add, modify then delete a group override
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
And I press "Add group override"
And I set the following fields to these values:
| Override group | Group 1 |
| Due date | ##1 Jan 2020 08:00## |
And I press "Save"
Then I should see "Wednesday, 1 January 2020, 8:00"
And I click on "Edit" "link" in the "Group 1" "table_row"
And I set the following fields to these values:
| Due date | ##1 Jan 2030 08:00## |
And I press "Save"
And I should see "Tuesday, 1 January 2030, 8:00"
And I click on "Delete" "link"
And I press "Continue"
And I should not see "Group 1"
Scenario: Duplicate a user override
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
And I press "Add group override"
And I set the following fields to these values:
| Override group | Group 1 |
| Due date | ##1 Jan 2020 08:00## |
And I press "Save"
Then I should see "Wednesday, 1 January 2020, 8:00"
And I click on "copy" "link"
And I set the following fields to these values:
| Override group | Group 2 |
| Due date | ##1 Jan 2030 08:00## |
And I press "Save"
And I should see "Tuesday, 1 January 2030, 8:00"
And I should see "Group 2"
Scenario: Allow a group to have a different due date
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Allow submissions from | disabled |
| Due date | ##1 Jan 2000 08:00## |
| Cut-off date | disabled |
And I press "Save and display"
And I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
And I press "Add group override"
And I set the following fields to these values:
| Override group | Group 1 |
| Due date | ##1 Jan 2020 08:00## |
And I press "Save"
And I should see "Wednesday, 1 January 2020, 8:00"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
Then the activity date in "Test assignment name" should contain "Due: Saturday, 1 January 2000, 8:00"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And the activity date in "Test assignment name" should contain "Due: Wednesday, 1 January 2020, 8:00"
Scenario: Allow a group to have a different cut off date
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Due date | disabled |
| Allow submissions from | disabled |
| Cut-off date | ##1 Jan 2000 08:00## |
And I press "Save and display"
And I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
And I press "Add group override"
And I set the following fields to these values:
| Override group | Group 1 |
| Cut-off date | ##1 Jan 2030 08:00## |
And I press "Save"
And I should see "Tuesday, 1 January 2030, 8:00"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
Then I should not see "You have not made a submission yet."
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And I should see "No submissions have been made yet"
Scenario: Allow a group to have a different start date
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Due date | disabled |
| Allow submissions from | ##1 January 2030 08:00## |
| Cut-off date | disabled |
And I press "Save and display"
And I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
And I press "Add group override"
And I set the following fields to these values:
| Override group | Group 1 |
| Allow submissions from | ##1 Jan 2015 08:00## |
And I press "Save"
And I should see "Thursday, 1 January 2015, 8:00"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
Then the activity date in "Test assignment name" should contain "Opens: Tuesday, 1 January 2030, 8:00"
And I should not see "Add submission"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And I should not see "Tuesday, 1 January 2030, 8:00"
@javascript
Scenario: Add both a user and group override and verify that both are applied correctly
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Due date | disabled |
| Allow submissions from | ##1 January 2040 08:00## |
| Cut-off date | disabled |
| Group mode | Visible groups |
And I press "Save and display"
And I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
And I press "Add group override"
And I set the following fields to these values:
| Override group | Group 1 |
| Allow submissions from | ##1 January 2030 08:00## |
And I press "Save"
And I should see "Tuesday, 1 January 2030, 8:00"
And I am on the "Test assignment name" Activity page
And I navigate to "Overrides" in current page administration
And I press "Add user override"
And I set the following fields to these values:
| Override user | Student1 |
| Allow submissions from | ##1 January 2031 08:00## |
And I press "Save"
And I should see "Wednesday, 1 January 2031, 8:00"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And the activity date in "Test assignment name" should contain "Opens: Wednesday, 1 January 2031, 8:00"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
And the activity date in "Test assignment name" should contain "Opens: Sunday, 1 January 2040, 8:00"
And I log out
And I am on the "Test assignment name" Activity page logged in as student3
And the activity date in "Test assignment name" should contain "Opens: Tuesday, 1 January 2030, 8:00"
Scenario: Override a group when teacher is in no group, and does not have accessallgroups permission, and the activity's group mode is "separate groups"
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| moodle/site:accessallgroups | Prevent | editingteacher | Course | C1 |
And the following "activities" exist:
| activity | name | intro | course | groupmode |
| assign | Assignment 2 | Assignment 2 description | C1 | 1 |
And I am on the "Assignment 2" Activity page logged in as teacher1
When I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
Then I should see "No groups you can access."
And the "Add group override" "button" should be disabled
Scenario: A teacher without accessallgroups permission should only be able to add group override for groups that he/she is a member of,
when the activity's group mode is "separate groups"
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| moodle/site:accessallgroups | Prevent | editingteacher | Course | C1 |
And the following "activities" exist:
| activity | name | intro | course | groupmode |
| assign | Assignment 2 | Assignment 2 description | C1 | 1 |
And the following "group members" exist:
| user | group |
| teacher1 | G1 |
And I am on the "Assignment 2" Activity page logged in as teacher1
When I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
And I press "Add group override"
Then the "Override group" select box should contain "Group 1"
And the "Override group" select box should not contain "Group 2"
Scenario: A teacher without accessallgroups permission should only be able to see the group overrides for groups that he/she is a member of,
when the activity's group mode is "separate groups"
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| moodle/site:accessallgroups | Prevent | editingteacher | Course | C1 |
And the following "activities" exist:
| activity | name | intro | course | groupmode |
| assign | Assignment 2 | Assignment 2 description | C1 | 1 |
And the following "group members" exist:
| user | group |
| teacher1 | G1 |
And I am on the "Assignment 2" Activity page logged in as admin
And I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
And I press "Add group override"
And I set the following fields to these values:
| Override group | Group 1 |
| Allow submissions from | ##1 January 2020 08:00## |
And I press "Save and enter another override"
And I set the following fields to these values:
| Override group | Group 2 |
| Allow submissions from | ##1 January 2020 08:00## |
And I press "Save"
And I log out
When I am on the "Assignment 2" Activity page logged in as teacher1
And I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
Then I should see "Group 1" in the ".generaltable" "css_element"
And I should not see "Group 2" in the ".generaltable" "css_element"
Scenario: "Not visible" groups should not be available for group overrides
Given the following "groups" exist:
| name | course | idnumber | visibility | participation |
| Visible to everyone/Participation | C1 | VP | 0 | 1 |
| Only visible to members/Participation | C1 | MP | 1 | 1 |
| Only see own membership | C1 | O | 2 | 0 |
| Not visible | C1 | N | 3 | 0 |
| Visible to everyone/Non-Participation | C1 | VN | 0 | 0 |
| Only visible to members/Non-Participation | C1 | MN | 1 | 0 |
When I am on the "Test assignment name" Activity page logged in as teacher1
And I navigate to "Overrides" in current page administration
And I select "Group overrides" from the "jump" singleselect
And I press "Add group override"
Then I should see "Visible to everyone/Participation" in the "Override group" "select"
And I should see "Visible to everyone/Non-Participation" in the "Override group" "select"
And I should see "Only visible to members" in the "Override group" "select"
And I should see "Only visible to members/Non-Participation" in the "Override group" "select"
And I should see "Only see own membership" in the "Override group" "select"
And I should not see "Not visible" in the "Override group" "select"
@@ -0,0 +1,39 @@
@mod @mod_assign
Feature: When a Teacher hides an assignment from view for students it should consistently indicate it is hidden.
Background: Grade multiple students on one page
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test hidden assignment |
| visible | 0 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test visible assignment |
Scenario: A teacher can view a hidden assignment
When I am on the "Test hidden assignment" Activity page logged in as teacher1
Then I should see "Test hidden assignment"
And I should see "Yes" in the "Hidden from students" "table_row"
Scenario: A teacher can view a visible assignment
Given I am on the "Test visible assignment" Activity page logged in as teacher1
Then I should see "Test visible assignment"
And I should see "No" in the "Hidden from students" "table_row"
Scenario: A student cannot view a hidden assignment
And I am on the "C1" Course page logged in as student1
And I should not see "Test hidden assignment"
And I should see "Test visible assignment"
@@ -0,0 +1,44 @@
@mod @mod_assign
Feature: Assignment with no calendar capabilites
In order to allow work effectively
As a teacher
I need to be able to create assignments even when I cannot edit calendar events
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I am on the "C1" "permissions" page logged in as admin
And I override the system permissions of "Teacher" role with:
| capability | permission |
| moodle/calendar:manageentries | Prohibit |
Scenario: Editing an assignment
Given the following "activities" exist:
| activity | name | intro | course | section |
| assign | Test assignment name | Test assignment description | C1 | 1 |
And I am on the "Test assignment name" Activity page
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Allow submissions from | ##1 January 2017## |
| Due date | ##1 February 2017## |
| Cut-off date | ##2 February 2017## |
| Remind me to grade by | ##1 March 2017## |
And I press "Save and return to course"
And I log out
When I am on the "Test assignment name" Activity page logged in as teacher1
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Allow submissions from | ##1 January 2018## |
| Due date | ##1 February 2018## |
| Cut-off date | ##2 February 2018## |
| Remind me to grade by | ##1 March 2018## |
And I press "Save and return to course"
Then I should see "Test assignment name"
@@ -0,0 +1,57 @@
@mod @mod_assign
Feature: In an assignment, teachers can use table preferences.
In order to improve grading process
As a teacher
I need to be able to filter students by first and last name.
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | One | student1@example.com |
| student2 | Student | Two | student2@example.com |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | enablecompletion | showcompletionconditions |
| Course 1 | C1 | 1 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| teacher1 | C1 | editingteacher |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment |
| assignsubmission_onlinetext_enabled | 1 |
And I log out
And I log in as "student1"
And I am on the "Test assignment" Activity page
And I press "Add submission"
And I set the following fields to these values:
| Online text | This is a submission for Student One |
And I press "Save changes"
And I press "Submit assignment"
And I press "Continue"
And I log out
And I log in as "student2"
And I am on the "Test assignment" Activity page
And I press "Add submission"
And I set the following fields to these values:
| Online text | This is a submission for Student Two |
And I press "Save changes"
And I press "Submit assignment"
And I press "Continue"
@javascript
Scenario: As a teacher I can filter student submissions on the View all submission page
When I log in as "teacher1"
And I am on the "Test assignment" Activity page
And I follow "View all submissions"
And I click on "T" "link" in the ".lastinitial" "css_element"
And I click on "Grade" "link" in the "Student Two" "table_row"
And I should see "This is a submission for Student Two"
And I should see "1 of 1"
And I follow "Reset table preferences"
Then I should see "This is a submission for Student Two"
And I should see "2 of 2"
And I log out
@@ -0,0 +1,222 @@
@mod @mod_assign
Feature: Assign user override
In order to grant a student special access to an assignment
As a teacher
I need to create an override for that user.
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | assignsubmission_onlinetext_enabled |
| assign | Test assignment name | Submit your online text | C1 | 1 |
@javascript
Scenario: Add, modify then delete a user override
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Overrides" in current page administration
And I press "Add user override"
And I set the following fields to these values:
| Override user | Student1 |
| Due date | ##first day of January 2020 08:00## |
And I press "Save"
Then I should see "Wednesday, 1 January 2020, 8:00"
And I click on "Edit" "link" in the "Sam1 Student1" "table_row"
And I set the following fields to these values:
| Due date | ##first day of January 2030 08:00## |
And I press "Save"
And I should see "Tuesday, 1 January 2030, 8:00"
And I click on "Delete" "link"
And I press "Continue"
And I should not see "Sam1 Student1"
@javascript
Scenario: Duplicate a user override
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Overrides" in current page administration
And I press "Add user override"
And I set the following fields to these values:
| Override user | Student1 |
| Due date | ##2020-01-01 08:00## |
And I press "Save"
Then I should see "Wednesday, 1 January 2020, 8:00"
And I click on "copy" "link"
And I set the following fields to these values:
| Override user | Student2 |
| Due date | ##2030-01-01 08:00## |
And I press "Save"
And I should see "Tuesday, 1 January 2030, 8:00"
And I should see "Sam2 Student2"
@javascript
Scenario: Allow a user to have a different due date
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Allow submissions from | disabled |
| Due date | ##1 Jan 2000 08:00## |
| Cut-off date | disabled |
And I press "Save and display"
And I navigate to "Overrides" in current page administration
And I press "Add user override"
And I set the following fields to these values:
| Override user | Student1 |
| Due date | ##1 Jan 2020 08:00## |
And I press "Save"
Then I should see "Wednesday, 1 January 2020, 8:00"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
And the activity date in "Test assignment name" should contain "Due: Saturday, 1 January 2000, 8:00"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And the activity date in "Test assignment name" should contain "Due: Wednesday, 1 January 2020, 8:00"
@javascript
Scenario: Allow a user to have a different cut off date
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Due date | disabled |
| Allow submissions from | disabled |
| Cut-off date | ##1 Jan 2000 08:00## |
And I press "Save and display"
And I navigate to "Overrides" in current page administration
And I press "Add user override"
And I set the following fields to these values:
| Override user | Student1 |
| Cut-off date | ##1 Jan 2030 08:00## |
And I press "Save"
And I should see "Tuesday, 1 January 2030, 8:00"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
Then I should not see "Add submission"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And I should see "Add submission"
@javascript
Scenario: Allow a user to have a different start date
Given I am on the "Test assignment name" Activity page logged in as teacher1
When I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Due date | disabled |
| Allow submissions from | ##1 January 2030 08:00## |
| Cut-off date | disabled |
And I press "Save and display"
And I navigate to "Overrides" in current page administration
And I press "Add user override"
And I set the following fields to these values:
| Override user | Student1 |
| Allow submissions from | ##1 Jan 2015 08:00## |
And I press "Save"
And I should see "Thursday, 1 January 2015, 8:00"
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
And I click on "Test assignment name" "link" in the "region-main" "region"
Then the activity date in "Test assignment name" should contain "Opens: Tuesday, 1 January 2030, 8:00"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I click on "Test assignment name" "link" in the "region-main" "region"
And I should not see "1 January 2030, 8:00"
Scenario: Override a user when teacher is in no group, and does not have accessallgroups permission, and the activity's group mode is "separate groups"
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| moodle/site:accessallgroups | Prevent | editingteacher | Course | C1 |
And the following "activities" exist:
| activity | name | intro | course | groupmode |
| assign | Assignment 2 | Assignment 2 description | C1 | 1 |
And I am on the "Assignment 2" Activity page logged in as teacher1
When I navigate to "Overrides" in current page administration
Then I should see "No groups you can access."
And the "Add user override" "button" should be disabled
Scenario: A teacher without accessallgroups permission should only be able to add user override for users that he/she shares groups with,
when the activity's group mode is "separate groups"
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| moodle/site:accessallgroups | Prevent | editingteacher | Course | C1 |
And the following "activities" exist:
| activity | name | intro | course | groupmode |
| assign | Assignment 2 | Assignment 2 description | C1 | 1 |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "group members" exist:
| user | group |
| teacher1 | G1 |
| student1 | G1 |
| student2 | G2 |
And I am on the "Assignment 2" Activity page logged in as teacher1
When I navigate to "Overrides" in current page administration
And I press "Add user override"
Then the "Override user" select box should contain "Sam1 Student1, student1@example.com"
And the "Override user" select box should not contain "Sam2 Student2, student2@example.com"
@javascript
Scenario: A teacher without accessallgroups permission should only be able to see the user override for users that he/she shares groups with,
when the activity's group mode is "separate groups"
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| moodle/site:accessallgroups | Prevent | editingteacher | Course | C1 |
And the following "activities" exist:
| activity | name | intro | course | groupmode |
| assign | Assignment 2 | Assignment 2 description | C1 | 1 |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "group members" exist:
| user | group |
| teacher1 | G1 |
| student1 | G1 |
| student2 | G2 |
And I am on the "Assignment 2" Activity page logged in as admin
And I navigate to "Overrides" in current page administration
And I press "Add user override"
And I set the following fields to these values:
| Override user | Student1 |
| Allow submissions from | ##first day of January 2015 08:00## |
And I press "Save and enter another override"
And I set the following fields to these values:
| Override user | Student2 |
| Allow submissions from | ##first day of January 2015 08:00## |
And I press "Save"
And I log out
And I am on the "Assignment 2" Activity page logged in as teacher1
When I navigate to "Overrides" in current page administration
Then I should see "Student1" in the ".generaltable" "css_element"
But I should not see "Student2" in the ".generaltable" "css_element"
@javascript
Scenario: Create a user override when the assignment is not available to the student
Given I am on the "Test assignment name" Activity page logged in as teacher1
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Availability" to "Hide on course page"
And I click on "Save and display" "button"
When I navigate to "Overrides" in current page administration
And I press "Add user override"
And I set the following fields to these values:
| Override user | Student1 |
| Allow submissions from | ##1 Jan 2015 08:00## |
And I press "Save"
Then I should see "This override is inactive"
And "Edit" "icon" should exist in the "Sam1 Student1" "table_row"
And "copy" "icon" should exist in the "Sam1 Student1" "table_row"
And "Delete" "icon" should exist in the "Sam1 Student1" "table_row"
@@ -0,0 +1,74 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Behat custom steps and configuration for mod_bigbluebuttonbn.
*
* @package mod_assign
* @category test
* @copyright 2024 Simey Lameze <simey@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../../../lib/behat/behat_base.php');
use Behat\Gherkin\Node\TableNode;
/**
* Behat custom steps and configuration for mod_assign.
*
* @package mod_assign
* @category test
* @copyright 2024 Simey Lameze <simey@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class behat_mod_assign extends behat_base {
/**
* Check that the marking guide information is displayed correctly.
*
* @Then /^I should see the marking guide information displayed as:$/
* @param TableNode $table The table of marking guide information to check.
*/
public function i_should_see_marking_guide_information(TableNode $table) {
if (!$table->getRowsHash()) {
return;
}
$criteriacheck = 1;
foreach ($table as $row) {
$locator = "//table[@id='guide0-criteria']/tbody/tr[$criteriacheck]/td";
$this->assertSession()->elementContains('xpath', "{$locator}[@class='descriptionreadonly']", $row['criteria']);
$this->assertSession()->elementContains('xpath', "{$locator}[@class='descriptionreadonly']", $row['description']);
if (!empty($row['remark'])) {
$this->assertSession()->elementContains('xpath', "{$locator}[@class='remark']", $row['remark']);
}
if (!empty($row['maxscore'])) {
$this->assertSession()->elementContains('xpath', "{$locator}[@class='descriptionreadonly']", $row['maxscore']);
}
if (!empty($row['criteriascore'])) {
$this->assertSession()->elementContains('xpath', "{$locator}[@class='score']", $row['criteriascore']);
}
$criteriacheck++;
}
}
}
@@ -0,0 +1,143 @@
@mod @mod_assign
Feature: Bulk released grades should not be sent to gradebook while submissions are anonymous.
In order to preserve student anonymity until identities are explicitly revealed
As a teacher
I should be able to bulk release grades for anonymous submissions via
marking workflow without the grades being pushed to the gradebook.
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
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 |
# Add the assignment.
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| markingworkflow | 1 |
| markinganonymous | 0 |
| blindmarking | 1 |
| assignfeedback_comments_enabled | 1 |
| assignfeedback_editpdf_enabled | 1 |
# Add a submission.
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm student1's submission |
| Test assignment name | student2 | I'm student2's submission |
# Mark the submissions.
And I am on the "Test assignment name" "assign activity" page logged in as "teacher1"
And I follow "View all submissions"
Then I should see "Not marked" in the "I'm student1's submission" "table_row"
And I click on "Grade" "link" in the "I'm student1's submission" "table_row"
And I set the field "Grade out of 100" to "50"
And I set the field "Marking workflow state" to "In review"
And I set the field "Feedback comments" to "Great job!"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
Then I should see "Not marked" in the "I'm student2's submission" "table_row"
And I click on "Grade" "link" in the "I'm student2's submission" "table_row"
And I set the field "Grade out of 100" to "50"
And I set the field "Marking workflow state" to "In review"
And I set the field "Feedback comments" to "Great job!"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
Then I should see "In review" in the "I'm student1's submission" "table_row"
And I should see "In review" in the "I'm student2's submission" "table_row"
@javascript @_alert
Scenario: Grades are released in bulk before student identities are revealed.
When I set the field "selectall" to "1"
And I set the field "operation" to "Set marking workflow state"
And I click on "Go" "button" confirming the dialogue
Then I should not see "Student 1 (student1@example.com)"
And I should not see "Student 2 (student2@example.com)"
And I set the field "Marking workflow state" to "Released"
And I set the field "Notify student" to "No"
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
Then I should see "Released" in the "I'm student1's submission" "table_row"
And I should see "Released" in the "I'm student2's submission" "table_row"
And I am on the "Course 1" "grades > User report > View" page logged in as "student1"
Then I should not see "50"
And I should not see "Great job!"
And I am on the "Course 1" "grades > User report > View" page logged in as "student2"
Then I should not see "50"
And I should not see "Great job!"
And I am on the "Test assignment name" "assign activity" page logged in as "teacher1"
And I follow "View all submissions"
And I set the field "Grading action" to "Reveal student identities"
And I press "Continue"
Then I should see "Released" in the "Student 1" "table_row"
And I should see "Released" in the "Student 2" "table_row"
And I am on the "Course 1" "grades > User report > View" page logged in as "student1"
Then I should see "50"
And I should see "Great job!"
And I am on the "Course 1" "grades > User report > View" page logged in as "student2"
Then I should see "50"
And I should see "Great job!"
@javascript @_alert
Scenario: Grades are released in bulk after student identities are revealed.
When I set the field "Grading action" to "Reveal student identities"
And I press "Continue"
When I set the field "selectall" to "1"
And I set the field "operation" to "Set marking workflow state"
And I click on "Go" "button" confirming the dialogue
Then I should see "Student 1 (student1@example.com)"
And I should see "Student 2 (student2@example.com)"
And I set the field "Marking workflow state" to "Released"
And I set the field "Notify student" to "No"
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
Then I should see "Released" in the "Student 1" "table_row"
And I should see "Released" in the "Student 2" "table_row"
And I am on the "Course 1" "grades > User report > View" page logged in as "student1"
Then I should see "50"
And I should see "Great job!"
And I am on the "Course 1" "grades > User report > View" page logged in as "student2"
Then I should see "50"
And I should see "Great job!"
@javascript @_alert
Scenario: Grades are released to the gradebook if markinganonymous is enabled
Given I follow "Settings"
And I expand all fieldsets
And I set the field "Allow partial release of grades while marking anonymously" to "Yes"
And I press "Save and display"
And I follow "View all submissions"
When I set the field "selectall" to "1"
And I set the field "operation" to "Set marking workflow state"
And I click on "Go" "button" confirming the dialogue
Then I should not see "Student 1 (student1@example.com)"
And I should not see "Student 2 (student2@example.com)"
And I set the field "Marking workflow state" to "Released"
And I set the field "Notify student" to "No"
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
Then I should see "Released" in the "I'm student1's submission" "table_row"
And I should see "Released" in the "I'm student2's submission" "table_row"
And I am on the "Course 1" "grades > User report > View" page logged in as "student1"
Then I should see "50"
And I should see "Great job!"
And I am on the "Course 1" "grades > User report > View" page logged in as "student2"
Then I should see "50"
And I should see "Great job!"
@@ -0,0 +1,154 @@
@mod @mod_assign
Feature: Bulk remove submissions
In order to reset the assignment submission of multiple students
As a teacher with the capability to edit submissions
I need to be able to remove student submissions by bulk
Background:
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_zerosize
Scenario: Bulk remove submissions should remove the data that was submitted
Given 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 teacher1
And 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 dialogue
Then I should not see "I'm the student1 submission"
And I should not see "I'm the student2 submission"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And I should not see "I'm the student1 submission"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
And I should not see "I'm the student2 submission1"
@javascript
Scenario: Bulk remove submissions should be unavailable if the user is missing the editing submission capability
Given 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 teacher1
And 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_zerosize
Scenario: Bulk remove submission when shared group users are added to the bulk
removing submissions process in separate group mode without access all groups capability
Given 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 teacher1
And 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 should not see "I'm the student3 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 dialogue
Then I should not see "I'm the student1 submission"
Then I should not see "I'm the student2 submission"
@javascript @skip_chrome_zerosize
Scenario: Bulk remove submission when group users and non-group users are added to the bulk
removing submissions process in separate group mode with access all groups capability
Given 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 teacher1
And 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 should see "I'm the student3 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 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"
@@ -0,0 +1,56 @@
@mod @mod_assign
Feature: In an assignment, teachers can edit a students submission inline
In order to easily mark students assignments
As a teacher
I need to have a students submission text copied to the grading online form.
@javascript @_file_upload
Scenario: Submit a text online and edit the submission
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| assignfeedback_comments_enabled | 1 |
| assignfeedback_file_enabled | 1 |
| assignfeedback_comments_commentinline | 1 |
| submissiondrafts | 0 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student first submission |
When I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the following fields to these values:
| Grade out of 100 | 50 |
| Feedback comments | I'm the teacher feedback |
And I upload "lib/tests/fixtures/empty.txt" file to "Feedback files" filemanager
And I press "Save changes"
And I follow "View all submissions"
Then I should see "50.00" in the "Student 1" "table_row"
And I should see "Submitted for grading" in the "Student 1" "table_row"
And I should see "Graded" in the "Student 1" "table_row"
And I should see "I'm the student first submission" in the "Student 1" "table_row"
And I should see "I'm the teacher feedback" in the "Student 1" "table_row"
And I should see "empty.txt" in the "Student 1" "table_row"
And I log out
When I am on the "Test assignment name" Activity page logged in as student1
And I should see "Submitted for grading" in the "Submission status" "table_row"
And I should see "Graded" in the "Grading status" "table_row"
And I should see "I'm the student first submission" in the "Online text" "table_row"
And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row"
And I should see "empty.txt" in the "Feedback files" "table_row"
@@ -0,0 +1,65 @@
@mod @mod_assign
Feature: Check that the assignment grade can not be input in a wrong format.
In order to ensure that the grade is entered in the right format
As a teacher
I need to grade a student and ensure that the grade should be correctly entered
@javascript
Scenario: Error in the decimal separator ,
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student10@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Test assignment description |
| markingworkflow | 1 |
| submissiondrafts | 0 |
When I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "50,,6"
And I press "Save changes"
Then I should see "The grade provided could not be understood: 50,,6"
@javascript
Scenario: Error in the decimal separator .
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student10@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Test assignment description |
| markingworkflow | 1 |
| submissiondrafts | 0 |
When I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "50..6"
And I press "Save changes"
Then I should see "The grade provided could not be understood: 50..6"
@@ -0,0 +1,71 @@
@mod @mod_assign
Feature: Check that the assignment grade can be updated correctly
In order to ensure that the grade is shown correctly in the grading table
As a teacher
I need to grade a student and ensure the grade is shown correctly
@javascript
Scenario: Update the grade for an assignment
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student10@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Test assignment description |
| markingworkflow | 1 |
| submissiondrafts | 0 |
And I am on the "Test assignment name" Activity page logged in as teacher1
Then I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "50"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I follow "View all submissions"
And "Student 1" row "Grade" column of "generaltable" table should contain "50.00"
@javascript
Scenario: Update the grade for a team assignment
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student10@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Test assignment description |
| markingworkflow | 1 |
| submissiondrafts | 0 |
| teamsubmission | 1 |
| groupmode | 0 |
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "50"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I follow "View all submissions"
Then "Student 1" row "Grade" column of "generaltable" table should contain "50.00"
@@ -0,0 +1,62 @@
@mod @mod_assign
Feature: Duplicate assign activity module with permissions
In order to ensure that locally assigned roles and permissions are correctly duplicated
As a teacher
I need to add the roles and permissions and ensure they are correctly duplicated
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student10@example.com |
| student2 | Student | 2 | student20@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Test assignment description |
| markingworkflow | 1 |
| submissiondrafts | 0 |
@javascript
Scenario: Add a locally assigned role and duplicate activity
Given I log in as "teacher 1"
And I am on "Course 1" course homepage with editing mode on
When I open "Test assignment name" actions menu
And I click on "Assign roles" "link" in the "Test assignment name" activity
And I click on "Non-editing teacher" "link"
And I click on "Student 2" "option"
And I click on "Add" "button"
And I am on "Course 1" course homepage with editing mode on
And I duplicate "Test assignment name" activity
Then I should see "Test assignment name (copy)"
And I open "Test assignment name (copy)" actions menu
And I click on "Assign roles" "link" in the "Test assignment name (copy)" activity
Then "Non-editing teacher" row "Users with role" column of "generaltable" table should contain "1"
@javascript
Scenario: Add a permission override to activity and duplicate
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| mod/assign:grade | Allow | student | 70 | Test assignment name |
And I log in as "admin"
When I am on "Course 1" course homepage with editing mode on
And I duplicate "Test assignment name" activity
Then I should see "Test assignment name (copy)"
And I open "Test assignment name (copy)" actions menu
And I click on "Edit settings" "link" in the "Test assignment name (copy)" activity
And I navigate to "Permissions" in current page administration
And I set the field "permissionscapabilitysearch" to "mod/assign:grade"
Then "Grade assignmentmod/assign:grade" row "Roles with permission" column of "permissions" table should contain "Student"
@@ -0,0 +1,66 @@
@mod @mod_assign
Feature: In an assignment, teachers can edit feedback for a students previous submission attempt
In order to correct feedback for a previous submission attempt
As a teacher
I need to be able to edit the feedback for a students previous submission attempt.
@javascript
Scenario: Edit feedback for a students previous attempt.
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
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 "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignfeedback_comments_enabled | 1 |
| submissiondrafts | 0 |
| attemptreopenmethod | manual |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student2 | I'm the student first submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 2" "table_row"
And I set the following fields to these values:
| Grade | 49 |
| Feedback comments | I'm the teacher first feedback |
| Allow another attempt | Yes |
And I press "Save changes"
And I click on "Edit settings" "link"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
And I should see "I'm the teacher first feedback" in the "Feedback comments" "table_row"
And I log out
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 2" "table_row"
And I click on "View a different attempt" "link"
And I click on "Attempt 1" "radio" in the "View a different attempt" "dialogue"
And I click on "View" "button" in the "View a different attempt" "dialogue"
And I set the following fields to these values:
| Grade | 50 |
| Feedback comments | I'm the teacher second feedback |
And I press "Save changes"
And I click on "Edit settings" "link"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
Then I should see "I'm the teacher second feedback" in the "Feedback comments" "table_row"
And I should see "50.00"
And I click on ".mod-assign-history-link" "css_element"
And I should not see "I'm the teacher second feedback" in the "Feedback comments" "table_row"
@@ -0,0 +1,41 @@
@mod @mod_assign @javascript
Feature: In an assignment, the administrator can edit students' submissions
In order to edit a student's submissions
As an administrator
I need to grade multiple students on one page
Scenario: Editing a student's submission
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student1 submission |
And I am on the "Test assignment name" Activity page logged in as admin
And I follow "View all submissions"
And I open the action menu in "Student 1" "table_row"
And I choose "Edit submission" in the open action menu
And I set the following fields to these values:
| Online text | Have you seen the movie Chef? |
And I press "Save changes"
Then I should see "Have you seen the movie Chef?"
And I open the action menu in "Student 1" "table_row"
And I choose "Edit submission" in the open action menu
And I set the following fields to these values:
| Online text | I have seen the movie chef. |
And I press "Save changes"
Then I should see "I have seen the movie chef."
@@ -0,0 +1,49 @@
@mod @mod_assign @_file_upload
Feature: In an assignment, students can upload files for assessment
In order to complete my assignments providing files
As a student
I need to upload files from my file system to be assessed
@javascript
Scenario: Submit a file and update the submission with another file
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 0 |
| assignsubmission_file_enabled | 1 |
| assignsubmission_file_maxfiles | 2 |
| assignsubmission_file_maxsizebytes | 1000000 |
And I am on the "Test assignment name" Activity page logged in as student1
When I press "Add submission"
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
And I press "Save changes"
Then I should see "Submitted for grading"
And I should see "Not graded"
And "empty.txt" "link" should exist
And I press "Edit submission"
And I upload "lib/tests/fixtures/upload_users.csv" file to "File submissions" filemanager
And ".ffilemanager .fm-maxfiles .fp-btn-add" "css_element" should not be visible
And I press "Save changes"
And I should see "Submitted for grading"
And "empty.txt" "link" should exist
And "upload_users.csv" "link" should exist
And I press "Edit submission"
And ".ffilemanager .fm-maxfiles .fp-btn-add" "css_element" should not be visible
And I delete "empty.txt" from "File submissions" filemanager
And I press "Save changes"
And "empty.txt" "link" should not exist
And "upload_users.csv" "link" should exist
@@ -0,0 +1,52 @@
@mod @mod_assign
Feature: In an assignment, teachers can filter displayed submissions by assigned marker
In order to manage submissions more easily
As a teacher
I need to view submissions allocated to markers.
@javascript
Scenario: Allocate markers to submissions and filter by marker
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
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 |
| marker1 | Marker | 1 | marker1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| marker1 | C1 | teacher |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| markingworkflow | 1 |
| markingallocation | 1 |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "allocatedmarker" to "Marker 1"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I click on "Edit settings" "link"
When I am on the "Test assignment name" Activity page
And I follow "View all submissions"
And I set the field "markerfilter" to "Marker 1"
Then I should see "Student 1"
And I should not see "Student 2"
And I set the field "markerfilter" to "No marker"
And I should not see "Student 1"
And I should see "Student 2"
And I set the field "markerfilter" to "No filter"
And I should see "Student 1"
And I should see "Student 2"
@@ -0,0 +1,64 @@
@mod @mod_assign
Feature: In an assignment, teachers can filter displayed submissions and see drafts
In order to manage submissions more easily
As a teacher
I need to view submissions with draft status.
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 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 "activities" exist:
| activity | course | name | assignsubmission_onlinetext_enabled | submissiondrafts |
| assign | C1 | Test assignment | 1 | 1 |
And I am on the "Test assignment" Activity page logged in as student1
And I press "Add submission"
And I set the following fields to these values:
| Online text | This submission is submitted |
And I press "Save changes"
And I press "Submit assignment"
And I press "Continue"
And I log out
And I am on the "Test assignment" Activity page logged in as student2
And I press "Add submission"
And I set the following fields to these values:
| Online text | This submission is NOT submitted |
And I press "Save changes"
And I log out
@javascript
Scenario: View assignments with draft status on the view all submissions page
Given I am on the "Test assignment" Activity page logged in as teacher1
And I follow "View all submissions"
When I set the field "Filter" to "Draft"
Then I should see "Student 2"
And I should not see "Student 1"
And I should not see "Student 3"
@javascript
Scenario: View assignments with draft status in the grader
Given I am on the "Test assignment" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
When I click on "[data-region=user-filters]" "css_element"
And I set the field "filter" to "Draft"
Then I should see "1 of 1"
And I should see "No users selected"
And I click on "[data-region=user-selector]" "css_element"
And I type "Student"
And I should see "Student 2"
And I should not see "Student 1"
And I should not see "Student 3"
@@ -0,0 +1,78 @@
@mod @mod_assign
Feature: In an assignment, teachers can change filters in the grading app
In order to manage submissions more easily
As a teacher
I need to preserve filter settings between the grader app and grading table.
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 & | C1 | 0 | 1 |
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 |
| marker1 | Marker | 1 | marker1@example.com |
| marker2 | Marker | 2 | marker2@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| marker1 | C1 | teacher |
| marker2 | C1 | teacher |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name & |
| description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| markingworkflow | 1 |
| markingallocation | 1 |
@javascript
Scenario: Set filters in the grading table and see them in the grading app
Given I am on the "Test assignment name &" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I should not see "Course 1 &amp;"
And the "title" attribute of "a[title='Course: Course 1 &']" "css_element" should not contain "&amp;"
And I should not see "Test assignment name &amp;"
And I set the field "allocatedmarker" to "Marker 1"
And I set the field "workflowstate" to "In marking"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I am on the "Test assignment name &" Activity page
And I follow "View all submissions"
And I set the field "filter" to "Not submitted"
And I set the field "markerfilter" to "Marker 1"
And I set the field "workflowfilter" to "In marking"
And I click on "Grade" "link" in the "Student 1" "table_row"
Then the field "filter" matches value "Not submitted"
And the field "markerfilter" matches value "Marker 1"
And the field "workflowfilter" matches value "In marking"
@javascript
Scenario: Set filters in the grading app and see them in the grading table
Given I am on the "Test assignment name &" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "allocatedmarker" to "Marker 1"
And I set the field "workflowstate" to "In marking"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I am on the "Test assignment name &" Activity page
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I click on "[data-region=user-filters]" "css_element"
And I set the field "filter" to "Not submitted"
And I set the field "markerfilter" to "Marker 1"
And I set the field "workflowfilter" to "In marking"
And I click on "View all submissions" "link"
Then the field "filter" matches value "Not submitted"
And the field "markerfilter" matches value "Marker 1"
And the field "workflowfilter" matches value "In marking"
@@ -0,0 +1,158 @@
@mod @mod_assign
Feature: View the grading status of an assignment
In order to test the grading status for assignments is displaying correctly
As a student
I need to view my grading status
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
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 |
@javascript
Scenario: View the grading status for an assignment with marking workflow enabled
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| submissiondrafts | 0 |
| markingworkflow | 1 |
| assignfeedback_comments_enabled | 1 |
| assignsubmission_onlinetext_enabled | 1 |
# Add a submission.
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student first submission |
# Mark the submission.
And I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I should see "Not marked" in the "Student 1" "table_row"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I should see "1 of 2"
And I click on "Change filters" "link"
And I set the field "Filter" to "submitted"
And I should see "1 of 1"
And I set the field "Grade out of 100" to "50"
And I set the field "Marking workflow state" to "In review"
And I set the field "Feedback comments" to "Great job! Lol, not really."
And I set the field "Notify student" to "0"
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
And I should see "In review" in the "Student 1" "table_row"
And I log out
# View the grading status as a student.
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I should see "In review" in the "Grading status" "table_row"
And I should not see "Great job! Lol, not really."
And I log out
# Mark the submission again but set the marking workflow to 'Released'.
And I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I should see "In review" in the "Student 1" "table_row"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I should see "1 of 1"
And I set the field "Marking workflow state" to "Released"
And I press "Save changes"
And I follow "View all submissions"
And I should see "Released" in the "Student 1" "table_row"
And I log out
# View the grading status as a student.
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I should see "Released" in the "Grading status" "table_row"
And I should see "Great job! Lol, not really."
And I log out
# Now, change the status from 'Released' to 'In marking' (this will remove the grade from the gradebook).
And I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I should see "Released" in the "Student 1" "table_row"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I should see "1 of 1"
And I set the field "Marking workflow state" to "In marking"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
And I should see "In marking" in the "Student 1" "table_row"
# The grade should also remain displayed as it's stored in the assign DB tables, but the final grade should be empty.
And "Student 1" row "Grade" column of "generaltable" table should contain "50.00"
And "Student 1" row "Final grade" column of "generaltable" table should contain "-"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I click on "Change filters" "link"
And I set the field "Workflow filter" to "In review"
And I should see "0 of 0"
@javascript
Scenario: View the grading status for an assignment with marking workflow disabled
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| submissiondrafts | 0 |
| assignfeedback_comments_enabled | 1 |
| markingworkflow | 0 |
| assignsubmission_onlinetext_enabled | 1 |
# Add a submission.
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student first submission |
# Mark the submission.
And I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I should not see "Graded" in the "Student 1" "table_row"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I should see "1 of 2"
And I click on "Change filters" "link"
And I set the field "Filter" to "submitted"
And I should see "1 of 1"
And I set the field "Grade out of 100" to "50"
And I set the field "Feedback comments" to "Great job! Lol, not really."
And I press "Save changes"
And I click on "Edit settings" "link"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
And I should see "Graded" in the "Student 1" "table_row"
And I log out
# View the grading status as a student.
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I should see "Graded" in the "Grading status" "table_row"
And I should see "Great job! Lol, not really."
And I log out
# Student makes a subsequent submission.
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I press "Edit submission"
And I set the following fields to these values:
| Online text | I'm the student's second submission |
And I press "Save changes"
And I log out
# Teacher marks the submission again after noticing the 'Graded - resubmitted'.
And I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I should see "Graded - resubmitted" in the "Student 1" "table_row"
And I wait "10" seconds
And I click on "Grade" "link" in the "Student 1" "table_row"
And I should see "1 of 1"
And I set the field "Grade out of 100" to "99.99"
And I set the field "Feedback comments" to "Even better job! Really."
And I press "Save changes"
And I click on "Edit settings" "link"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
And I should see "Graded" in the "Student 1" "table_row"
And I log out
# View the grading status as a student again.
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I should see "Graded" in the "Grading status" "table_row"
And I should see "Even better job! Really."
@@ -0,0 +1,137 @@
@mod @mod_assign
Feature: Grant an extension to an offline student
In order to allow students to have an accurate due date
As a teacher
I need to grant students extensions at any time
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
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 |
| student4 | Student | 4 | student4@example.com |
| student5 | Student | 5 | student5@example.com |
| student6 | Student | 6 | student6@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
@javascript
Scenario: Granting an extension to an offline assignment
Given the following "activities" exist:
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | duedate |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | ## 2014-01-01 ## |
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
And I open the action menu in "Student 1" "table_row"
And I follow "Grant extension"
And I should see "Student 1 (student1@example.com)"
And I should see "Wednesday, 1 January 2014, 12:00 AM" in the "fitem_id_duedate" "region"
And I should see "Current extension due date" in the "fitem_id_currentextension" "region"
And I should see "None" in the "fitem_id_currentextension" "region"
And I set the field "Extension due date" to "## 2014-02-02 ##"
And I press "Save changes"
Then I should see "Extension granted until:" in the "Student 1" "table_row"
And I open the action menu in "Student 1" "table_row"
And I follow "Grant extension"
And I should see "Student 1 (student1@example.com)"
And I should see "Wednesday, 1 January 2014, 12:00 AM" in the "fitem_id_duedate" "region"
And I should see "Sunday, 2 February 2014, 12:00 AM" in the "fitem_id_currentextension" "region"
And the field "id_extensionduedate_day" matches value "2"
And the field "id_extensionduedate_month" matches value "February"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And I should see "Extension due date"
@javascript
Scenario: Granting extensions to an offline assignment (batch action)
Given the following "activities" exist:
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | duedate |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | ## 2014-01-01 ## |
And the following "mod_assign > extensions" exist:
| assign | user | extensionduedate |
| Test assignment name | student2 | ## 2014-02-02 ## |
| Test assignment name | student3 | ## 2014-03-03 ## |
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
And I set the field "selectall" to "1"
And I set the field "operation" to "Grant extension"
And I click on "Go" "button" confirming the dialogue
And I should see "Student 1 (student1@example.com)"
And I should see "Student 2 (student2@example.com)"
And I should see "Student 3 (student3@example.com)"
And I should see "Student 4 (student4@example.com)"
And I should see "Student 5 (student5@example.com)"
And I should see "1 more..."
And I should see "Wednesday, 1 January 2014, 12:00 AM" in the "fitem_id_duedate" "region"
And I should see "From Sunday, 2 February 2014, 12:00 AM" in the "fitem_id_currentextension" "region"
And I should see "To Monday, 3 March 2014, 12:00 AM" in the "fitem_id_currentextension" "region"
And I should see "Users without an extension: 4" in the "fitem_id_currentextension" "region"
And I set the field "Enable" to "1"
And I press "Save changes"
Then I should see "Extension granted until:" in the "Student 1" "table_row"
And I should see "Extension granted until:" in the "Student 2" "table_row"
And I should see "Extension granted until:" in the "Student 3" "table_row"
And I should see "Extension granted until:" in the "Student 4" "table_row"
And I should see "Extension granted until:" in the "Student 5" "table_row"
And I should see "Extension granted until:" in the "Student 6" "table_row"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And I should see "Extension due date"
@javascript
Scenario: Validating that extension date is after due date
Given the following "activities" exist:
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | allowsubmissionsfromdate | duedate |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | ## 2034-01-01 ## | ## 2034-01-02 ## |
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
And I open the action menu in "Student 1" "table_row"
And I follow "Grant extension"
And I should see "Student 1 (student1@example.com)"
And I set the field "Enable" to "1"
And I set the following fields to these values:
| extensionduedate[day] | 1 |
And I press "Save changes"
Then I should see "Extension date must be after the due date"
And I set the following fields to these values:
| extensionduedate[year] | 2023 |
And I press "Save changes"
Then I should see "Extension date must be after the allow submissions from date"
@javascript
Scenario: Granting extensions to an offline assignment (batch action)
Given the following "activities" exist:
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | allowsubmissionsfromdate | duedate |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | ## 2034-01-01 ## | ## 2034-01-02 ## |
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
And I set the field "selectall" to "1"
And I set the field "operation" to "Grant extension"
And I click on "Go" "button" confirming the dialogue
And I should see "Student 1 (student1@example.com)"
And I should see "Student 2 (student2@example.com)"
And I should see "Student 3 (student3@example.com)"
And I should see "Student 4 (student4@example.com)"
And I should see "Student 5 (student5@example.com)"
And I should see "1 more..."
And I set the field "Enable" to "1"
And I set the following fields to these values:
| extensionduedate[day] | 1 |
And I press "Save changes"
Then I should see "Extension date must be after the due date"
And I set the following fields to these values:
| extensionduedate[year] | 2023 |
And I press "Save changes"
Then I should see "Extension date must be after the allow submissions from date"
@@ -0,0 +1,344 @@
@mod @mod_assign
Feature: Group assignment submissions
In order to allow students to work collaboratively on an assignment
As a teacher
I need to group submissions in groups
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student0 | Student | 0 | student0@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student0 | C1 | student |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
@javascript
Scenario: Confirm that group submissions are removed from the timeline
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| assignsubmission_onlinetext_enabled | 1 |
| teamsubmission | 1 |
| duedate | ##tomorrow## |
| requiresubmissionstatement | 1 |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
# Student1 checks the assignment is visible in the timeline
When I am on the "Homepage" page logged in as student1
Then I should see "Test assignment name" in the "Timeline" "block"
# Student2 checks the assignment is visible in the timeline
And I am on the "Homepage" page logged in as student2
And I should see "Test assignment name" in the "Timeline" "block"
# Student2 submits the assignment
And I am on the "Test assignment name" Activity page
And I press "Add submission"
And I set the field "Online text" to "Assignment submission text"
And I press "Save changes"
And I should see "Draft (not submitted)" in the "Submission status" "table_row"
And I press "Submit assignment"
And I should see "This submission is the work of my group, except where we have acknowledged the use of the works of other people."
And I press "Continue"
And I should see "Confirm submission"
And I should see "You are required to agree to this statement before you can submit."
And I set the field "submissionstatement" to "1"
And I press "Continue"
And I should see "Submitted for grading" in the "Submission status" "table_row"
# Student2 checks the timeline again
And I am on the "Homepage" page
And I should not see "Test assignment name" in the "Timeline" "block"
# Student1 checks the timeline again
And I am on the "Homepage" page logged in as student1
And I should not see "Test assignment name" in the "Timeline" "block"
@javascript
Scenario: Switch between group modes
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| teamsubmission | 1 |
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
Then I should see "Default group" in the "Student 0" "table_row"
And I should see "Default group" in the "Student 1" "table_row"
And I should see "Default group" in the "Student 2" "table_row"
And I should see "Default group" in the "Student 3" "table_row"
And I am on the "Test assignment name" "assign activity editing" page
And I set the following fields to these values:
| Group mode | Separate groups |
And I press "Save and return to course"
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Group mode | Separate groups |
And I press "Save and display"
And the following "group members" exist:
| user | group |
| student0 | G1 |
| student1 | G1 |
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
And I set the field "Separate groups" to "Group 1"
And I should see "Group 1" in the "Student 0" "table_row"
And I should see "Group 1" in the "Student 1" "table_row"
And I should not see "Student 2"
And I set the field "Separate groups" to "All participants"
And I should see "Group 1" in the "Student 0" "table_row"
And I should see "Group 1" in the "Student 1" "table_row"
And I should see "Default group" in the "Student 2" "table_row"
And I should see "Default group" in the "Student 3" "table_row"
Scenario: Confirm that the grading status changes for each group member
Given the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| teamsubmission | 1 |
| preventsubmissionnotingroup | 0 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student's first submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 3" row "Status" column of "generaltable" table should not contain "Submitted for grading"
And "Student 4" row "Status" column of "generaltable" table should not contain "Submitted for grading"
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student3 | I'm the student's first submission |
And I am on the "Test assignment name" Activity page
And I follow "View all submissions"
And "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 4" row "Status" column of "generaltable" table should contain "Submitted for grading"
@javascript
Scenario: Confirm that group submissions can be reopened
Given the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| teamsubmission | 1 |
| attemptreopenmethod | manual |
| requireallteammemberssubmit | 0 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student's first submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the following fields to these values:
| Grade out of 100 | 50.0 |
| Apply grades and feedback to entire group | 1 |
And I press "Save changes"
And I set the following fields to these values:
| Allow another attempt | 1 |
And I press "Save changes"
When I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
Then "Student 1" row "Status" column of "generaltable" table should contain "Reopened"
And "Student 2" row "Status" column of "generaltable" table should contain "Reopened"
Scenario: Confirm groups and submission counts are correct
Given the following "groups" exist:
| name | course | idnumber |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G2 |
| student3 | G3 |
And the following "groupings" exist:
| name | course | idnumber |
| Grouping 1 | C1 | GG1 |
And the following "grouping groups" exist:
| grouping | group |
| GG1 | G1 |
| GG1 | G2 |
# Groupmode 1 = Separate Groups
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| teamsubmission | 1 |
| attemptreopenmethod | manual |
| requireallteammemberssubmit | 0 |
| groupmode | 1 |
| teamsubmissiongroupingid | GG1 |
| submissiondrafts | 0 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student's first submission |
| Test assignment name | student2 | I'm the student's first submission |
| Test assignment name | student3 | I'm the student's first submission |
And I am on the "Test assignment name" Activity page logged in as admin
And I should see "3" in the "Groups" "table_row"
And I should see "3" in the "Submitted" "table_row"
When I select "Group 1" from the "Separate groups" singleselect
Then I should see "1" in the "Groups" "table_row"
And I should see "1" in the "Submitted" "table_row"
And I select "Group 2" from the "Separate groups" singleselect
And I should see "1" in the "Groups" "table_row"
And I should see "1" in the "Submitted" "table_row"
And I select "Group 3" from the "Separate groups" singleselect
And I should see "1" in the "Groups" "table_row"
And I should see "1" in the "Submitted" "table_row"
Scenario: Confirm that the submission status changes for each group member
Given the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 1 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| teamsubmission | 1 |
| attemptreopenmethod | manual |
| requireallteammemberssubmit | 0 |
# Groupmode 0 = No Groups
| groupmode | 0 |
| preventsubmissionnotingroup | 0 |
| submissiondrafts | 0 |
| teamsubmission | 1 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student's first submission |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| activity_modules | Course | C1 | course-view-* | side-pre |
And I am on the "C1" Course page logged in as student1
And I click on "Assignments" "link" in the "Activities" "block"
And I should see "Submitted for grading"
And I am on the "C1" Course page logged in as student2
And I click on "Assignments" "link" in the "Activities" "block"
And I should see "Submitted for grading"
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
@javascript @_file_upload
Scenario: Student can submit or edit group assignment depending on 'requireallteammemberssubmit' setting
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 2 | C2 | 0 | 2 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C2 | editingteacher |
| student1 | C2 | student |
| student2 | C2 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C2 | CG1 |
And the following "group members" exist:
| user | group |
| student1 | CG1 |
| student2 | CG1 |
And the following "activities" exist:
| activity | course | name | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | assignsubmission_file_maxfiles | assignsubmission_file_maxsizebytes | submissiondrafts | teamsubmission | requireallteammemberssubmit |
| assign | C2 | Assign 1 | 1 | 1 | 1 | 2097152 | 1 | 1 | 1 |
| assign | C2 | Assign 2 | 1 | 1 | 1 | 2097152 | 0 | 1 | 0 |
# Submit an assignment with 'requireallteammemberssubmit' setting enabled
When I am on the "Assign 1" "assign activity" page logged in as student1
Then I should see "Group 1"
And I should not see "Student 2"
And I press "Add submission"
And I set the field "Online text" to "student1 submission"
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
And I press "Save changes"
# Confirm that Submission status remains as draft and all students appear because 'Submit assignment' was not yet clicked
And I should see "Draft (not submitted)" in the "Submission status" "table_row"
And I should see "Users who need to submit: Student 1, Student 2"
And I press "Submit assignment"
And I press "Continue"
# Confirm that Submission status remains as draft and only student2 appears because student2 has not yet submitted assignment
And I am on the "Assign 1" "assign activity" page logged in as student2
And I should see "Draft (not submitted)" in the "Submission status" "table_row"
And I should see "Users who need to submit: Student 2"
And I press "Edit submission"
And I set the field "Online text" to "student2 updated submission"
And I delete "empty.txt" from "File submissions" filemanager
And I upload "lib/tests/fixtures/tabfile.csv" file to "File submissions" filemanager
And I press "Save changes"
And I press "Submit assignment"
And I press "Continue"
# Confirm that Submission status is now Submitted for grading and all changes made by student2 is reflected on assignment
And I am on the "Assign 1" "assign activity" page logged in as student1
And I should see "Submitted for grading" in the "Submission status" "table_row"
And I should see "student2 updated submission" in the "Online text" "table_row"
And I should see "tabfile.csv" in the "File submissions" "table_row"
And I should not see "student1 submission" in the "Online text" "table_row"
And I should not see "empty.txt" in the "File submissions" "table_row"
# Submit an assignment with 'requireallteammemberssubmit' disabled
And I am on the "Assign 2" "assign activity" page logged in as student1
And I should see "Group 1"
And I should not see "Student 2"
And I press "Add submission"
And I set the field "Online text" to "student1 submission"
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
And I press "Save changes"
# Confirm that Submission status is immediately set to Submitted for grading for all students after student1 submits assignments
And I am on the "Assign 2" "assign activity" page logged in as student2
And I should see "Submitted for grading" in the "Submission status" "table_row"
And I should not see "Users who need to submit"
Scenario: Group submission does not use non-participation groups
Given the following "groups" exist:
| name | course | idnumber | participation |
| Group A | C1 | CG1 | 0 |
And the following "group members" exist:
| group | user |
| CG1 | student1 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| teamsubmission | 1 |
| groupmode | 1 |
When I am on the "Test assignment name" Activity page logged in as student1
Then I should see "Default group"
And I should not see "Group A"
@@ -0,0 +1,81 @@
@mod @mod_assign @_file_upload
Feature: Hide grader identities identity from students
In order to keep the grader's identity a secret
As a moodle teacher
I need to enable Hide Grader in the assignment settings
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
# Set up the test assignment
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| teamsubmission | 1 |
| asignsubmission_onlinetext_enabled | 0 |
| assignsubmission_file_enabled | 1 |
| assignsubmission_file_maxfiles | 2 |
| assignsubmission_file_maxsizebytes | 1000000 |
| assignfeedback_comments_enabled | 1 |
| hidegrader | 0 |
And the following "mod_assign > submission" exists:
| assign | Test assignment name |
| user | student1 |
| file | lib/tests/fixtures/empty.txt |
# Grade the submission and leave feedback
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I should not see "Graded" in the "Student 1" "table_row"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "50"
And I set the field "Feedback comments" to "Catch for us the foxes."
And I press "Save changes"
And I follow "Test assignment name"
And I follow "View all submissions"
And I should see "Graded" in the "Student 1" "table_row"
And I log out
@javascript
Scenario: Hidden grading is disabled.
Given I am on the "Test assignment name" Activity page logged in as student1
Then I should see "Graded" in the "Grading status" "table_row"
And I should see "Catch for us the foxes."
And I should see "Teacher" in the "Graded by" "table_row"
@javascript
Scenario: Hidden grading is enabled.
# Enable the hidden grader option
Given I am on the "Test assignment name" Activity page logged in as teacher1
And I navigate to "Settings" in current page administration
And I click on "Expand all" "link" in the "region-main" "region"
And I set the field "Hide grader identity from students" to "1"
And I press "Save and return to course"
And I log out
# Check the student doesn't see the grader's identity
When I am on the "Test assignment name" Activity page logged in as student1
Then I should see "Graded" in the "Grading status" "table_row"
And I should see "Catch for us the foxes."
And I should not see "Graded by"
@javascript
Scenario: Hidden grading is enabled, but students have the 'view' capability.
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| mod/assign:showhiddengrader | Allow | student | Course | C1 |
When I am on the "Test assignment name" Activity page logged in as student1
And I should see "Graded" in the "Grading status" "table_row"
And I should see "Catch for us the foxes."
And I should see "Teacher" in the "Graded by" "table_row"
@@ -0,0 +1,80 @@
@mod @mod_assign
Feature: In an assignment, students can add and edit text online
In order to complete my submissions online
As a student
I need to submit my assignment editing an online form
@javascript
Scenario: Submit a text online and edit the submission
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_onlinetext_wordlimit_enabled | 1 |
| assignsubmission_onlinetext_wordlimit | 10 |
| assignsubmission_file_enabled | 0 |
And I am on the "Test assignment name" Activity page logged in as student1
When I press "Add submission"
And I set the following fields to these values:
| Online text | This is more than 10 words. 1 2 3 4 5 6 7 8 9 10. |
And I press "Save changes"
Then I should see "Please review your submission and try again."
And I set the following fields to these values:
| Online text | I'm the student first submission |
And I press "Save changes"
Then I should see "Submitted for grading"
And I should see "I'm the student first submission"
And I should see "Not graded"
And I press "Edit submission"
And I set the following fields to these values:
| Online text | I'm the student second submission |
And I press "Save changes"
Then I should see "Submitted for grading"
And I should see "I'm the student second submission"
And I should not see "I'm the student first submission"
@javascript
Scenario: Auto-draft save online text submission
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
And I am on the "Test assignment name" Activity page logged in as student1
When I press "Add submission"
And I set the following fields to these values:
| Online text | text submission |
# Wait for the draft auto save.
And I wait "2" seconds
And I am on the "Test assignment name" Activity page
When I press "Add submission"
# Confirm draft was restored.
Then the field "Online text" matches value "text submission"
@@ -0,0 +1,113 @@
@mod @mod_assign @core_outcome
Feature: Outcome grading
In order to give an outcome to my student
As a teacher
I need to grade a submission
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student0 | Student | 0 | student0@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student0 | C1 | student |
| student1 | C1 | student |
And the following config values are set as admin:
| enableoutcomes | 1 |
And the following "scales" exist:
| name | scale |
| Test Scale | Disappointing, Excellent, Good, Very good, Excellent |
And the following "grade outcomes" exist:
| fullname | shortname | scale |
| Outcome Test | OT | Test Scale |
And I am on the "Course 1" "grades > outcomes" page logged in as admin
And I set the field "Available standard outcomes" to "Outcome Test"
And I click on "#add" "css_element"
And I log out
@javascript
Scenario: Giving an outcome to a student
Given I log in as "teacher1"
And I add a assign activity to course "Course 1" section "1" and I fill the form with:
| Assignment name | Test assignment name |
| ID number | Test assignment name |
| Description | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| Outcome Test | 1 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I press "Add submission"
And I set the following fields to these values:
| Online text | My online text |
And I press "Save changes"
When I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 0" "table_row"
And I set the following fields to these values:
| Outcome Test: | Excellent |
And I press "Save changes"
And I click on "Edit settings" "link"
When I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row"
And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row"
@javascript
Scenario: Giving an outcome to a group submission
Given the following "users" exist:
| username | firstname | lastname | email |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist:
| user | course | role |
| student2 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "group members" exist:
| user | group |
| student0 | G1 |
| student1 | G1 |
And I log in as "teacher1"
And I add a assign activity to course "Course 1" section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Test assignment description |
| ID number | Test assignment name |
| assignsubmission_onlinetext_enabled | 1 |
| Students submit in groups | Yes |
| Group mode | No groups |
| Outcome Test | 1 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I press "Add submission"
And I set the following fields to these values:
| Online text | My online text |
And I press "Save changes"
When I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 0" "table_row"
And I set the following fields to these values:
| Outcome Test: | Excellent |
| Apply grades and feedback to entire group | Yes |
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row"
And I should see "Outcome Test: Excellent" in the "Student 1" "table_row"
And I should not see "Outcome Test: Excellent" in the "Student 2" "table_row"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the following fields to these values:
| Outcome Test: | Disappointing |
| Apply grades and feedback to entire group | No |
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
And I should see "Outcome Test: Excellent" in the "Student 0" "table_row"
And I should see "Outcome Test: Disappointing" in the "Student 1" "table_row"
And I should not see "Outcome Test: Disappointing" in the "Student 0" "table_row"
And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row"
And I should not see "Outcome Test: Disappointing" in the "Student 2" "table_row"
And I should not see "Outcome Test: Excellent" in the "Student 2" "table_row"
@@ -0,0 +1,34 @@
@mod @mod_assign
Feature: In an assignment, page titles are informative
In order to know I am viewing the correct page
The page titles need to reflect the current assignment and action
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | course | name | intro | assignsubmission_onlinetext_enabled |
| assign | C1 | History of ants | Tell me the history of ants | 1 |
Scenario: I view an assignment as a student and take an action
When I am on the "History of ants" Activity page logged in as student1
Then the page title should contain "C1: History of ants"
And I press "Add submission"
And the page title should contain "C1: History of ants - Edit submission"
Scenario: I view an assignment as a teacher and take an action
When I am on the "History of ants" Activity page logged in as teacher1
Then the page title should contain "C1: History of ants"
And I follow "View all submissions"
And the page title should contain "C1: History of ants - Grading"
And I click on "Grade" "link" in the "Student 1" "table_row"
And the page title should contain "C1: History of ants - Grading"
@@ -0,0 +1,105 @@
@mod @mod_assign
Feature: Prevent or allow assignment submission changes
In order to control when a student can change his/her submission
As a teacher
I need to prevent or allow student submission at any time
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
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 |
@javascript
Scenario: Preventing changes and allowing them again
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student submission |
And I am on the "Test assignment name" Activity page logged in as student1
And I press "Edit submission"
And I set the following fields to these values:
| Online text | I'm the student submission and he/she edited me |
And I press "Save changes"
And I log out
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
And I open the action menu in "Student 1" "table_row"
And I follow "Prevent submission changes"
Then I should see "Submission changes not allowed"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And "Edit submission" "button" should not exist
And I should see "This assignment is not accepting submissions"
And I log out
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I open the action menu in "Student 1" "table_row"
And I follow "Allow submission changes"
And I should not see "Submission changes not allowed"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And I should not see "This assignment is not accepting submissions"
And I press "Edit submission"
And I set the following fields to these values:
| Online text | I'm the student submission edited again |
And I press "Save changes"
And I should see "I'm the student submission edited again"
@javascript @_alert
Scenario: Preventing changes and allowing them again (batch action)
Given the following "activities" exist:
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
| assign | C1 | Test assignment name | Test assignment description | 1 | 0 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student submission |
| Test assignment name | student2 | I'm the student2 submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
When I follow "View all submissions"
And I set the field "selectall" to "1"
And I click on "Go" "button" confirming the dialogue
Then I should see "Submission changes not allowed" in the "Student 1" "table_row"
And I should see "Submission changes not allowed" in the "Student 2" "table_row"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
And I should not see "Edit submission"
And I log out
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I set the field "selectall" to "1"
And I set the field "id_operation" to "Unlock submissions"
And I click on "Go" "button" confirming the dialogue
And I should not see "Submission changes not allowed" in the "Student 1" "table_row"
And I should not see "Submission changes not allowed" in the "Student 2" "table_row"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
And I press "Edit submission"
And I set the following fields to these values:
| Online text | I'm the student2 submission and he/she edited me |
And I press "Save changes"
+142
View File
@@ -0,0 +1,142 @@
@mod @mod_assign @javascript
Feature: In an assignment, teachers grade multiple students on one page
In order to quickly give students grades and feedback
As a teacher
I need to grade multiple students on one page
Scenario: Saving but not grading a grade should
not indicate the grade is graded.
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student1 submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
When I click on "Grade" "link" in the "Student 1" "table_row"
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page
Then I should see "1" in the "Needs grading" "table_row"
@skip_chrome_zerosize
Scenario: Grade multiple students on one page
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
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 config values are set as admin:
| enableoutcomes | 1 |
When I am on the "Course 1" "grades > outcomes" page logged in as teacher1
And I press "Manage outcomes"
And I press "Add a new outcome"
And I follow "Add a new scale"
And I set the following fields to these values:
| Name | 1337dom scale |
| Scale | Noob, Nub, 1337, HaXor |
And I press "Save changes"
And I am on the "Course 1" "grades > outcomes" page
And I press "Manage outcomes"
And I press "Add a new outcome"
And I set the following fields to these values:
| Full name | M8d skillZ! |
| Short name | skillZ! |
| Scale | 1337dom scale |
And I press "Save changes"
And I add a assign activity to course "Course 1" section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| M8d skillZ! | 1 |
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student1 submission |
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page logged in as student2
When I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student2 submission |
And I press "Save changes"
And I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the following fields to these values:
| Grade out of 100 | 50.0 |
| M8d skillZ! | 1337 |
| Feedback comments | I'm the teacher first feedback |
And I press "Save changes"
And I follow "View all submissions"
Then I click on "Quick grading" "checkbox"
And I set the field "User grade" to "60.0"
And I press "Save all quick grading changes"
And I should see "The grade changes were saved"
And I press "Continue"
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I should see "I'm the teacher first feedback"
And I should see "60.0"
And I follow "Grades" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
And I should see "1337"
And I am on the "Test assignment name" "assign activity" page logged in as student2
And I should not see "I'm the teacher first feedback"
And I should not see "60.0"
And I follow "Grades" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
And I should not see "1337"
And I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I follow "View all submissions"
And I click on "Hide User picture" "link"
And I click on "Hide Full name" "link"
And I click on "Hide Email address" "link"
And I click on "Hide Status" "link"
And I click on "Hide Grade" "link"
And I click on "Hide Edit" "link"
And I click on "Hide Last modified (submission)" "link"
And I click on "Hide Online text" "link"
And I click on "Hide Submission comments" "link"
And I click on "Hide Last modified (grade)" "link"
And I click on "Hide Feedback comments" "link"
And I click on "Hide Final grade" "link"
And I click on "Hide Outcomes" "link"
And I press "Save all quick grading changes"
And I should see "The grade changes were saved"
And I press "Continue"
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I should see "I'm the teacher first feedback"
And I should see "60.0"
And I follow "Grades" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
And I should see "1337"
And I am on the "Test assignment name" "assign activity" page logged in as student2
And I should not see "I'm the teacher first feedback"
And I should not see "60.0"
And I follow "Grades" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
And I should not see "1337"
@@ -0,0 +1,87 @@
@mod @mod_assign
Feature: Relative assignment due dates
In order for students to be able to enter the course at any time and have a fixed period in which to submit the assignment
As a teacher in course with relative dates mode enabled
I should be able to create an assignment with a due date relative to the course start date
Scenario: As a student the due date for submitting my assignment is relative to my course start date
Given the following config values are set as admin:
| enablecourserelativedates | 1 |
And the following "courses" exist:
| fullname | shortname | category | groupmode | relativedatesmode | startdate |
| Course 1 | C1 | 0 | 1 | 1 | ##first day of -4 months## |
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:
# Two students, one started 4 months ago and one yesterday.
| user | course | role | timestart |
| teacher1 | C1 | editingteacher | ##first day of last month## |
| student1 | C1 | student | ##first day of -4 months## |
| student2 | C1 | student | ##yesterday## |
# One assignment, valid for 2 months.
And the following "activities" exist:
| activity | name | course | assignsubmission_onlinetext_enabled | timeopen | duedate |
| assign | Test assignment name | C1 | 1 | ##first day of -4 months## | ##last day of -3 months## |
When I am on the "Test assignment name" Activity page logged in as student1
Then I should see "Assignment is overdue by:" in the "Time remaining" "table_row"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
And I should not see "Assignment is overdue by:" in the "Time remaining" "table_row"
Scenario: As a student the due date I see for submitting my assignment is relative to my course start date
Given the following config values are set as admin:
| enablecourserelativedates | 1 |
And the following "courses" exist:
# A course with start date set to 1 Jan 2021.
| fullname | shortname | category | groupmode | relativedatesmode | startdate |
| Course 1 | C1 | 0 | 1 | 1 | 1609459200 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
# User's enrolment starts from 5 Jan 2021.
| user | course | role | timestart |
| student1 | C1 | student | 1609804800 |
And the following "activities" exist:
# The assignment's due date is 3 Jan 2021.
| activity | name | course | assignsubmission_onlinetext_enabled | duedate |
| assign | Test assignment name | C1 | 1 | 1609632000 |
When I am on the "Test assignment name" Activity page logged in as student1
Then the activity date in "Test assignment name" should contain "Due: Thursday, 7 January 2021, 8:00"
Scenario: As a teacher, I should see the relative dates when reviewing assignment submissions
Given the following config values are set as admin:
| enablecourserelativedates | 1 |
And the following "courses" exist:
| fullname | shortname | category | groupmode | relativedatesmode | startdate |
| Course 1 | C1 | 0 | 1 | 1 | ##first day of 4 months ago## |
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:
# Two students, one started 4 months ago and one yesterday.
| user | course | role | timestart |
| teacher1 | C1 | editingteacher | ##first day of 4 months ago## |
| student1 | C1 | student | ##first day of 4 months ago## |
| student2 | C1 | student | ##yesterday## |
# One assignment, valid for 2 months.
And the following "activities" exist:
| activity | name | course | assignsubmission_onlinetext_enabled | timeopen | duedate |
| assign | Test assignment name | C1 | 1 | ##first day of 4 months ago## | ##last day of 3 months ago## |
And I am on the "Test assignment name" Activity page logged in as teacher1
And the activity date in "Test assignment name" should contain "after course start"
And I should see "Calculated for each student" in the "Time remaining" "table_row"
When I follow "View all submissions"
Then I should see "No submission" in the "Student 1" "table_row"
And I should see "Assignment is overdue by:" in the "Student 1" "table_row"
And I should see "No submission" in the "Student 2" "table_row"
And I should not see "Assignment is overdue by:" in the "Student 2" "table_row"
@@ -0,0 +1,153 @@
@mod @mod_assign
Feature: Remove a submission
In order to restart an assignment for a student
As a teacher
I need to remove a student submission at any time
Background:
Given the following config values are set as admin:
| enabletimelimit | 1 | assign |
And 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 "role capability" exists:
| role | editingteacher |
| mod/assign:editothersubmission | allow |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
@javascript @skip_chrome_zerosize
Scenario: Remove a submission should remove the data that was submitted
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| 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 student submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I open the action menu in "Student 1" "table_row"
When I follow "Remove submission"
And I click on "Continue" "button"
Then I should not see "I'm the student submission"
And "Student 1" row "Status" column of "generaltable" table should contain "No submission"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And I should not see "I'm the student submission"
And I should see "No submissions have been made yet" in the "Submission status" "table_row"
@javascript @skip_chrome_zerosize
Scenario: Remove a group submission should remove the data from all group members
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| teamsubmission | 1 |
| submissiondrafts | 0 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I open the action menu in "Student 1" "table_row"
When I follow "Remove submission"
And I click on "Continue" "button"
Then I should not see "I'm the student submission"
And "Student 1" row "Status" column of "generaltable" table should contain "No submission"
And I log out
And I am on the "Test assignment name" Activity page logged in as student2
And I should not see "I'm the student submission"
And I should see "Nothing has been submitted for this assignment" in the "Submission status" "table_row"
@javascript @skip_chrome_zerosize
Scenario: A student can remove their own submission
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| 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 student submission |
And I am on the "Test assignment name" Activity page logged in as student1
And I click on "Remove submission" "button"
And I click on "Continue" "button"
And I log out
When I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
Then I should not see "I'm the student submission"
And "Student 1" row "Status" column of "generaltable" table should contain "No submission"
And I log out
And I am on the "Test assignment name" Activity page logged in as student1
And I should not see "I'm the student submission"
And I should see "No submissions have been made yet" in the "Submission status" "table_row"
@javascript @skip_chrome_zerosize @_file_upload
Scenario: Submission removal with time limit setting
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment with time limit |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 1 |
| assignsubmission_file_maxfiles | 1 |
| assignsubmission_file_maxsizebytes | 1000000 |
| submissiondrafts | 0 |
| allowsubmissionsfromdate_enabled | 0 |
| duedate_enabled | 0 |
| cutoffdate_enabled | 0 |
| gradingduedate_enabled | 0 |
And I am on the "Test assignment with time limit" Activity page logged in as admin
And I navigate to "Settings" in current page administration
And I click on "Expand all" "link" in the "region-main" "region"
# Set 'Time limit' to 5 seconds.
And I set the field "timelimit[enabled]" to "1"
And I set the field "timelimit[number]" to "5"
And I set the field "timelimit[timeunit]" to "seconds"
And I press "Save and return to course"
When I am on the "Test assignment with time limit" Activity page logged in as student1
And I click on "Begin assignment" "link"
And I click on "Begin assignment" "button"
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
And I press "Save changes"
And I click on "Remove submission" "button"
Then I should see "Are you sure you want to remove your submission? Please note that this will not reset your time limit."
And I press "Cancel"
And I am on the "Test assignment with time limit" Activity page logged in as admin
And I click on "View all submissions" "link"
And I open the action menu in "Student 1" "table_row"
And I follow "Remove submission"
And I should see "Are you sure you want to remove the submission for Student 1? Please note that this will not reset the student's time limit. You can give more time by adding a time limit user override."
@@ -0,0 +1,69 @@
@mod @mod_assign
Feature: Submissions are unlocked when a new attempt is given
In order to allow students to reattempt a locked submission
As a teacher
I need to use quick grading to grant a new submission
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario: A locked submission should unlock when a new attempt is automatically given.
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| attemptreopenmethod | untilpass |
| gradepass | 50 |
| submissiondrafts | 0 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student1 submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I open the action menu in "Student 1" "table_row"
And I follow "Prevent submission changes"
And I should see "Submission changes not allowed"
And I click on "Quick grading" "checkbox"
And I set the field "User grade" to "49.0"
And I press "Save all quick grading changes"
And I should see "The grade changes were saved"
And I press "Continue"
Then I should see "Reopened"
And I should not see "Submission changes not allowed"
@javascript
Scenario: A locked submission should unlock when a new attempt is manually given.
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| attemptreopenmethod | manual |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student1 submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
When I open the action menu in "Student 1" "table_row"
And I follow "Prevent submission changes"
Then I should see "Submission changes not allowed"
And I open the action menu in "Student 1" "table_row"
And I follow "Allow another attempt"
And I should see "Reopened"
And I should not see "Submission changes not allowed"
@@ -0,0 +1,85 @@
@mod @mod_assign @javascript
Feature: Check that the assignment grade can be rescaled when the max grade is changed
In order to ensure that the percentages are not affected by changes to the max grade
As a teacher
I need to rescale all grades when updating the max grade
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student10@example.com |
| student2 | Student | 2 | student10@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 |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "40"
And I press "Save changes"
And I follow "View all submissions"
And "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
And I am on the "Test assignment name" "assign activity" page
Scenario: Update the max grade for an assignment without rescaling existing grades
Given I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Rescale existing grades" to "No"
And I set the field "Maximum grade" to "80"
When I press "Save and display"
And I follow "View all submissions"
Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
Scenario: Update an assignment without touching the max grades
Given I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Rescale existing grades" to "No"
And I set the field "Maximum grade" to "80"
And I press "Save and display"
And I navigate to "Settings" in current page administration
And I press "Save and display"
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Rescale existing grades" to "Yes"
And I set the field "Maximum grade" to "80"
When I press "Save and display"
And I follow "View all submissions"
Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
Scenario: Update the max grade for an assignment rescaling existing grades
Given I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Rescale existing grades" to "Yes"
And I set the field "Maximum grade" to "50"
When I press "Save and display"
And I follow "View all submissions"
Then "Student 1" row "Grade" column of "generaltable" table should contain "20.00"
Scenario: Rescaling should not produce negative grades
Given I follow "View all submissions"
And I click on "Grade" "link" in the "Student 2" "table_row"
And I wait until the page is ready
And I am on the "Test assignment name" "assign activity" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Rescale existing grades" to "Yes"
And I set the field "Maximum grade" to "50"
When I press "Save and display"
And I follow "View all submissions"
# Make sure the student did not receive a negative grade.
Then "Student 2" row "Grade" column of "generaltable" table should not contain "-0.50"
@@ -0,0 +1,238 @@
@mod @mod_assign @javascript
Feature: Set availability dates for an assignment
In order to control when a student can upload an assignment
As a teacher
I need be able to set availability dates for an assignment
Background:
Given I log in as "admin"
And I set the following administration settings values:
| Enable timed assignments | 1 |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
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 "activity" exists:
| activity | assign |
| course | C1 |
| name | Assignment name |
| description | Assignment description |
| assignsubmission_file_enabled | 1 |
| assignsubmission_file_maxfiles | 1 |
| assignsubmission_file_maxsizebytes | 0 |
| submissiondrafts | 0 |
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test late assignment with time limit |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 1 |
| assignsubmission_file_maxfiles | 1 |
| assignsubmission_file_maxsizebytes | 1000000 |
| submissiondrafts | 0 |
| allowsubmissionsfromdate_enabled | 0 |
| duedate_enabled | 0 |
| cutoffdate_enabled | 0 |
| gradingduedate_enabled | 0 |
Scenario: Student cannot submit an assignment prior to the 'allow submissions from' date
Given I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Settings" in current page administration
And I click on "Expand all" "link" in the "region-main" "region"
# Set 'Allow submissions from' to tomorrow at noon.
And I set the field "Allow submissions from" to "##tomorrow noon##"
And I press "Save and return to course"
And I log out
When I am on the "Assignment name" Activity page logged in as student1
Then "Add submission" "button" should not exist
And the activity date in "Assignment name" should contain "Opens:"
And the activity date in "Assignment name" should contain "##tomorrow noon##%A, %d %B %Y, %I:%M##"
Scenario: Student can see the assignment's due date in the course calendar
Given the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Assignment name |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| submissiondrafts | 0 |
| allowsubmissionsfromdate | ##first day of this month noon## |
| duedate | ##first day of this month noon +24 hours## |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| calendar_month | Course | C1 | course-view-* | site-post |
When I am on the "C1" Course page logged in as student1
And I hover over day "2" of this month in the mini-calendar block
Then I should see "Assignment name is due"
@_file_upload
Scenario: Student can submit an assignment before the due date
Given I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Settings" in current page administration
And I click on "Expand all" "link" in the "region-main" "region"
# Set 'Allow submissions from' to now.
And I set the field "Allow submissions from" to "##now##"
# Set 'Due date' to 2 days 5 hours 30 minutes in the future.
And I set the field "Due date" to "##+2 days 5 hours 30 minutes##"
And I press "Save and return to course"
And I log out
When I am on the "Assignment name" Activity page logged in as student1
And the activity date in "Assignment name" should contain "Due:"
And the activity date in "Assignment name" should contain "##+2 days 5 hours 30 minutes##%A, %d %B %Y##"
And I should see "2 days 5 hours" in the "Time remaining" "table_row"
And "Add submission" "button" should exist
And I press "Add submission"
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
When I press "Save changes"
Then I should see "Submitted for grading" in the "Submission status" "table_row"
And I log out
And I am on the "Assignment name" Activity page logged in as teacher1
And I should see "1" in the "Submitted" "table_row"
And I follow "View all submissions"
And I should see "Submitted for grading" in the "Student 1" "table_row"
@_file_upload
Scenario: Student can submit an assignment after the due date and the submission is marked as late
Given I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Settings" in current page administration
And I click on "Expand all" "link" in the "region-main" "region"
# Set 'Allow submissions from' to 3 days ago.
And I set the field "Allow submissions from" to "##3 days ago##"
# Set 'Due date' to 2 days 5 hours 30 minutes ago.
And I set the field "Due date" to "##2 days 5 hours 30 minutes ago##"
# Set 'Cut-off date' to tomorrow at noon.
And I set the field "Cut-off date" to "##tomorrow noon##"
And I press "Save and return to course"
And I log out
And I am on the "Assignment name" Activity page logged in as student1
And the activity date in "Assignment name" should contain "Due:"
And the activity date in "Assignment name" should contain "##2 days 5 hours 30 minutes ago##%A, %d %B %Y##"
And I should see "Assignment is overdue by: 2 days 5 hours" in the "Time remaining" "table_row"
And "Add submission" "button" should exist
And I press "Add submission"
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
When I press "Save changes"
Then I should see "Submitted for grading" in the "Submission status" "table_row"
And I should see "Assignment was submitted 2 days 5 hours late" in the "Time remaining" "table_row"
And I log out
And I am on the "Assignment name" Activity page logged in as teacher1
And I should see "1" in the "Submitted" "table_row"
And I follow "View all submissions"
And I should see "Submitted for grading" in the "Student 1" "table_row"
And I should see "2 days 5 hours late" in the "Student 1" "table_row"
@_file_upload
Scenario: Student can submit an assignment before the time limit runs out
Given I log in as "admin"
And I change the window size to "large"
And I set the following administration settings values:
| Enable timed assignments | 1 |
And I log out
And I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Settings" in current page administration
And I click on "Expand all" "link" in the "region-main" "region"
# Set 'Time limit' to 20 seconds.
And I set the field "timelimit[enabled]" to "1"
And I set the field "timelimit[number]" to "20"
And I set the field "timelimit[timeunit]" to "seconds"
And I press "Save and return to course"
And I log out
When I am on the "Assignment name" Activity page logged in as student1
And I should see "20 secs" in the "Time limit" "table_row"
And "Begin assignment" "link" should exist
And I follow "Begin assignment"
And I wait "1" seconds
And "Begin assignment" "button" should exist
And I press "Begin assignment"
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
When I press "Save changes"
Then I should see "Submitted for grading" in the "Submission status" "table_row"
And I should see "secs under the time limit" in the "Time remaining" "table_row"
@_file_upload
Scenario: Assignment with time limit and due date shows how late assignment is submitted relative to due date
Given I log in as "admin"
And I change the window size to "large"
And I set the following administration settings values:
| Enable timed assignments | 1 |
And I log out
And I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Settings" in current page administration
And I click on "Expand all" "link" in the "region-main" "region"
# Set 'Time limit' to 5 seconds.
And I set the field "timelimit[enabled]" to "1"
And I set the field "timelimit[number]" to "5"
And I set the field "timelimit[timeunit]" to "seconds"
# Set 'Due date' to 2 days 5 hours 30 minutes ago.
And I set the field "Due date" to "##2 days 5 hours 30 minutes ago##"
And I press "Save and display"
And I should see "5 secs" in the "Time limit" "table_row"
And I log out
When I am on the "Assignment name" Activity page logged in as student1
And "Begin assignment" "link" should exist
And I follow "Begin assignment"
And I wait "1" seconds
And "Begin assignment" "button" should exist
And I press "Begin assignment"
And I wait "5" seconds
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
When I press "Save changes"
Then I should see "Assignment was submitted 2 days 5 hours late" in the "Time remaining" "table_row"
Scenario: Student cannot submit an assignment after the cut-off date
Given I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Settings" in current page administration
And I click on "Expand all" "link" in the "region-main" "region"
# Set 'Allow submissions from' to 3 days ago.
And I set the field "Allow submissions from" to "##3 days ago##"
# Set 'Due date' to 2 days 5 hours 30 minutes ago.
And I set the field "Due date" to "##2 days 5 hours 30 minutes ago##"
# Set 'Cut-off date' to yesterday at noon.
And I set the field "Cut-off date" to "##yesterday noon##"
And I press "Save and return to course"
And I log out
When I am on the "Assignment name" Activity page logged in as student1
Then "Add submission" "button" should not exist
And I log out
And I am on the "Assignment name" Activity page logged in as teacher1
And I should see "0" in the "Submitted" "table_row"
And I follow "View all submissions"
And I should see "No submission" in the "Student 1" "table_row"
And I should see "Assignment is overdue by: 2 days 5 hours" in the "Student 1" "table_row"
@_file_upload
Scenario: Late submission will be calculated only when the student starts the assignment
Given I am on the "Test late assignment with time limit" Activity page logged in as admin
And I navigate to "Settings" in current page administration
And I click on "Expand all" "link" in the "region-main" "region"
# Set 'Time limit' to 5 seconds.
And I set the field "timelimit[enabled]" to "1"
And I set the field "timelimit[number]" to "5"
And I set the field "timelimit[timeunit]" to "seconds"
And I press "Save and return to course"
When I am on the "Test late assignment with time limit" Activity page logged in as student1
And I wait "6" seconds
And I click on "Begin assignment" "link"
And I click on "Begin assignment" "button"
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
And I press "Save changes"
Then I should see "Submitted for grading" in the "Submission status" "table_row"
And I should see "under the time limit" in the "Time remaining" "table_row"
@@ -0,0 +1,98 @@
@mod @mod_assign
Feature: Assignments correctly add feedback to the grade report when workflow and blind marking are enabled.
In order to give students feedback when blind marking
As a teacher
I should be able to reveal student identities at any time and have my feedback show
to the student in the gradebook when the grades are in a released state.
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| submissiondrafts | 0 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| assignfeedback_comments_enabled | 1 |
| teamsubmission | 1 |
| markingworkflow | 1 |
| blindmarking | 1 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student's first submission |
# Mark the submission.
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I should see "Not marked" in the "I'm the student's first submission" "table_row"
And I click on "Grade" "link" in the "I'm the student's first submission" "table_row"
And I set the field "Grade out of 100" to "50"
And I set the field "Marking workflow state" to "In review"
And I set the field "Feedback comments" to "Great job! Lol, not really."
And I set the field "Notify student" to "0"
And I press "Save changes"
And I follow "View all submissions"
And I should see "In review" in the "I'm the student's first submission" "table_row"
@javascript
Scenario: Student identities are revealed after releasing the grades.
When I click on "Grade" "link" in the "I'm the student's first submission" "table_row"
And I set the field "Marking workflow state" to "Ready for release"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I follow "View all submissions"
And I should see "Ready for release" in the "I'm the student's first submission" "table_row"
And I click on "Grade" "link" in the "I'm the student's first submission" "table_row"
And I set the field "Marking workflow state" to "Released"
And I press "Save changes"
And I follow "View all submissions"
And I should see "Released" in the "I'm the student's first submission" "table_row"
And I set the field "Grading action" to "Reveal student identities"
And I press "Continue"
And I am on the "Course 1" "grades > User report > View" page logged in as "student1"
Then I should see "50"
And I should see "Great job! Lol, not really."
@javascript
Scenario: Student identities are revealed before releasing the grades.
When I click on "Grade" "link" in the "I'm the student's first submission" "table_row"
And I set the field "Marking workflow state" to "Ready for release"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I follow "View all submissions"
And I should see "Ready for release" in the "I'm the student's first submission" "table_row"
And I set the field "Grading action" to "Reveal student identities"
And I press "Continue"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Marking workflow state" to "Released"
And I press "Save changes"
And I follow "View all submissions"
And I should see "Released" in the "Student 1" "table_row"
And I am on the "Course 1" "grades > User report > View" page logged in as "student1"
Then I should see "50"
And I should see "Great job! Lol, not really."
@javascript
Scenario: Submissions table visible with overrides and blind marking
When I am on the "Test assignment name" "assign activity" page
And I navigate to "Overrides" in current page administration
And I press "Add user override"
And I set the following fields to these values:
| Override user | Student |
| Due date | ##2030-01-01 08:00## |
And I press "Save"
And I should see "Tuesday, 1 January 2030, 8:00"
And I am on the "Test assignment name" "assign activity" page
And I follow "View all submissions"
And I should see "In review" in the "I'm the student's first submission" "table_row"
@@ -0,0 +1,115 @@
@mod @mod_assign @javascript
Feature: In an assignment, students can comment in their submissions
In order to refine assignment submissions
As a student
I need to add comments about submissions
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
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 |
Scenario: Student comments an assignment submission
Given the following "activities" exist:
| activity | course | name | assignsubmission_onlinetext_enabled |
| assign | C1 | Test assignment name | 1 |
And I am on the "Test assignment name" Activity page logged in as student1
When I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student submission |
And I press "Save changes"
And I click on ".comment-link" "css_element"
And I set the field "content" to "First student comment"
And I follow "Save comment"
Then I should see "First student comment"
And the field "content" matches value "Add a comment..."
And I click on "Delete comment posted by Student 1" "link"
# Wait for the animation to finish.
And I wait "2" seconds
And I set the field "content" to "Second student comment"
And I follow "Save comment"
And I should see "Second student comment"
And I should not see "First student comment"
And I am on the "Test assignment name" "assign activity" page
And I click on ".comment-link" "css_element"
And I should see "Second student comment"
And I should not see "First student comment"
Scenario: Teacher updated the comment box and clicked the save changes to reflect the comment
Given the following "activities" exist:
| activity | course | name | assignsubmission_onlinetext_enabled |
| assign | C1 | Test assignment name | 1 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | student one submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I click on ".comment-link" "css_element"
When I set the field "content" to "Teacher feedback first comment"
And I press "Save changes"
And I should see "Comments (1)" in the ".comment-link" "css_element"
And I click on ".comment-link" "css_element"
Then I should see "Teacher feedback first comment" in the ".comment-list" "css_element"
Scenario: Teacher updated the comment box and clicked on save and show next to reflect the comment
Given the following "activities" exist:
| activity | course | name | assignsubmission_onlinetext_enabled |
| assign | C1 | Test assignment name | 1 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name | student1 | I'm the student submission |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I click on ".comment-link" "css_element"
When I set the field "content" to "Teacher feedback first comment"
# click the save and show next twice as we have only 2 students
# so the second time you click we reach the same student who made
# the change
And I press "Save and show next"
And I press "Save and show next"
And I click on ".comment-link" "css_element"
Then I should see "Teacher feedback first comment" in the ".comment-list" "css_element"
Scenario: Teacher can comment on an offline assignment
Given the following "activities" exist:
| activity | course | name | assignsubmission_onlinetext_enabled | assignmentsubmission_file_enabled | assignfeedback_comments_enabled |
| assign | C1 | Test assignment name | 0 | 0 | 1 |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
When I set the following fields to these values:
| Grade out of 100 | 50 |
| Feedback comments | I'm the teacher feedback |
And I press "Save changes"
And I follow "View all submissions"
Then I should see "50.00" in the "Student 1" "table_row"
And I should see "I'm the teacher feedback" in the "Student 1" "table_row"
Scenario: Teacher can comment on assignments with a zero grade
Given the following "activities" exist:
| activity | course | name | assignsubmission_onlinetext_enabled | assignmentsubmission_file_enabled | assignfeedback_comments_enabled |
| assign | C1 | Test assignment name | 0 | 0 | 1 |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the following fields to these values:
| Grade out of 100 | 0 |
And I press "Save changes"
And I should see "The changes to the grade and feedback were saved"
And I set the following fields to these values:
| Feedback comments | I'm the teacher feedback |
And I press "Save changes"
Then I should see "The changes to the grade and feedback were saved"
@@ -0,0 +1,53 @@
@mod @mod_assign @javascript
Feature: Manage assignment submission web notifications
In order to receive assignment submission notifications
As a teacher
I need to be able to turn on web notifications for assignment submission
Background:
# Turn off the course welcome message, so we can easily test other messages.
Given the following config values are set as admin:
| sendcoursewelcomemessage | 0 | enrol_manual |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "user preferences" exist:
| user | preference | value |
| teacher1 | message_provider_mod_assign_assign_notification_enabled | none |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Assign 1 |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| submissiondrafts | 0 |
| sendnotifications | 1 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Assign 1 | student1 | I'm the student1 submission |
Scenario: Teacher can choose to receive assignment notification submissions
Given I log in as "teacher1"
When I open the notification popover
Then I should see "You have no notifications"
# Update assignment submission to generate a notification
And I am on the "Assign 1" "assign activity" page logged in as student1
And the following "user preferences" exist:
| user | preference | value |
| teacher1 | message_provider_mod_assign_assign_notification_enabled | popup |
# This should generate a notification
And I press "Edit submission"
And I set the field "Online text" to "updated"
And I press "Save changes"
# Confirm that teacher received assignment submission notification
And I log in as "teacher1"
And I open the notification popover
Then I should see "Student 1 has updated their submission for assignment Assign 1"
@@ -0,0 +1,68 @@
@mod @mod_assign
Feature: In an assignment, teacher can require submission statements
In order to require students to accept an assignment submission statement
As a teacher
I need to enable "Require that students accept the submission statement"
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Terry | Teacher | teacher1@example.com |
| student1 | Sam | Student | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assign |
| submissiondrafts | 1 |
| requiresubmissionstatement | 1 |
| assignsubmission_onlinetext_enabled | 1 |
Scenario: Student is required to accept assignment submission statement
Given I am on the "Test assign" "assign activity" page logged in as student1
And I press "Add submission"
And I set the field "Online text" to "My submission text."
And I press "Save changes"
And I should see "Draft (not submitted)" in the "Submission status" "table_row"
When I press "Submit assignment"
Then I should see "This submission is my own work, except where I have acknowledged the use of the works of other people."
And I press "Continue"
And I should see "Confirm submission"
And I should see "You are required to agree to this statement before you can submit."
And I set the field "submissionstatement" to "1"
And I press "Continue"
And I should see "Submitted for grading" in the "Submission status" "table_row"
Scenario: Student is not required to accept assignment submission statement when non exists
Given the following config values are set as admin:
| config | value | plugin |
| submissionstatement | | assign |
And I am on the "Test assign" "assign activity" page logged in as student1
When I press "Add submission"
And I set the field "Online text" to "My submission text."
And I press "Save changes"
And I should see "Draft (not submitted)" in the "Submission status" "table_row"
And I press "Submit assignment"
And I press "Continue"
Then I should see "Submitted for grading" in the "Submission status" "table_row"
Scenario: Student is not required to accept assignment submission statement
Given I am on the "Test assign" "assign activity editing" page logged in as teacher1
And I set the following fields to these values:
| Require that students accept the submission statement | No |
And I press "Save and display"
And I am on the "Test assign" "assign activity" page logged in as student1
And I press "Add submission"
And I set the field "Online text" to "My submission text."
And I press "Save changes"
And I should see "Draft (not submitted)" in the "Submission status" "table_row"
When I press "Submit assignment"
Then I should not see "This submission is my own work, except where I have acknowledged the use of the works of other people."
And I press "Continue"
And I should see "Submitted for grading" in the "Submission status" "table_row"
@@ -0,0 +1,203 @@
@mod @mod_assign
Feature: Submit assignment without group
As a teacher
I should be able to prevent students submitting team assignments as members of the default group
@javascript
Scenario: Switch between group modes
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
| Course 2 | C2 | 0 | 1 |
| Course 3 | C3 | 0 | 1 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | preventsubmissionnotingroup | teamsubmission |
| assign | C1 | c1assign1 | Allow default group | Test assignment description | 1 | 0 | 1 |
| assign | C1 | c1assign2 | Require group membership | Test assignment description | 1 | 1 | 1 |
| assign | C2 | c2assign1 | Require group membership | Test assignment description | 1 | 1 | 1 |
| assign | C3 | c3assign1 | Require group membership | Test assignment description | 1 | 1 | 1 |
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 "groups" exist:
| name | course | idnumber |
| Group 1 | C2 | GC21 |
| Group 1 | C3 | GC31 |
| Group 2 | C3 | GC32 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| teacher1 | C2 | editingteacher |
| student1 | C2 | student |
| student2 | C2 | student |
| teacher1 | C3 | editingteacher |
| student3 | C3 | student |
And the following "group members" exist:
| user | group |
| student1 | GC21 |
| student2 | GC21 |
| student3 | GC31 |
| student3 | GC32 |
# Student 1 can only submit assignment in course 2.
When I am on the "c1assign1" "assign activity" page logged in as student1
Then I should not see "Not a member of any group"
And I should not see "This assignment requires submission in groups. You are not a member of any group"
And I should see "Nothing has been submitted for this assignment"
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student submission |
And I press "Save changes"
And I press "Submit assignment"
And I press "Continue"
And I should see "Submitted for grading"
And I am on the "c1assign2" "assign activity" page
And I should see "Not a member of any group"
And I should see "This assignment requires submission in groups. You are not a member of any group"
And I should see "Nothing has been submitted for this assignment"
And I should not see "Add submission"
And I am on the "c2assign1" "assign activity" page
And I should not see "Not a member of any group"
And I should see "Nothing has been submitted for this assignment"
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student submission |
And I press "Save changes"
And I press "Submit assignment"
And I press "Continue"
And I should see "Submitted for grading"
And I log out
# Student 2 should see submitted for grading.
And I am on the "c1assign1" "assign activity" page logged in as student2
And I should see "Submitted for grading"
And I am on the "c2assign1" "assign activity" page
And I should see "Submitted for grading"
And I log out
# Teacher should see student 1 and student 2 has submitted assignment.
And I am on the "c1assign1" "assign activity" page logged in as teacher1
And I should see "1" in the "Groups" "table_row"
And I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
And I follow "View all submissions"
And I should see "Default group" in the "Student 1" "table_row"
And I should see "Default group" in the "Student 2" "table_row"
And I should see "Submitted for grading" in the "Student 1" "table_row"
And I should see "Submitted for grading" in the "Student 2" "table_row"
And I am on the "c1assign2" "assign activity" page
And I should see "0" in the "Groups" "table_row"
And I should see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
And I follow "View all submissions"
And I should see "Not a member of any group, so unable to make submissions." in the "Student 1" "table_row"
And I should see "Not a member of any group, so unable to make submissions." in the "Student 2" "table_row"
And I should not see "Submitted for grading" in the "Student 1" "table_row"
And I should not see "Submitted for grading" in the "Student 2" "table_row"
And I am on the "c2assign1" "assign activity" page
And I should see "1" in the "Groups" "table_row"
And I should not see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
And I follow "View all submissions"
And I should see "Group 1" in the "Student 1" "table_row"
And I should see "Group 1" in the "Student 2" "table_row"
And I should see "Submitted for grading" in the "Student 1" "table_row"
And I should see "Submitted for grading" in the "Student 2" "table_row"
And I log out
# Test student 3 (in multiple groups) should not be able to submit.
And I am on the "c3assign1" "assign activity" page logged in as student3
And I should see "Member of more than one group"
And I should see "The assignment requires submission in groups. You are a member of more than one group."
And I should see "Nothing has been submitted for this assignment"
And I should not see "Add submission"
And I log out
And I am on the "c3assign1" "assign activity" page logged in as teacher1
And I should see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
And I follow "View all submissions"
And I should see "Member of more than one group, so unable to make submissions." in the "Student 3" "table_row"
Scenario: All users are in groups, so no warning messages needed.
Given the following "courses" exist:
| fullname | shortname | groupmode |
| Course 1 | C1 | 0 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | preventsubmissionnotingroup | teamsubmission |
| assign | C1 | assign1 | Allow default group | Test assignment description | 1 | 0 | 1 |
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 "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G2 |
When I am on the "Allow default group" "assign activity" page logged in as teacher1
Then I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
And I should not see "The setting 'Students submit in groups' is enabled and some users are either not a member of any group, or are a member of more than one group. Please be aware that these students will submit as members of the 'Default group'."
Scenario: One user is not in a group, so should see a warning about default group submission
Given the following "courses" exist:
| fullname | shortname | groupmode |
| Course 1 | C1 | 0 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | preventsubmissionnotingroup | teamsubmission |
| assign | C1 | assign1 | Allow default group | Test assignment description | 1 | 0 | 1 |
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 "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "group members" exist:
| user | group |
| student1 | G1 |
When I am on the "Allow default group" "assign activity" page logged in as teacher1
Then I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
And I should see "The setting 'Students submit in groups' is enabled and some users are either not a member of any group, or are a member of more than one group. Please be aware that these students will submit as members of the 'Default group'."
Scenario: One user is a member of multiple groups, so should see a warning about default group submission
Given the following "courses" exist:
| fullname | shortname | groupmode |
| Course 1 | C1 | 0 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | preventsubmissionnotingroup | teamsubmission |
| assign | C1 | assign1 | Allow default group | Test assignment description | 1 | 0 | 1 |
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 "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
| student2 | G2 |
When I am on the "Allow default group" "assign activity" page logged in as teacher1
Then I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
And I should see "The setting 'Students submit in groups' is enabled and some users are either not a member of any group, or are a member of more than one group. Please be aware that these students will submit as members of the 'Default group'."