mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-46485 Assign: Fix when submitting to a group assignment from the default group
This commit is contained in:
parent
e2d2d8a175
commit
cbec30d4de
@ -5417,8 +5417,12 @@ class assign {
|
||||
$user = $DB->get_record('user', array('id' => $submission->userid), '*', MUST_EXIST);
|
||||
$name = fullname($user);
|
||||
} else {
|
||||
$group = $DB->get_record('groups', array('id' => $submission->groupid), '*', MUST_EXIST);
|
||||
$name = $group->name;
|
||||
$group = $this->get_submission_group($submission->userid);
|
||||
if ($group) {
|
||||
$name = $group->name;
|
||||
} else {
|
||||
$name = get_string('defaultteam', 'assign');
|
||||
}
|
||||
}
|
||||
$status = get_string('submissionstatus_' . $submission->status, 'assign');
|
||||
$params = array('id'=>$submission->userid, 'fullname'=>$name, 'status'=>$status);
|
||||
|
Loading…
x
Reference in New Issue
Block a user