moodle 課題のダウンロード
更新版あり (2018/02/22)
moodle で,全提出課題を zip ファイルでダウンロード (「すべての提出をダウンロード」) できるが,各提出者のファイル名に,氏名は入っているのだけれど,usernameが入っていない.download_submission 関数を次のように変更すれば入れられる:
--- locallib.php-orig 2016-10-22 11:16:13.891650622 +0900 +++ locallib.php 2016-10-22 11:42:00.129553030 +0900 @@ -2686,7 +2686,7 @@ $prefix = clean_filename($prefix . '_' . $this->get_uniqueid_for_user($userid) . '_'); } else { $prefix = str_replace('_', ' ', $groupname . fullname($student)); - $prefix = clean_filename($prefix . '_' . $this->get_uniqueid_for_user($userid) . '_'); + $prefix = clean_filename($student->username . '_' . $prefix . '_' . $this->get_uniqueid_for_user($userid) . '_'); } if ($submission) {