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

Assignment file type restrictions don't work with correctly arbitrary types

    XMLWordPrintable

Details

    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-58632-master
    • Hide
      1. Create an assignment.
      2. Under "Submission types", tick "File submissions" (should be by default)
      3. Under "Accepted file types", enter a file type that is not configured in moodle. E.g. ".example"
      4. Click "Save and display".
        • Confirm that you get an error message.
      5. Add a file type that is configured in moodle (e.g. ".pdf; .txt")
      6. Click "Save and display".
        • Confirm that the assignment gets successfully saved.
      PHPUnit
      1. Run PHPUnit tests for the "assignsubmission_file_testsuite" test suite.
        • Confirm all tests pass.
      Behat
      1. Run Behat tests for the "@assignsubmission_file" tag.
        • Confirm all tests pass.
      Show
      Create an assignment. Under " Submission types ", tick " File submissions " (should be by default) Under " Accepted file types ", enter a file type that is not configured in moodle. E.g. ".example" Click " Save and display ". Confirm that you get an error message. Add a file type that is configured in moodle (e.g. ".pdf; .txt") Click " Save and display ". Confirm that the assignment gets successfully saved. PHPUnit Run PHPUnit tests for the "assignsubmission_file_testsuite" test suite. Confirm all tests pass. Behat Run Behat tests for the "@assignsubmission_file" tag. Confirm all tests pass.

    Description

      If you enter "arbitrary" file extensions in the Assign file type restrictions, it seems to completely ignore types that it doesn't know:

      If you enter ".gmz", it will allow any type of file.

      If you enter ".jpg; .gmz" it will only allow jpg files, no other file types.

      Attachments

        Issue Links

          Activity

            People

              johno John Okely
              emerrill Eric Merrill
              David Monllaó David Monllaó
              Jun Pataleta Jun Pataleta
              Simey Lameze Simey Lameze
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/May/17