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

Repository Filter performs case sensitive search on file extensions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.5, 2.1.2, 2.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Repositories
    • Labels:
    • Environment:
      Debian Squeeze
    • Database:
      Any
    • Testing Instructions:
      Hide

      Requirements

      On your local filesystem, create two files:

      • lowercase.mp3
      • uppercase.MP3

      These don't need to have any content. I used touch to create two empty files.

      Instructions

      • Navigate to My Profile -> My private files
      • Click 'Manage my private files'
      • Select 'Add' and upload both of your prepared files
      • Navigate to a course and turn on editing mode
      • Add a new page
      • In the Description, use the 'Moodle Media' button to insert some media
      • Select 'Find or upload a sound, video or applet...'
      • Choose 'Private files'

      Expected result

      Both uppercase.MP3 and lowercase.mp3 are listed

      Actual result

      Only lowercase.mp3 is listed

      Show
      Requirements On your local filesystem, create two files: lowercase.mp3 uppercase.MP3 These don't need to have any content. I used touch to create two empty files. Instructions Navigate to My Profile -> My private files Click 'Manage my private files' Select 'Add' and upload both of your prepared files Navigate to a course and turn on editing mode Add a new page In the Description, use the 'Moodle Media' button to insert some media Select 'Find or upload a sound, video or applet...' Choose 'Private files' Expected result Both uppercase.MP3 and lowercase.mp3 are listed Actual result Only lowercase.mp3 is listed
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-30165-master-1

      Description

      When using a repository plugin which restricts based on the supported_filetypes() function and uses the repository->filter() function, the filter function uses a case sensitive regular expression to check the file extension type.

      E.g. example.mp3 is shown; example.MP3 is not.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              dobedobedoh Andrew Nicols added a comment -

              These bugs both affect which files are displayed in the filepicker

              Show
              dobedobedoh Andrew Nicols added a comment - These bugs both affect which files are displayed in the filepicker
              Hide
              poltawski Dan Poltawski added a comment -

              Reviewed and indeed we add the case insenstive filter to solve this succesfully.

              Show
              poltawski Dan Poltawski added a comment - Reviewed and indeed we add the case insenstive filter to solve this succesfully.
              Hide
              salvetore Michael de Raadt added a comment -

              I'm going to leave this issue open, even though it is a duplicate, because it is further down the integration path. Although it would have been better to avoid duplication.

              I've compared the solution provided with this issue and the one provided by JonoF and they are identical.

              Show
              salvetore Michael de Raadt added a comment - I'm going to leave this issue open, even though it is a duplicate, because it is further down the integration path. Although it would have been better to avoid duplication. I've compared the solution provided with this issue and the one provided by JonoF and they are identical.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

              TIA and ciao

              PS: Note this is the last message of this type that you will receive along the whole November month, because we are running continuous integration this weeks while QA tests for release of Moodle 2.2 (Dec 1st) are being performed.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao PS: Note this is the last message of this type that you will receive along the whole November month, because we are running continuous integration this weeks while QA tests for release of Moodle 2.2 (Dec 1st) are being performed.
              Hide
              dobedobedoh Andrew Nicols added a comment -

              Still cherry-picks cleanly on latest MOODLE_20_STABLE, MOODLE_21_STABLE, and master.

              Show
              dobedobedoh Andrew Nicols added a comment - Still cherry-picks cleanly on latest MOODLE_20_STABLE, MOODLE_21_STABLE, and master.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Integrated, thanks!

              20 and 21 versions cherry-picked from master.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks! 20 and 21 versions cherry-picked from master.
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Works Great on all branches
              Thanks for fixing this, Andrew.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Works Great on all branches Thanks for fixing this, Andrew.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              And this has landed upstream, just on time for the upcoming new releases week. Thanks for it!

              Ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - And this has landed upstream, just on time for the upcoming new releases week. Thanks for it! Ciao

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    28/Nov/11