Getting around the moodle 2 File Picker

Getting around the moodle 2 File Picker

Britt Bassett གིས-
Number of replies: 6

As instructed in the moodle 2 doc (http://docs.moodle.org/en/File_system_repository_configuration), I create the new file system repository under the FTP root in moodledata/repository, and I FTP all my files up into it figuring great, a place to keep documents, images, and related files, and keep them all synchronized.

I then create a page (html page) and use the tinyMCE image icon to access the File Picker, and put an image file in place. I put this same image file into place in several other pages where I need it. The html source for this looks like:

<p>repository image: <img src="http://mymoodledomain.org/draftfile.php/13/user/draft/932040976/test.jpg" /></p>

I then realize I made a mistake on this image, so correct the mistake and FTP it back up overwriting the bad one in the repository. Then I open my html pages to see how the new image looks, but nothing has changed. Well that is pretty painful, so I guess I have to select the old image and use the File Picker to reselect the new so the new will re-appear.

Whoops, when I try to do that, I get a pop-up error box that says: "File exists" and it won't let me put in the new file. That is crazy, I don't want some hidden copy of an old file, I want a link to my repository files! Well this is now really painful; do I have to rename the file everytime I change it on all 3 pages? What if I put that file on 30 pages?

Realizing the File Picker method is not acceptable, I figure I could just put direct image source links into the repository created following the moodle 2 directions. However, this repository is not directly available to http as it is not under the http root.

So, back to the drawing board; I discover where the http source directory is via FTP (public_html), and create my own folder to hold my own files, then again FTP my files up there.

Then using an offline editor (Kompozer) I build my 3 pages. I paste the html from that into the moodle site so that the html source for this image looks like:

<p>myfile image: <img src="http://mymoodledomain.org/_my_files/test.jpg" /></p>

This works fine and the image shows as before. But, when I then realize I made an error, or want to change the file, I simple overwrite the file via FTP, and viola, all my html pages that use this image immediately reflect the change!

Now things work the way they ought to!

དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to Britt Bassett

Re: Getting around the moodle 2 File Picker

Andrew Lian གིས-

I was about to write to report the same problem (more or less).

I know we can bypass the problem as explained above, but the files then become publicly accessible. I want my files to be protected and ouf of the server root.

Moreover, I do not want to change files, but simply to connect to files which have been uploaded and are already there. The file picker simply does not allow me to pick files which are there already - and I cannot keep uploading files endlessly under different names. I believe the files are also renamed/encrypted in some way - which means I cannot easily find where they are stored.

This is a serious problem - any help would be appreciated. Maybe it is something I am doing rather than a moodle problem.

Thanks for any help

Andrew

In reply to Andrew Lian

Re: Getting around the moodle 2 File Picker

Britt Bassett གིས-

The files are then publicly accessible, but if you set the directory permission so that it is world executable only, not readable or writable, then the file can only be grabbed if the exact name is known. No file browsing. Not a perfect solution, but workable unless serious security is required for some of your image or other files.

I have seen enough complaints about this, but no better solution yet.

Another useful repository feature, especially when working with others is to connect your moodle2 repository to www.dropbox.com. This works well for picking files, but still has the problem of file changes not being seen, and previously picked files are not able to be overwritten.

In reply to Britt Bassett

Re: Getting around the moodle 2 File Picker

Stephen Catton གིས-

Hi

I think i have a simila problem. In Moodle 1.9 i had an animated flash navigation bar (this one with different images http://www.flashxml.net/dock-menu.html) that is made up of a number of files. I could upload all the files in to site files and feed the html file through an iframe into a label on the frontpage. I no longer seem to have site files folder and don't know where (if at all) I can upload the files to. Any ideas?

Cheers

Stephen

In reply to Stephen Catton

Re: Getting around the moodle 2 File Picker

mark furrer གིས-

Hello

I do have the same problem:

Upgraded to Moodle 2.0.2, oranised the repository and uploaded the files (images) with FTP

Then I found out, that this this images are not show on the course but the old ones I wantet to replace.

Then I went to the course and tried to replace the pictures in the quiz questions by uploading them....-> File exist... Do I have to rename all my images? Is this the only solution? This will be a serious problem for me....

Furthermore the list in File picker is not ordered or logical to me. I do have the images/filenames numbered and expect the filenames are in ascending order. But in the list seems to be ordered by random.... hence it is realy timeconsuming to find the files for uplaod. Another serious problem for me.

Any help is apreciated

Thanks Mark

In reply to mark furrer

Re: Getting around the moodle 2 File Picker

john matylonek གིས-

While figuring out how to set up your repositories.....can someone give me a quick tip to why, when I create single file upload assignment or advanced upload assignment the description of the assignment appears but no "upload a file" button is generated?  Its hard to use Moodle as CMS for courses without an ability for students to upload homework,

In reply to john matylonek

Re: Getting around the moodle 2 File Picker

Glenys Hanson གིས-

Hi John,

Shamelessly copying from suggestions in another disccussion:

  • Have you check that the "upload a file" button doesn't appear when you're logged in with a student account?
  • What about the assignment start and end dates?

Cheers,

Glenys