Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 1 changed file with 7 additions and 3 deletions. Show diff stats Hide diff stats

  1. +7 3 mod/assign/locallib.php
10 mod/assign/locallib.php
@@ -1805,16 +1805,20 @@ private function download_submissions() {
1805 1805 if ($this->get_instance()->teamsubmission) {
1806 1806 $submission = $this->get_group_submission($userid, 0, false);
1807 1807 $submissiongroup = $this->get_submission_group($userid);
1808   - $groupname = '-' . $submissiongroup->name;
  1808 + if ($submissiongroup) {
  1809 + $groupname = $submissiongroup->name . '-';
  1810 + } else {
  1811 + $groupname = get_string('defaultteam', 'assign') . '-';
  1812 + }
1809 1813 } else {
1810 1814 $submission = $this->get_user_submission($userid, false);
1811 1815 }
1812 1816
1813 1817 if ($this->is_blind_marking()) {
1814   - $prefix = clean_filename(str_replace('_', ' ', get_string('participant', 'assign') . $groupname) .
  1818 + $prefix = clean_filename(str_replace('_', ' ', $groupname . get_string('participant', 'assign')) .
1815 1819 "_" . $this->get_uniqueid_for_user($userid) . "_");
1816 1820 } else {
1817   - $prefix = clean_filename(str_replace('_', ' ', fullname($student) . $groupname) .
  1821 + $prefix = clean_filename(str_replace('_', ' ', $groupname . fullname($student)) .
1818 1822 "_" . $this->get_uniqueid_for_user($userid) . "_");
1819 1823 }
1820 1824

0 comments on commit 21f7739

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