diff --git a/mod/assign/classes/output/renderer.php b/mod/assign/classes/output/renderer.php index 54f1b589d92..6133e19f647 100644 --- a/mod/assign/classes/output/renderer.php +++ b/mod/assign/classes/output/renderer.php @@ -298,7 +298,7 @@ class renderer extends \plugin_renderer_base { if (isset($summary->cm)) { $currenturl = new \moodle_url('/mod/assign/view.php', array('id' => $summary->cm->id)); - $o .= groups_print_activity_menu($summary->cm, $currenturl->out(), true); + $o .= groups_print_activity_menu($summary->cm, $currenturl->out(), true, participationonly: false); } $o .= $this->output->box_start('boxaligncenter gradingsummarytable'); diff --git a/mod/assign/tests/behat/group_submission.feature b/mod/assign/tests/behat/group_submission.feature index 83c24f01380..2ecf07d62cb 100644 --- a/mod/assign/tests/behat/group_submission.feature +++ b/mod/assign/tests/behat/group_submission.feature @@ -422,3 +422,33 @@ Feature: Group assignment submissions Then I should see "Student 1" And I should see "Student 3" And I should not see "Student 2" + + @javascript + Scenario: All groups including non-participation groups can be selected when viewing the grade summary + Given the following "groups" exist: + | name | course | idnumber | participation | visibility | + | Group 2 | C1 | G2 | 0 | 0 | + | Group 3 | C1 | G3 | 0 | 3 | + And the following "group members" exist: + | group | user | + | G1 | student1 | + | G2 | student1 | + | G1 | student2 | + | G2 | student3 | + And the following "activity" exists: + | activity | assign | + | course | C1 | + | name | Test assignment name | + | submissiondrafts | 0 | + | teamsubmission | 1 | + | groupmode | 1 | + And the following "mod_assign > submissions" exist: + | assign | user | onlinetext | + | Test assignment name | student1 | I'm the student's first submission | + | Test assignment name | student3 | I'm the student's first submission | + When I am on the "Test assignment name" Activity page logged in as teacher1 + Then "Non-participation" "optgroup" should exist in the "select[name=group]" "css_element" + And "Group 1" "option" should exist in the "select[name=group]" "css_element" + And "Group 2" "option" should exist in the "optgroup[label=Non-participation]" "css_element" + And "Group 3" "option" should exist in the "optgroup[label=Non-participation]" "css_element" + And "Group 1" "option" should not exist in the "optgroup[label=Non-participation]" "css_element"