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

file_save_draft_area_files() ignores moodle/course:ignorefilesizelimits

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3
    • Fix Version/s: STABLE backlog
    • Component/s: Files API
    • Labels:
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: