Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mod-assignment MDL-23848 Fixed regression causing group dropdowns to …

…be ignored when viewing submissions
  • Loading branch information...
commit 209a25197dabeb67f215f8624c3b5c03ff696013 1 parent 8c4d14e
@samhemelryk samhemelryk authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 mod/assignment/lib.php
View
6 mod/assignment/lib.php
@@ -816,7 +816,7 @@ function display_submission($extra_javascript = '') {
$currentgroup = groups_get_activity_group($cm);
$gradebookroles = explode(",", $CFG->gradebookroles);
- $users = get_role_users($gradebookroles, $context, true);
+ $users = get_role_users($gradebookroles, $context, true, '', 'u.lastname ASC', true, $currentgroup);
if ($users) {
$users = array_keys($users);
// if groupmembersonly used, remove users who are not in any group
@@ -1075,7 +1075,7 @@ function display_submissions($message='') {
groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/assignment/submissions.php?id=' . $this->cm->id);
$gradebookroles = explode(",", $CFG->gradebookroles);
- $users = get_role_users($gradebookroles, $context, true);
+ $users = get_role_users($gradebookroles, $context, true, '', 'u.lastname ASC', true, $currentgroup);
if ($users) {
$users = array_keys($users);
if (!empty($CFG->enablegroupings) and $cm->groupmembersonly) {
@@ -2784,7 +2784,7 @@ function assignment_count_real_submissions($cm, $groupid=0) {
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
$gradebookroles = explode(",", $CFG->gradebookroles);
- $users = get_role_users($gradebookroles, $context, true);
+ $users = get_role_users($gradebookroles, $context, true, '', 'u.lastname ASC', true, $groupid);
if ($users) {
$users = array_keys($users);
// if groupmembersonly used, remove users who are not in any group
Please sign in to comment.
Something went wrong with that request. Please try again.