MDL-70130 core: allow to attach files from localrequestdir to emails

Co-authored-by: Paul Holden <[email protected]>
This commit is contained in:
Marina Glancy
2020-11-06 10:02:04 +08:00
committed by Andrew Nicols
co-authored by Paul Holden
parent 8a9a4ee4f3
commit e30716a16e
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -6325,7 +6325,8 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml = '',
$CFG->dataroot,
$CFG->dirroot,
$CFG->localcachedir,
$CFG->tempdir
$CFG->tempdir,
$CFG->localrequestdir,
]);
// Set addpath to true.
$addpath = true;
+3
View File
@@ -3446,6 +3446,9 @@ class core_moodlelib_testcase extends advanced_testcase {
'dirroot' => [$CFG->dirroot],
'localcachedir' => [$CFG->localcachedir],
'tempdir' => [$CFG->tempdir],
// Paths within $CFG->localrequestdir.
'localrequestdir_request_directory' => [make_request_directory()],
'localrequestdir_request_storage_directory' => [get_request_storage_directory()],
// Pass null to indicate we want to test a path relative to $CFG->dataroot.
'relative' => [null]
];