Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-27156 repositories: switched some spots over to using get_user_ma…

…x_upload_file_size() instead of get_max_upload_file_size()
  • Loading branch information...
commit 1812ea3e06c78bf72a92c91c0f53dd11a03a59b3 1 parent 8ac95c2
@andyjdavis andyjdavis authored
View
2  grade/grading/form/rubric/lib.php
@@ -453,7 +453,7 @@ public static function description_form_field_options($context) {
global $CFG;
return array(
'maxfiles' => -1,
- 'maxbytes' => get_max_upload_file_size($CFG->maxbytes),
+ 'maxbytes' => get_user_max_upload_file_size($context, $CFG->maxbytes),
'context' => $context,
);
}
View
2  lib/moodlelib.php
@@ -5844,7 +5844,7 @@ function get_max_upload_file_size($sitebytes=0, $coursebytes=0, $modulebytes=0)
/**
* Returns the maximum size for uploading files for the current user
*
- * This function calls @see:get_max_upload_file_size() then considers the user's capabilities
+ * This function takes in account @see:get_max_upload_file_size() the user's capabilities
*
* @param context $context The context in which to check user capabilities
* @param int $sizebytes Set maximum size
View
2  mod/lesson/locallib.php
@@ -2114,7 +2114,7 @@ public function update($properties, $context = null, $maxbytes = null) {
$context = $PAGE->context;
}
if ($maxbytes === null) {
- $maxbytes =get_max_upload_file_size();
+ $maxbytes = get_user_max_upload_file_size($context);
}
$properties = file_postupdate_standard_editor($properties, 'contents', array('noclean'=>true, 'maxfiles'=>EDITOR_UNLIMITED_FILES, 'maxbytes'=>$maxbytes), $context, 'mod_lesson', 'page_contents', $properties->id);
$DB->update_record("lesson_pages", $properties);
Please sign in to comment.
Something went wrong with that request. Please try again.