MDL-46485 Assign: Fix when submitting to a group assignment from the default group

This commit is contained in:
Damyon Wiese 2014-07-23 13:32:11 +08:00
parent e2d2d8a175
commit cbec30d4de

View File

@ -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);