Moodle

Files view sorts files in case-sensitive order

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor 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);

Activity

Hide
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
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
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
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
Robert Russo added a comment -

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

Show
Robert Russo added a comment - This should be classified as a bug, not an improvement, which is why it might have been ignored.
Hide
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
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

Vote (8)
Watch (3)

Dates

  • Created:
    Updated: