Tuesday, April 3, 2012

Moodle 2.2 file picker and creating your own repository.

I have a moodle 2.x backup file that is about 360 MB. I need to move the file from a share server to the moodle 2.2 server. I had to make a couple modifications to the php.ini file on my share server to allow the vendor to upload the file. I did not want to do that again.

I tried to upload the file from the File picker menu, by browsing to the share server and selecting the file. After about a minute, moodle displayed a fairly informative error message indicating that the max_post_size directive in the php.ini file needed to be updated. I expected this and considered changing the php.ini file temporarily to allow the file to upload, but I decided to
copy the file from the share server to the moodle server using the OS. Specifically into a location where the File picker would see it, then I could select it and restore it. I would not have to modify the php.ini file just to upload it to the server, I would be using the back door, so to speak.

The difficulty I had was figuring out where to copy the file on the moodle 2.2 server. More specifically, where was the File picker Server files option looking? What directory was it showing? The answer was not as obvious as I thought, since moodle 2.x has tried hard to bury all file related activities into the activity / course / private user area. Most of the moodle docs focus on file locations from the users perspective, not the administrator. This moodle doc about the file picker demonstrates this.

The solution turned out to be creating a new file area repository. Moodle has a plugin that I could activate that the File picker would automatically recognize.


There were a *few steps necessary to set this up, but in the end, it worked as advertised and allowed me to get the file onto my moodle server without having to use the front door, uploading it via the File picker.

This is the moodle doc describing the steps to activate the file repository.

In the end, I have a new option in my file picker called Big Honkin Vendor uploads.



The file directory to my new Big honkin Vendor files is:

C:\wamp\moodledata\repository\vendor_mbz

No comments:

Post a Comment