Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-35728: Fix download all submissions for a team assignment when th…

…ere are no groups
  • Loading branch information...
commit 21f77397a29d9b57e4433a4c401cb8d63152ebc2 1 parent 61badb5
Damyon Wiese authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 mod/assign/locallib.php
View
10 mod/assign/locallib.php
@@ -1805,16 +1805,20 @@ private function download_submissions() {
if ($this->get_instance()->teamsubmission) {
$submission = $this->get_group_submission($userid, 0, false);
$submissiongroup = $this->get_submission_group($userid);
- $groupname = '-' . $submissiongroup->name;
+ if ($submissiongroup) {
+ $groupname = $submissiongroup->name . '-';
+ } else {
+ $groupname = get_string('defaultteam', 'assign') . '-';
+ }
} else {
$submission = $this->get_user_submission($userid, false);
}
if ($this->is_blind_marking()) {
- $prefix = clean_filename(str_replace('_', ' ', get_string('participant', 'assign') . $groupname) .
+ $prefix = clean_filename(str_replace('_', ' ', $groupname . get_string('participant', 'assign')) .
"_" . $this->get_uniqueid_for_user($userid) . "_");
} else {
- $prefix = clean_filename(str_replace('_', ' ', fullname($student) . $groupname) .
+ $prefix = clean_filename(str_replace('_', ' ', $groupname . fullname($student)) .
"_" . $this->get_uniqueid_for_user($userid) . "_");
}

0 comments on commit 21f7739

Please sign in to comment.
Something went wrong with that request. Please try again.