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

Activities include course limit for files even when it exceedes the site limit

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.5
    • Assignment, Forum, Workshop
    • MOODLE_24_STABLE
    • MOODLE_25_STABLE
    • MDL-37122-master
    • Hide
      1. Log in as admin
      2. Set the site file limit to something high (or server limit) at Settings > Site admin > Security > Site policies > Maximum uploaded file size (maxbytes)
      3. Go to a course (or create one)
      4. Edit the settings for the course and set the course file limit to the site limit
      5. Go back to the site limit and reduce it to something lower, eg 2MB.
      6. Go back to the course and edit the settings
      7. Verify the course file limit is set to "Site upload limit (XX MB)" and no option in the list is larger than the site limit.
      8. Go add an activity to the course with an option for the file size limit (e.g. assignment)
      9. Verify the list of options starts with "Site upload limit (XX)" and no option in the list is larger than the site limit.
        #
      10. (Also covered by unit tests)
      Show
      Log in as admin Set the site file limit to something high (or server limit) at Settings > Site admin > Security > Site policies > Maximum uploaded file size (maxbytes) Go to a course (or create one) Edit the settings for the course and set the course file limit to the site limit Go back to the site limit and reduce it to something lower, eg 2MB. Go back to the course and edit the settings Verify the course file limit is set to "Site upload limit (XX MB)" and no option in the list is larger than the site limit. Go add an activity to the course with an option for the file size limit (e.g. assignment) Verify the list of options starts with "Site upload limit (XX)" and no option in the list is larger than the site limit. # (Also covered by unit tests)

    Description

      The assignment, forum and workshop activities add the course limit to the list of allowed file sizes, even when this filesize is greater than the site limit.

      Replication steps:

      1. Log in as admin
      2. Set the site file limit to something high (or server limit) at Settings > Site admin > Security > Site policies > Maximum uploaded file size (maxbytes)
      3. Go to a course (or create one)
      4. Edit the settings for the course and set the course file limit to the site limit
      5. Go back to the site limit and reduce it to something lower, eg 2MB.
      6. Go back to the course and edit the settings
      7. Note the list of options for the file limit (it goes up to the site limit now), but this is not the value stored in the DB
      8. Do not save the course settings (if you do, you need to start again)
      9. Go back to the course page and add or edit an assignment activity
      10. Note the list of options for the file limit
      11. Add a forum and workshop activity and note the list of file size options there also

      Expected result: The activity file limits should only go up to the site limit

      Actual result: The course limit saved in the DB is included in the lists

      This is happening in the settings pages for these activities, not in the library function which returns the list of allowed file sizes. The settings pages should check that the course limit is valid before adding it to the list of filesizes.

      It should be noted that even when the activities limit is greater than the site limit, the site limit is still applied when students upload files.

      I checked the Database activity and other modules and they do not appear to add the course limit to the list of file sizes.

      Attachments

        Issue Links

          Activity

            People

              damyon Damyon Wiese
              salvetore Michael de Raadt
              Dan Poltawski Dan Poltawski
              Mark Nelson Mark Nelson
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/May/13