-
Notifications
You must be signed in to change notification settings - Fork 1
/
moodle-assign_add_usernames_export.patch
25 lines (22 loc) · 1.25 KB
/
moodle-assign_add_usernames_export.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 4b8e314b5b77e81dce279fe627de07e0f7659277 Mon Sep 17 00:00:00 2001
From: Pavel Sokolov <[email protected]>
Date: Wed, 6 Jul 2022 12:55:41 +0300
Subject: [PATCH] Add usernames to submission export
---
mod/assign/locallib.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php
index 31f37f1bb6b..c1ecd4d1897 100644
--- a/mod/assign/locallib.php
+++ b/mod/assign/locallib.php
@@ -3620,7 +3620,7 @@ class assign {
$prefix = str_replace('_', ' ', $groupname . get_string('participant', 'assign'));
$prefix = clean_filename($prefix . '_' . $this->get_uniqueid_for_user($userid));
} else {
- $fullname = fullname($student, has_capability('moodle/site:viewfullnames', $this->get_context()));
+ $fullname = fullname($student, has_capability('moodle/site:viewfullnames', $this->get_context())) . ' (' .str_replace('@su.se', '', $DB->get_record('user', ['id' => $userid])->username). ')';
$prefix = str_replace('_', ' ', $groupname . $fullname);
$prefix = clean_filename($prefix . '_' . $this->get_uniqueid_for_user($userid));
}
--
2.32.1 (Apple Git-133)