diff --git a/mod/assign/classes/output/user_submission_actionmenu.php b/mod/assign/classes/output/user_submission_actionmenu.php index de09e2247ad..09ab87d9396 100644 --- a/mod/assign/classes/output/user_submission_actionmenu.php +++ b/mod/assign/classes/output/user_submission_actionmenu.php @@ -76,7 +76,7 @@ class user_submission_actionmenu implements templatable, renderable { * @return string The status of the submission. */ protected function get_current_status(): string { - if (!is_null($this->teamsubmission)) { + if (!is_null($this->teamsubmission) && isset($this->teamsubmission->status)) { return $this->teamsubmission->status; } else if (!empty((array)$this->submission)) { return $this->submission->status; diff --git a/mod/assign/tests/behat/assign_course_reset.feature b/mod/assign/tests/behat/assign_course_reset.feature index d89a66240d5..61fe1708e6e 100644 --- a/mod/assign/tests/behat/assign_course_reset.feature +++ b/mod/assign/tests/behat/assign_course_reset.feature @@ -56,10 +56,11 @@ Feature: Assign reset And I follow "View all submissions" Then I should not see "Submitted for grading" - @javascript @skip_interim + @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 select "User overrides" from the "jump" singleselect And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | diff --git a/mod/assign/tests/behat/assign_group_override.feature b/mod/assign/tests/behat/assign_group_override.feature index f3a23990535..2f47a252b3d 100644 --- a/mod/assign/tests/behat/assign_group_override.feature +++ b/mod/assign/tests/behat/assign_group_override.feature @@ -140,7 +140,7 @@ Feature: Assign group override 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 @skip_interim + @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 @@ -160,6 +160,7 @@ Feature: Assign group override 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 select "User overrides" from the "jump" singleselect And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | diff --git a/mod/assign/tests/behat/assign_user_override.feature b/mod/assign/tests/behat/assign_user_override.feature index a220f8e570a..c717617bd29 100644 --- a/mod/assign/tests/behat/assign_user_override.feature +++ b/mod/assign/tests/behat/assign_user_override.feature @@ -144,7 +144,6 @@ Feature: Assign user override Then I should see "No groups you can access." And the "Add user override" "button" should be disabled - @skip_interim 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: @@ -164,11 +163,12 @@ Feature: Assign user override | 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 select "User overrides" from the "jump" singleselect 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 @skip_interim + @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: @@ -188,6 +188,7 @@ Feature: Assign user override | 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 select "User overrides" from the "jump" singleselect And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -201,6 +202,7 @@ Feature: Assign user override 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 "User overrides" from the "jump" singleselect Then I should see "Student1" in the ".generaltable" "css_element" But I should not see "Student2" in the ".generaltable" "css_element" diff --git a/mod/assign/tests/behat/outcome_grading.feature b/mod/assign/tests/behat/outcome_grading.feature index 3c2d2a64685..09ccd67f7d4 100644 --- a/mod/assign/tests/behat/outcome_grading.feature +++ b/mod/assign/tests/behat/outcome_grading.feature @@ -68,7 +68,6 @@ Feature: Outcome grading 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" - @skip_interim Scenario: Giving an outcome to a group submission Given the following "users" exist: | username | firstname | lastname | email | diff --git a/mod/assign/tests/behat/remove_submission.feature b/mod/assign/tests/behat/remove_submission.feature index 78a127a6ea2..67c13091b8d 100644 --- a/mod/assign/tests/behat/remove_submission.feature +++ b/mod/assign/tests/behat/remove_submission.feature @@ -31,7 +31,7 @@ Feature: Remove a submission | student1 | G1 | | student2 | G1 | - @javascript @skip_chrome_zerosize @skip_interim + @javascript @skip_chrome_zerosize Scenario: Remove a submission should remove the data that was submitted Given the following "activity" exists: | activity | assign | @@ -56,7 +56,7 @@ Feature: Remove a submission 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 attempt" in the "Submission status" "table_row" + 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 @@ -86,7 +86,7 @@ Feature: Remove a submission 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 @skip_interim + @javascript @skip_chrome_zerosize Scenario: A student can remove their own submission Given the following "activity" exists: | activity | assign | @@ -113,4 +113,4 @@ Feature: Remove a submission 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 attempt" in the "Submission status" "table_row" + And I should see "No submissions have been made yet" in the "Submission status" "table_row" diff --git a/mod/assign/tests/behat/submit_without_group.feature b/mod/assign/tests/behat/submit_without_group.feature index d4191e71544..85428007cf8 100644 --- a/mod/assign/tests/behat/submit_without_group.feature +++ b/mod/assign/tests/behat/submit_without_group.feature @@ -3,7 +3,7 @@ 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 @skip_interim + @javascript Scenario: Switch between group modes Given the following "courses" exist: | fullname | shortname | category | groupmode |