Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-34023

file_save_draft_area_files() ignores moodle/course:ignorefilesizelimits

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 2.3
    • Files API
    • MOODLE_23_STABLE

      There are some places in code where maxbytes is set for filemanager as, for example, $course->maxbytes.

      If user logs in as admin (or person with capability moodle/course:ignorefilesizelimits), filemanager form element tells me that file size is unlimited and I am allowed to upload a big file.

      Although when user saves the form, the funciton file_save_draft_area_files() checks if filesize is not more than $options['maxbytes'] and does not save the big file.

      I just fixed the maxbytes for mod_forum in MDL-33948 but it does not seem possible to fix it everywhere where filemanager or textarea elements are created. Instead I would suggest that file_save_draft_area_files() checks the unlimited capability.

      Examples of such forms: mod_glossary, mod_folder and probably many others

            moodle.com Moodle HQ
            marina Marina Glancy
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.