Skip to content

Commit 16cffba

Browse files
committed
MDL-81514 assign: Show non-participation groups in activity menu
This sets the flag in the activity menu for selecting the grade summaries for each groups, to include non-participation groups as well.
1 parent b57ddf2 commit 16cffba

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

public/mod/assign/classes/output/renderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public function render_assign_grading_summary(\assign_grading_summary $summary)
298298

299299
if (isset($summary->cm)) {
300300
$currenturl = new \moodle_url('/mod/assign/view.php', array('id' => $summary->cm->id));
301-
$o .= groups_print_activity_menu($summary->cm, $currenturl->out(), true);
301+
$o .= groups_print_activity_menu($summary->cm, $currenturl->out(), true, participationonly: false);
302302
}
303303

304304
$o .= $this->output->box_start('boxaligncenter gradingsummarytable');

public/mod/assign/tests/behat/group_submission.feature

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,3 +417,33 @@ Feature: Group assignment submissions
417417
Then I should see "Student 1"
418418
And I should see "Student 3"
419419
And I should not see "Student 2"
420+
421+
@javascript
422+
Scenario: All groups including non-participation groups can be selected when viewing the grade summary
423+
Given the following "groups" exist:
424+
| name | course | idnumber | participation | visibility |
425+
| Group 2 | C1 | G2 | 0 | 0 |
426+
| Group 3 | C1 | G3 | 0 | 3 |
427+
And the following "group members" exist:
428+
| group | user |
429+
| G1 | student1 |
430+
| G2 | student1 |
431+
| G1 | student2 |
432+
| G2 | student3 |
433+
And the following "activity" exists:
434+
| activity | assign |
435+
| course | C1 |
436+
| name | Test assignment name |
437+
| submissiondrafts | 0 |
438+
| teamsubmission | 1 |
439+
| groupmode | 1 |
440+
And the following "mod_assign > submissions" exist:
441+
| assign | user | onlinetext |
442+
| Test assignment name | student1 | I'm the student's first submission |
443+
| Test assignment name | student3 | I'm the student's first submission |
444+
When I am on the "Test assignment name" Activity page logged in as teacher1
445+
Then "Non-participation" "optgroup" should exist in the "select[name=group]" "css_element"
446+
And "Group 1" "option" should exist in the "select[name=group]" "css_element"
447+
And "Group 2" "option" should exist in the "optgroup[label=Non-participation]" "css_element"
448+
And "Group 3" "option" should exist in the "optgroup[label=Non-participation]" "css_element"
449+
And "Group 1" "option" should not exist in the "optgroup[label=Non-participation]" "css_element"

0 commit comments

Comments
 (0)