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

Files view sorts files in case-sensitive order

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.6, 1.7, 1.8
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None
    • Environment:
      All
    • Database:
      Any
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE

      Description

      When viewing "Files" page for a course, the files are listed in case-sensitive order. This is confusing for most users who are used to case-insensitive sorting.

      To fix:

      File: /files/index.php
      Line: 784

      Change:
      asort($filelist);

      to:
      natcasesort($filelist);

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            daveyboond Steve Bond added a comment -

            Agh! 1.9 still sorts filenames in case-sensitive order! Is there some reason I'm missing why this is thought a good idea?

            Show
            daveyboond Steve Bond added a comment - Agh! 1.9 still sorts filenames in case-sensitive order! Is there some reason I'm missing why this is thought a good idea?
            Hide
            rrusso Robert Russo added a comment -

            This patch is for 1.9.2 mod/resource/type/directory/resource.class.php and fixes the silly case sensitive sorting.

            Someone please push this through along with the op's suggestion.

            Show
            rrusso Robert Russo added a comment - This patch is for 1.9.2 mod/resource/type/directory/resource.class.php and fixes the silly case sensitive sorting. Someone please push this through along with the op's suggestion.
            Hide
            rrusso Robert Russo added a comment -

            This should be classified as a bug, not an improvement, which is why it might have been ignored.

            Show
            rrusso Robert Russo added a comment - This should be classified as a bug, not an improvement, which is why it might have been ignored.
            Hide
            daveyboond Steve Bond added a comment -

            I'm not sure it's necessarily a bug. Unix systems sort files in case-sensitive order by design, so maybe the programmer was a Unix-head and intended the files to sort this way.

            Anyway, this report is superseded now by my 'enhanced sorting' patch: http://tracker.moodle.org/browse/MDL-14636

            Show
            daveyboond Steve Bond added a comment - I'm not sure it's necessarily a bug. Unix systems sort files in case-sensitive order by design, so maybe the programmer was a Unix-head and intended the files to sort this way. Anyway, this report is superseded now by my 'enhanced sorting' patch: http://tracker.moodle.org/browse/MDL-14636

              People

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

                Dates

                • Created:
                  Updated: