This commit is contained in:
Andrew Nicols 2023-06-29 11:01:34 +08:00
commit 42c7c56c9f
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14
2 changed files with 3 additions and 3 deletions

View File

@ -176,7 +176,7 @@ class downloader {
if ($this->instance->teamsubmission) {
$submissiongroup = $manager->get_submission_group($student->id);
if ($submissiongroup) {
$groupname = $submissiongroup->name;
$groupname = format_string($submissiongroup->name, true, ['context' => $manager->get_context()]);
$groupinfo = '_' . $submissiongroup->id;
} else {
$groupname = get_string('defaultteam', 'mod_assign');
@ -280,7 +280,7 @@ class downloader {
$this->instance->name,
];
if (!empty($this->groupid)) {
$filenameparts[] = groups_get_group_name($this->groupid);
$filenameparts[] = format_string(groups_get_group_name($this->groupid), true, ['context' => $manager->get_context()]);
}
$filenameparts[] = $manager->get_course_module()->id;

View File

@ -791,7 +791,7 @@ class assign_grading_table extends table_sql implements renderable {
$group = false;
$this->get_group_and_submission($row->id, $group, $submission, -1);
if ($group) {
return $group->name;
return format_string($group->name, true, ['context' => $this->assignment->get_context()]);
} else if ($this->assignment->get_instance()->preventsubmissionnotingroup) {
$usergroups = $this->assignment->get_all_groups($row->id);
if (count($usergroups) > 1) {