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

Restrict the accepted types in the gradebook import

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.2
    • Fix Version/s: 2.5.6, 2.6.3
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      Hide
      1. As a teacher, go to a course.
      2. Open the gradebook, click on import.
      3. Be sure to be in the CSV import type.
      4. Try to import any file who are not a text file, ex JPG, PDF, XLS etc. a warning display dialog should appear preventing you to upload this file.
      5. Try to import a CSV file. It should work. Try again with a txt file or any file with the mime type: text/plain (see function get_mimetypes_array() in filelib.php). It should work too.
      6. Go to the XML import type. Try to import a XML file. It should work.
      7. Try to import any other file type. You should see a warning display message preventing you to upload this file.
      Show
      As a teacher, go to a course. Open the gradebook, click on import. Be sure to be in the CSV import type. Try to import any file who are not a text file, ex JPG, PDF, XLS etc. a warning display dialog should appear preventing you to upload this file. Try to import a CSV file. It should work. Try again with a txt file or any file with the mime type: text/plain (see function get_mimetypes_array() in filelib.php). It should work too. Go to the XML import type. Try to import a XML file. It should work. Try to import any other file type. You should see a warning display message preventing you to upload this file.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-44585-master

      Description

      Currently its possible to upload any file types in the filepicker on any of the gradebook format.
      I think it may be more safe to restrict it only by their correct types.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/May/14