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

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

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-58632-master

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/May/17