Fixing file picker so that files in the front page are displayed

Fixing file picker so that files in the front page are displayed

by Luis de la Torre -
Number of replies: 0

Hi all,


As I reported in https://tracker.moodle.org/browse/MDL-59191, the file picker doesn't show the files placed on the Front page. I wanted to fix it and share the patch, but I'm afraid I'm a bit lost.


I think I narrowed the problem, and it can be summed up like this:

Filepicker.js is the file with the problem. When you are on the Server root, the filepicker should show a folder called Front page, but it doesn't; it only shows folders for each of the categories created in the Moodle server (see first attached image).

56119_image-2017-06-14-17-59-18-624.png

The only way to access the Front page from the file picker is when you are adding a file in the frontpage. The path by default in this case is System>Front page (see second attached figure). However,  if you click on "System" (below the Search box), you will only get a list of folders like the one presented in the first figure (showing categories but not the Front page).

56118_image-2017-06-14-17-58-53-922.png

Despite this "progress", I'm afraid I don't know how to continue from here. filepicker.js is a huge file and I don't really know how it works that well. Could someone help me here?


Average of ratings: -