diff --git a/lib/moodlelib.php b/lib/moodlelib.php index b6c2998c696..69f171ed582 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -6305,7 +6305,7 @@ function get_user_max_upload_file_size($context, $sitebytes = 0, $coursebytes = } if (has_capability('moodle/course:ignorefilesizelimits', $context, $user)) { - return get_max_upload_file_size(USER_CAN_IGNORE_FILE_SIZE_LIMITS); + return USER_CAN_IGNORE_FILE_SIZE_LIMITS; } return get_max_upload_file_size($sitebytes, $coursebytes, $modulebytes); diff --git a/webservice/tests/externallib_test.php b/webservice/tests/externallib_test.php index 9d98d35a77e..5c809860edb 100644 --- a/webservice/tests/externallib_test.php +++ b/webservice/tests/externallib_test.php @@ -151,9 +151,7 @@ class core_webservice_externallib_testcase extends externallib_advanced_testcase $siteinfo = external_api::clean_returnvalue(core_webservice_external::get_site_info_returns(), $siteinfo); $this->assertEquals(0, $siteinfo['userquota']); - - // The max_size is dependant upon the post_max_size, and upload_max_filesize values in php.ini. - $this->assertEquals(get_max_upload_file_size(USER_CAN_IGNORE_FILE_SIZE_LIMITS), $siteinfo['usermaxuploadfilesize']); + $this->assertEquals(USER_CAN_IGNORE_FILE_SIZE_LIMITS, $siteinfo['usermaxuploadfilesize']); $this->assertEquals(true, $siteinfo['usercanmanageownfiles']); $this->assertEquals(HOMEPAGE_SITE, $siteinfo['userhomepage']);