File Picker Sort Order

File Picker Sort Order

by Ray Pierce -
Number of replies: 5

Version 2.2.1

Is ther a way to caus the file picker to sort files numerically or alphabetically? When I use the file picket the files are shown in some sort of random order. I have named Powerpoint Slides 1.jpg, 2.jpg 3.jpg etc. File picker seems to ignore any sort order. Is it me or is this a glaring bug?

Screen shot below

Ray

Average of ratings: -
In reply to Ray Pierce

Re: File Picker Sort Order

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I think you need to number then 01 02 up to 10 and then it will sort them as you expect.

In reply to Mary Cooch

Re: File Picker Sort Order

by Ray Pierce -

Mary,

I tried what you suggested and there is no change. Moodle displays the files in a very random order. It very difficult to work with files in this way. I have lessons that will require in excess of 50 slides each and have a hard time sifting through them in the picker.

This seems like an elementary function for a system that is meant to dela with files. I have to believe that the great minds that put Moodle together have a slolution for this.

Ray

In reply to Ray Pierce

Re: File Picker Sort Order

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Ray,

Computers rarely arrange things "in a very random order". I guess the files are displayed in Date order (i.e. date when the files were created or modified). Can you check this?

This is how the File Picker sorts and displays files (as far as I can see):

  • Upload a file: you are using the Windows (or Mac etc) file viewer were you can at will sort by Size, Type, Date, etc.
  • Private files: files are sorted by Name (no other option available)
  • external Repository: files are sorted by Date (no other option available)

What seems to be missing from the Moodle 2 File Picker is a "Sort by..." feature for Private files and external repositories.

I've created bug report MDL-31406 for which anyone interested can vote.

Joseph

In reply to Joseph Rézeau

Re: File Picker Sort Order

by Ray Pierce -

Joseph,

Thank you for the help.

Just to answer some questions you brought up, all the files were created at the same time from PowerPoint. They were FTP'd to my server using Filezilla at the same time. They are displayed fine on the server and when I chose to import the files rather than using the file picker.

Considering that the files were created from PowerPoint by converting the slides to jpg, unless PowerPoint converts them randomly, the date/time stamp should be consecutive. Thus, if they are sorted by date/time in  file picker why would they appear in a random order?

Ray

In reply to Ray Pierce

Re: File Picker Sort Order

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Ray,

Well, it's easy for you to find out the exact date of your image files. I suppose you have saved them somewhere on your local machine.

On your Hazcom repository, do you have a "Sort by..." feature? If so, how do those files display there when sorted by date?

When you say "random order", do you mean that each time you view your Hazcom repository files through the moodle file picker they appear in a different "random" order, or the same order each time?

From my tests, it appears that the file picker orders files by date/time.

Joseph

PS Pleaser remember to vote for bug report MDL-31406. The more votes a bug gets the better chance it stands of being fixed. You'll have to register in the bug tracker first, if you are not already registered.