I don't understand file managing in Moodle 2.0. How can we upload files? How can we delete, move or rename files? Simply; where is file manager in Moodle 2.0
File Manager In Moodle 2.0
Number of replies: 54Re: File Manager In Moodle 2.0
Files now reside with resources. So you need to create a resource and then attach a file. Although this may be better technically, it is confusing to use. A good explanation of the file system in 2.0 would be a big help.
Re: File Manager In Moodle 2.0
Suppose you are editing a document in MS Word, and you do Inser -> Image. Do you get a file manager then, to manage all the files inside your word document? What about when you want to attache a file to an email.
There is no way to manage the files inside a Word document, the software does that for you behind the scenes.
When you are attaching files to an email, you get a very simple 'file manager' that just lets you delete the files you have added previously.
So it is with Moodle 2.0.
Re: File Manager In Moodle 2.0
Tim-
So how does one link to a list of files? Or how do you create several resources that use the same file?
One of my big pitches to moodle adopters is that you can upload a zip file of a hundred items (i.e. 23 chapters of powerpoints, 10 pdf's, a collection of images, and some sample syllabi) and in just a few minutes provide students with links to all the slides for the whole class, WITHOUT having to go make all those resources (i.e. Chapter 1 slideshow, chapter 2 slideshow, etc...).
Am I missing something obvious? I've never liked the way when you email a file to 10 people, you're essentially left with 12 copies (original on your pc, one in your sent box, and 10 to the recipients, who will likely download to their PC's and create 10 more...).
Thanks!
d.i.
Re: File Manager In Moodle 2.0
how does one link to a list of files?
With the editing turned on, select "add a resource" and then folder . Click Add to upload your zipped folder and then when it is uploaded you will have a little icon to the right of it - click it and you get "unzip". (you can also click the icon to the righf of the zipped folder to delete it) When you save and return to your course you have the folder displayed as previously in Moodle 1.9
Re: File Manager In Moodle 2.0
OK- this is awesome (and gave my wife and me a big scare)- so what's with the "resources linked to files or vice versa" issue that preceded my query? Are those linked files in a different place from where i'd unzipped my files in Mary's example? Once I've uploaded my 25 slideshows, can I then (still, as in 1.9) link to them from individual resources as I see fit?
Confused,
d.i.
Re: File Manager In Moodle 2.0
For the scenario "Just upload one big zip of lots of stuff into Moodle, the use those files in lots of different places in my course", try this.
Upload the zip into your 'My private files' area, and unzip it there. You can access your private files from the Navigation block on your profile page, to upload the files.
Then, anywhere else in Moodle where you need to access a file using the file-picker, you should see 'My private files' as one of the repositories available in the column on the left, alongside Upload file and Server files.
Re: File Manager In Moodle 2.0
Thanks Tim,
I think I am still very confused about managing my files, however your explanation has solved my problems for now and removed some of the frustrations.
Re: File Manager In Moodle 2.0
Yes, but you are not mentioning the fact that doing so will result in two copies of that file: One in your Private Files; one attached to the resource.
At first, I was pretty stoked about the "Private Files" business, because I assumed that meant that I'd be able to just keep everything there, and files that I use in multiple courses could be replaced there and then they'd be ready to go throughout all my courses.
But no.
I upload them there, then I go to the resource in a course, choose from Private Files, and it is then attached to that resource. So far so good. But then a new semester begins, and I update some file I give to every class, and I upload the new version with the same name to Private Files and check my classes.
Nope, they are still using the old version, which has evidently been copied to god knows where, in every single class. In order to update them, I get to go into each resource and pick the file from Private Files again, leading me to question what the point of Private Files even is, since I might as well just upload everything separately to each resource anyway, and save some server space.
The Files system in 1.9 was fairly frustrating because each class had its own files and I had to upload a handout, etc. to each class instead of just putting it in some central location and updating it once. The new file system was touted as a way around that problem, but as far as I can tell, it's worse in every way imaginable. Now, not only can I not use a single file in multiple courses, I also can't even update the files in a course without clicking on every single resource and updating them individually. I simply cannot figure out how this is better.
I understand your point about attaching images, etc. to Word files and emails, but... this is not a Word file or an email. It's a web page. It was designed to replace Word files and emails and provide a simpler, more streamlined way of delivering content to students. I don't understand why I would want to replicate the behavior of older technology on the technology that supercedes it. It's like replacing a steering wheel with a set of reins. That interface is no longer relevant and is now confusing.
I realize I'm letting my dogs off the leash here a bit, but I just cannot figure out how this is better than the 1.x system in any way that teachers actually care about (permissions, etc.). It's solving a problem that most users didn't have. I can see corporate users needing to be careful about permissions and licenses, but that is not the bulk of Moodle's user base. This really should have been a separate add-on or something.
Luckily for me, most of the users at my university are new to Moodle, and therefore won't know to complain about this to me, but I'm sitting here with a bunch of old personal classes that I used to administer quickly and without fuss, which I now have to click away at every semester for hours.
I hope you guys will at least get the linking to Private Files set up. Without that, I'm going to be in tears twice a year, and I guarantee I'm not alone.
Re: File Manager In Moodle 2.0
Server space is not an issue, although the file is logically copied into each resource, there is only one copy of each file kept on disc, not matter now many different people upload the same thing.
The issue of bulk-replacing files is a real one, and although there is not a solution yet, it is solvable.
Since there is only one copy of the file on disc, with a link to that file from all the places where it is used, then it would be possible to make a page that shows you all the places where a particular file is used (that you have permission to access). It could then let you select some or all of those places, and upload a new file to replace the old one.
That is probably only a few day's work. Sadly, I don't have a few days spare to implement it right now.
Re: File Manager In Moodle 2.0
Thanks for the reply, but it's not really fair to claim that there's only one copy. If I understand what I've been reading today correctly, there's only one copy of the file, yes, but the file's contents are, as you say, "logically copied into each resource." This is directly analogous to a Word file, where I insert a .PNG I have on my disk. Yes, there's still just one .PNG file, but my Word file is now bigger than it was by exactly the same amount as another copy of that .PNG. In the case of the Moodle file system, there is one copy that you can do something with (delete, move, etc.), and multiple invisible copies that live someplace, totally cut off from the filesystem, that have to be manipulated directly.
This is not an ideal situation for any use that I can think of. It now has all the drawbacks of Word files (wasted space, no ability to edit just by changing source files), and all the drawbacks of web servers (slow, limited space, more involved distribution).
It's clear to me that the idea for file handling in 2.x was to get the best of both worlds, but I think we've got the worst instead.
I'd turn on the legacy system, but then I'll lose things when I back up activities, which is not really something I want to deal with (or support!).
I don't understand why a course can't just have a repository that is only accessible by the course (like the old file system), and be able to link to files that are either owned by the person linking (e.g. private files) or on some kind of site-wide repository.
Re: File Manager In Moodle 2.0
Hi Aaron,
There is a workaround for html files.
In a Section of a course that is not visible to students, instead of uploading a file to Moodle, recreate it on Moodle - just copy and paste - into a Page.
Then link to it from other courses.
This is what I've done here:
Make your course look more like a regular homepage - which explains in detail the "invisible section" technique.
When you edit the Page, all the links to it will show the modifications.
Cheers,
Glenys
Re: File Manager In Moodle 2.0
No, it is not analagous to adding a png to a word file. There really is only one copy of the file on disc. If you don't believe me, try this:
- Install a brand new copy of Moodle 2.0.
- Look inside <moodledata>/filedir. You should find that it is effectively empty. (I think it will just contain a file called warning.txt.)
- Find a file you want to use for testing, make a not of its size, let us suppose it is 1234 bytes.
- Upload the file into Moodle.
- Look inside <moodledata>/filedir again. There should now be some stuff in there. You will find your file is there with a cryptic name like 07/35/0735fac09bd4c6a2dfac7adf1311329ed73c9ffd, but you will be able to recognise it by the file size.
- Now go to somewhere completely different in your Moodle site, and upload the same file again. You could even rename it to something different first.
- Look inside <moodledata>/filedir again. You will see that nothing new has been added.
Re: File Manager In Moodle 2.0
I decided to do a proof-of-concept for the bulk-replacing files thing: https://github.com/timhunt/moodle-local_fileupdater
Sorry, that is only really of relevance to developers at the moment. Still, I hope someone can take the basic idea and develop it a bit.
Re: File Manager In Moodle 2.0
I am with you all the way -- v1.9 had a file browser that allowed us to change or replace a single file in a SCORM package that had been uploaded. That is super important to us. For example, we use a LOT of video. It USED to be easy to change out a single file -- from the course properties page -- now it requires many more steps to do so. Our clients often ask us for small changes and so having the ability to go directly to the course in question and click on a button to browse, replace or add individual files to a course package on the server was very convenient.
The new system is just not an improvbement in the usability of Moodle.
What about FTP?
My courses may contain 4 or 5 gb of Flash video. We upload in bulk for obvious reasons. There appears to be nowhere to upload to.
We actually have a script that builds the course for 1.9 but re-writing that is going to be another issue.
Re: What about FTP?
Don - you might like to do a search for the filesystem repository - this is where you create a directory on your server into which you can upload large files in the old FTP way and then you use that as a repository in your Moodle 2.0 course to retrieve the files.
Re: What about FTP?
Sorry for my intervention but the File System Repository on my Moodle instance 2.0 is not working the same way as you describe it, Mary. You still have to use the File Picker to get the files into moodle what means that there is an other upload involved. I would have expected that when you place a file into the File System Repository that you somehow have to select that file to establish a pointer to that file.
I am still waiting that someone can tell me how the File System Repository should work and when it will be available.
Re: What about FTP?
Rainer - the file system repository is already available; you just have to configure it for your Moodle. http://docs.moodle.org/en/File_system_repository_configuration
Re: File Manager In Moodle 2.0
I have the folowing problem:
I uploaded an Image, and now I want to delete it, how do I do it?, I have erased it from the lesson but, is it still on the server?, how can I keep my server clean?
Thanks
Re: File Manager In Moodle 2.0
"So it is with Moodle 2.0"
Not exactly. If you ware working with webmail client or MS word you have the ability to select individual files (presuming you have a list of files to be emailed), remove individual files, replace individual files, remove individual files, etc. It is NOT so with Moodle.
It is possible to SEE individual files using the "Server Files" option but it is now impossible to work with individual files. That is important to us -- making small changes now requires us to upload and replaec the FULL zip archive.
Using repositories is confusing -- actually I am of the same opinion as many of the posters on this forum -- it's more confusing / work intensive to deal with course files.
Re: File Manager In Moodle 2.0
I asked this question here: http://moodle.org/mod/forum/discuss.php?d=165558 already but since this conversation was already going on, I thought I would ask it here, too.
In 1.9, when we were putting images into Lessons, we would go to the File Manager, go to our "Images" folder, go to a folder for the "Topic" then a folder for the "Lesson" then upload the images we wanted (Figure_01, Figure_02, etc). Then, inside the Lesson, we would use the Insert Image button, navigate to that image and insert it.
In 2.0, it seems you have to go to the Insert Image button, then either upload a file directly (My question is: where the heck does that image GO, and how do I delete it if I want? Or find out what folder it's living in? Or find out what other images are beside it?) or use the craziness of the File Picker to go through 2 dozen directory changes to find your course and...and what? I have a Legacy Files folder, but that doesn't seem ideal.
What should the process be for uploading images (or any other file type) to use inside a Lesson in order to keep them organized (topically, by lesson, and inside Lesson)?
Thanks.
Re: File Manager In Moodle 2.0
I have sort of answered my own question by finding this bit of documentation:
http://docs.moodle.org/en/Course_files
I had not picked up on some of the terminology now in use -- repositories, file picker, etc -- and was having a hard time getting searches to find the right information. Hope that helps someone other than me!
Re: File Manager In Moodle 2.0
I have the same question and I am really curious about where the image I've uploaded to a question quiz went.
I can see the image file, uploaded, in file picker's recent files, but why can't i find it in my server files?
When I edit the image I get in file picker the URL: http://localhost/moodle/draftfile.php/13/user/draft/877817970/c.jpg
When I copy the image URL from the quiz original image (right-clicking in image) I get: http://localhost/moodle/pluginfile.php/27/question/questiontext/2/7/7/c.jpg
Why are they different?
Can someone, please, explain us the meaning of this URL paths?
If I use the same image ten times in the same quiz, the only way to get it is from the Recent Files?
The image is deleted from the server(supposing that only one copy resides in the server) , only by erasing it from all questions?
How can I had a folder to store the images for a quiz in a course repository?
It will be really nice if someone can understand my questions and help!
Re: File Manager In Moodle 2.0
Carlos,
This is a change in how Moodle 2.0 deals with files. Think of it like a Microsoft Word file. When you insert an image into Microsoft Word, it doesn't make a folder on your computer and stick your image in it, then link out to it. Instead it makes the image PART of the Doc file. Moodle is now, sort of, doing the same thing. It's embedding the image directly into the page you're inserting it into to -- in this case a quiz question.
I won't be able to explain it in technical terms, but when you're editing the page, you're editing the draftfile.php version of the file (which only you, the editor, can see), but when you Save it, it moves it over to pluginfile.php which is viewable by all users enrolled in the course.
In order to use the same image ten times, you would need to insert that image 10 times. You can either
A.) Upload the image to your personal file repository, and then when you insert the image, insert it from there using the File Picker.
B.) Create a File Systems repository (which would link to a folder on your or some other server), upload the image(s) to an FTP, and use the File Picker to insert the image each time.
C.) Use External Repositories like Google Docs or Flickr, and use the File Picker to insert the image each time.
D.) Enable the Legacy Course Files repository and use the File Picker to insert the image each time.
E.) Create a Folder resource on the main course page and upload the images there, then copy and paste the shortcut each time you want to insert the image. Folder resources must be visible to the student in order for the link to work, I believe.
Anyone else have any addendums?
PS -- be glad your images work at all! It took us 10 days to figure out that the movement from draftfile to pluginfile was even supposed to be happening, and even more time to figure out how to MAKE it happen!
Re: File Manager In Moodle 2.0
Hi Matt,
Thanks for that - I now have an inkling of how files work in Moodle 2 (reading Moodle docs didn't really help at all for someone of my very limited technical knowledge).
Of the five possibilities you list abvove, which need to set up by an "admin" and which can be done directly by a "teacher" an which by a "student"?
Cheers,
Glenys
Re: File Manager In Moodle 2.0
Glenys,
A.) I believe everyone has a personal file repository automatically enabled. Students, obviously, can only insert images where they're allowed -- in forum posts, for instance, and can't edit Lessons or quizzes.
B.) Your IT person needs to create a read/write folder somewhere else that you or anyone else can access (who is allowed access is determined by you or your computer guy/gal, that is). The moodle admin has to then enable the File Systems repository, and create an instance of the File Systems repository that links to the folder that lives elsewhere (could be same server, could be remote, could be anywhere). If you have newer versions of Windows you can put a folder on your computer (on your desktop, for instance) that will FTP your files to the server. I'm not sure if students can see that file system repository when they're using the File Picker to insert images.
C.) Admin can turn these on or off. Who can access those is up to the settings there, not Moodle -- so a Google Docs folder that anyone can access and upload images to, or is just shared with the students, has some measure of access control, but it's independent of Moodle. I'm not sure if students can see external repositories when they're using the File Picker to insert images.
D.) On courses moved from 1.9, this should already be enabled. An admin needs to enable it otherwise. Same last sentence as B and C.
E.) I don't believe students can upload files to Folder resources. Teachers can create them and upload files and delete files. Students can link to them if they want.
Re: File Manager In Moodle 2.0
Hi Matt,
That's again very useful and, I'm sure, not just to me which is why I've put your original post and your replies to my questions (just one tiny edit on my part) together like this:
"This is a change in how Moodle 2.0 deals with files. Think of it like a Microsoft Word file. When you insert an image into Microsoft Word, it doesn't make a folder on your computer and stick your image in it, then link out to it. Instead it makes the image PART of the Doc file. Moodle is now, sort of, doing the same thing. It's embedding the image directly into the page you're inserting it into to -- in this case a quiz question.
I won't be able to explain it in technical terms, but when you're editing the page, you're editing the draftfile.php version of the file (which only you, the editor, can see), but when you Save it, it moves it over to pluginfile.php which is viewable by all users enrolled in the course.
In order to use the same image ten times, you would need to insert that image 10 times. You can either
A.) Upload the image to your personal file repository, and then when you insert the image, insert it from there using the File Picker.
I believe everyone has My Private Files automatically enabled. Students, obviously, can only insert images where they're allowed -- in forum posts, for instance, and can't edit Lessons or quizzes.
B.) Create a File Systems repository (which would link to a folder on your or some other server), upload the image(s) to an FTP, and use the File Picker to insert the image each time.
Your IT person needs to create a read/write folder somewhere else that you or anyone else can access (who is allowed access is determined by you or your computer guy/gal, that is). The moodle admin has to then enable the File Systems repository, and create an instance of the File Systems repository that links to the folder that lives elsewhere (could be same server, could be remote, could be anywhere). If you have newer versions of Windows you can put a folder on your computer (on your desktop, for instance) that will FTP your files to the server. I'm not sure if students can see that file system repository when they're using the File Picker to insert images.
C.) Use External Repositories like Google Docs or Flickr, and use the File Picker to insert the image each time.
Admin can turn these on or off. Who can access those is up to the settings there, not Moodle -- so a Google Docs folder that anyone can access and upload images to, or is just shared with the students, has some measure of access control, but it's independent of Moodle. I'm not sure if students can see external repositories when they're using the File Picker to insert images.
D.) Enable the Legacy Course Files repository and use the File Picker to insert the image each time.
On courses moved from 1.9, this should already be enabled. An admin needs to enable it otherwise. Same last sentence as B and C.
E.) Create a Folder resource on the main course page and upload the images there, then copy and paste the shortcut each time you want to insert the image. Folder resources must be visible to the student in order for the link to work, I believe.
I don't believe students can upload files to Folder resources. Teachers can create them and upload files and delete files. Students can link to them if they want."
Thanks a lot,
Glenys
Re: File Manager In Moodle 2.0
Thanks Matt for that good explanation but I still need to clarify this:
When inserting a picture using the upload from recent files in file picker, all the images I upload will be, for ever, displayed in recent files?
If I insert the same image 10 times in different questions and Iater on I decide to delete all the occurrences, of that image, from the questions, will that image file be deleted from recent files and from the server disk?
Thanks a lot,
Re: File Manager In Moodle 2.0
Carlos,
I have no idea. Everything I've posted I've had direct experience with -- it hadn't even occurred to me to click on the Recent Files section of the File Picker until just now!
There's another thread around here somewhere -- maybe it's this one! -- that talks about the oddities of files being removed but still acting like they're there (you can't reinsert a file of the same name without getting a "file already exists" error, until some ambiguous amount of time has passed, for instance). So I can't really say how your situation will play out.
Anyone else?
Re: File Manager In Moodle 2.0
Hi Matt,
earlier you said
B.) Your IT person needs to create a read/write folder somewhere else that you or anyone else can access (who is allowed access is determined by you or your computer guy/gal, that is). The moodle admin has to then enable the File Systems repository, and create an instance of the File Systems repository that links to the folder that lives elsewhere (could be same server, could be remote, could be anywhere). If you have newer versions of Windows you can put a folder on your computer (on your desktop, for instance) that will FTP your files to the server. I'm not sure if students can see that file system repository when they're using the File Picker to insert images.
I would like to do this to create a repository links to a mapped drive and another file area on our Moodle Server.
However when I create a File respoitory instance I can only choose (via a drop down) a folder within the repository subfolder of the moodle data directory (in my case the \data\moodle_20/repository/ directory).
I cannot link this to a folder that lives elsewhere
Is there a way to do this?
Am I missing somethig obvious?
Thanks,
Michael
Re: File Manager In Moodle 2.0
I haven't actually done that particular part, and the only reason I think it's possible is because of this excerpt from this page:
http://docs.moodle.org/en/File_system_repository_configuration
Under #1:
"Note that these directories can be ANYTHING your operating system supports. You could mount a whole hard drive there, or mount a shared Windows network drive via SAMBA. You could have a symbolic link to a directory that allows FTP access. The sky is the limit here for a creative Moodle admin!!"
Your IT person would be able to help you with that. I can not. There's also the external repository plugins for other 'standarized' repositories (Google Docs, Flickr, etc).
Re: File Manager In Moodle 2.0
Hi Matt,
I am one our IT people
All of these possiblities look like standard Linux solutions.
Unfortunetly they are not possible on our server (VM Ware Windows Server 2008 R2 linking to data LUNs on on filer datastore).
They can be mounted as drives but not at the folder level.
External repositories are not suitable as these are internal information stores (for example a shared data store for our videos).
I could look at implementing a standarised repository (such as Alfesco) to link to our own data, but it is a shame if Moodle can only access data within the repository subfolder of the moodle data directory.
Re: File Manager In Moodle 2.0
Well, Moodle can access any data that's publicly available. We have a video folder in our web directory, so anytime we want to upload a video, we ftp it to that directory. Then we know that we can create a link in the Moodle html editor to ourpage.com/video/the_video.mov, or whatever, or use some embed code in the html. This also allows us to avoid the 2mb upload limit that Moodle has for uploaded files, a real problem with video.
As far as I know, this doesn't work through the filepicker, which would try to upload and embed that data INTO the page you're editing. But you can link to it just fine! It's security by obfuscation, too -- anyone can view those videos if they know the link, instead of just people enrolled in that course.
Re: File Manager In Moodle 2.0
Re: File Manager In Moodle 2.0
I don't know if what I wrote about above is "easier" than what you're proposing. It depends on what level of security you want, I suppose. Our videos are mostly very context dependent -- it wouldn't do someone much good to watch them without getting the material that surronds them, so our "security by obfuscation" scheme works for us. If you want to protect your videos more, your inexpensive streaming host sounds like a great solution.
The 2mb user defined limit can be changed, yes, but then you're uploading a 30mb file into a page every time you want to link to it, when a link to that file that lives elsewhere saves you that time.
Re: File Manager In Moodle 2.0
With these explanations I now (at least partially) understand the new moodle 2.0 file system. A question that remains however is:
If one were to create html page 1 and place on it an uploaded video (let's call it "video A"), then create html page 2 and upload "video A" again does the moodle 2.0 file system create two instances of this video file or does it understand that this is the same root file and just double reference it? I am guessing it is not the latter since you cannot reuse file tag names. If it is the former (creating two isntances of the file) that seems like it could become a hard disk space liability with larger file sizes.
Does anyone understand the file structure to this degree? Thanks for your help.
Re: File Manager In Moodle 2.0
It makes 2 copies.
And therein lies the rub.
Re: File Manager In Moodle 2.0
No this is not true !
As Tim has already answered it creates 2 records in the mdl_files database table (wich is not a problem because each record is only a few bytes of memory on the disk) but there is only one physical file in your <moodledata>/filedir.
Each record point to that unique file.
For people that only beleive what they see, Tim has already indicated how you can be sure of this, just in case you would do the test I am copying his words :
- Install a brand new copy of Moodle 2.0.
- Look inside <moodledata>/filedir. You should find that it is effectively empty. (I think it will just contain a file called warning.txt.)
- Find a file you want to use for testing, make a not of its size, let us suppose it is 1234 bytes.
- Upload the file into Moodle.
- Look inside <moodledata>/filedir again. There should now be some stuff in there. You will find your file is there with a cryptic name like 07/35/0735fac09bd4c6a2dfac7adf1311329ed73c9ffd, but you will be able to recognise it by the file size.
- Now go to somewhere completely different in your Moodle site, and upload the same file again. You could even rename it to something different first.
- Look inside <moodledata>/filedir again. You will see that nothing new has been added.
An important point is that to know if it is the same file or not Moodle don't look at the filename but at the file content.
So if 2 differents users of your Moodle upload the very same 1Gb video even if it has differents names only one physical copy of the video will be stored on the server ! Absolutely no place wasted.
Also no need to worry for unused files. If a file is not used anywhere by any users it will be automatically deleted after some time.
I don't want to say that the new file manager is perfect (in fact I think it still miss some essentials features).
For me also changing my way of doing things in Moodle is hard, as as I am rather old maybe it's even harder than for younger people.
But I think the new file manager has also a lot of avantages and a lot of interesting new features.
In my opinions the priorities should be
- to, as quickly as we can, write a lot of pages in the Moodle docs about the file manager about how users can do things. Everyone can participate toi that task.
- when users ask "How I can do that" and no good answer is given, post an issue in the tracker so that the file manager can be corrected and enhanced
Re: File Manager In Moodle 2.0
I didn't see Tim's reply, and I'm inclined to believe him... to a point.
What you're describing there is not what I'm talking about.
If I upload file A and then point a bunch of resources to it, then delete file A from the repository and replace it with file B with the same name, none of the resources update. Granted, I do not have a degree in computer science, but I can't see how that is physically possible with only one copy. The data is in one place, and other resources have a way to get to it, but if that data changes, those resources somehow still seem to find the data that was supposedly deleted, and they have to be updated to point to the new data.
In that case, you are getting 2 copies. There is no way that that is not what is happening. Moodle has assigned some other resource ID, a hash or something, and ignored the user's request to delete it or replace it or do anything with it.
There are multiple copies. Making a change to your class results in extra clicks and bloat (which is purged, evidently, sometime, but not when you tell it to).
Re: File Manager In Moodle 2.0
I am afraid there is step right at the start of your post where you gloss right over the key point:
"point a bunch of resources to it"
what form does this pointing take?
Re: File Manager In Moodle 2.0
Aaron, not an answer. I don't know enough.
"If I upload file A and then point a bunch of resources to it, then delete file A from the repository and replace it with file B with the same name, none of the resources update"
- Exactly HOW are you deleting the file? (eg go into the server and delete it?)
- How are you replacing it? (eg copying the name of the file from 1 and replacing it)
- And I'm assuming it it in the moodledata folder you are doing this.
I'm sure you are not working with the way Moodle is designed.
If I understand things right the NAME of the file stored in Moodle relates to some hash of the file. If you manually change the file, then that relationship is no longer there. Maybe there is some code that depends on this. Tim or Petr is your best bet to get clarity on this.
-Derek
Granted, I do not have a degree in computer science, but I can't see how that is physically possible with only one copy. The data is in one place, and other resources have a way to get to it, but if that data changes, those resources somehow still seem to find the data that was supposedly deleted, and they have to be updated to point to the new data.
Re: File Manager In Moodle 2.0
I quite agree with derek : if Aaron explain us exactly how he
delete file A from the repository and replace it with file B with the same name
we could explain him exactly what happend in fact in the database and in the files.
No need to have a degree in computer science for that (I don't have one !) because we are speaking here of what happend.
No need to understand in detail the code that the (talented ) moodle programmers have done to make it happend.
Re: File Manager In Moodle 2.0
K. To be honest, I am not sure where the confusion lies, but I'll try again:
Add file
--Means go into "My private files" (or any other repository), click "Add" and upload a file.
Point references
--Means make "file" resources in classes, and select the file from your personal (or any other) repository as the target for that file.
Delete file
--Means go to one's personal repository, click the little contextual menu icon, and click "delete."
Allow me to interject here: At this point, I would exect all those resources that I made with this target to be broken, because the file is removed from the repository. As we all know, those resources will not be broken, since the file's data still exists in the database and deleting it from a repository is doing nothing more than deleting the text of its name from the list.
Replace it with a file of the same name
--Means clicking "Add" and uploading a file with the same name.
Now, if these were real files, at this point, all those resources that were set to target the original file in my private repository would now be updated to reflect the changed file I just uploaded. This is not the case, as those resources are not pointing to a file. They are pointing to a string of data in the black box of the database, and have never been associated in any way with the list in my repository, because my repository does not really exist as anything other than a list of names that are associated with invisible entries in the database.
If I want those resources to update to the new version of that file, I still have to go into each and every course that uses it, edit those resources, and point them to the new file in my private repository, which will actually just point them to the string of data associated with that name in the invisible database.
This is not an issue of me not understanding what's going on; it's an issue of me not liking what's going on because it makes teachers and administrators who have to run multiple classes that use a few of the same resources go through and update every single resource in every class that points to a file that has been updated.
This is not so much a question as it is a complaint.
I understand why the system has been changed (better security, more options for setting permissions--hey, great things, to be sure!); I'm just saying that it results in a lot of wasted time for anyone who has more than one class using the same files, and renders "repositories" meaningless, since they have no relationship to actual files; they would be better called "lists" or something. "Repository" makes it sound like they are storing something, when they aren't. Storage has been completely obfuscated in Moodle 2 and largely taken out of the the user's control.
And that is very irritating to many users. Please just take a trip through these forums and have a look: A lot of users are very frustrated with the repository system because it makes automation or even just efficient hand-editing of classes really difficult. Most of us complaining about this do not understand what's going on at first, but even after getting really good explanations, as I have in this thread and others (thank you for that, regardless of my feelings about the answers!), we're not happy about the way the system works.
Re: File Manager In Moodle 2.0
Matt,
Once you can't reinsert a file of the same name without getting this "file already exists" error, is there a way to update a file in the recent files folder?
Let me explain my problem... First, I uploaded an image to my repository and it appeared in the recent files folder, as it was supposed to. Then, I inserted this image in different pages, using the upload from recent files in the file picker. Later, I updated this image in my own repository (external one), but I couldn't upload it again, because I always got "file already exists" error. To insert this new image, I had to rename it, and thus, I got two images almost the same in the recent files folder - one of them I do not intend to use again.
I understand that I need to update the image in every page I inserted it before, but, what about the recent files folder? Is there a way to remove the old one from it? Or is there a way to update it or I'll really have to live with the two fo them?
Thank you,
Andrea
Re: File Manager In Moodle 2.0
We are having the same issues and have tried everything to fix this. How did you get the movement from draftfile to pluginfile working? Was it just what was suggested here?
Any advice would be greatly appreciated - Thanks!
Re: File Manager In Moodle 2.0
Hi everyone!
I have created a first round of explanations about 2.0 File Management here.
There is some text and 3 charts.
Take a look and let me know what you think
Re: File Manager In Moodle 2.0
I am confused.
My old workflow that I just mastered and seems to be vasted now.
1. I created multiple (50) questions using word mail merge.
The questions are with images as question and answers. i used link to image that was in folder in moodle. so the mail merge used excel table where names of the images where and just filled the file path with correct image name.
2. then i just uploaded those images to moodle (folder specifed before) and this xml file with multiple question and it worked fine.
How could i do this now? Where shoudl i but the pics and what is the correct path for those pics?
Re: File Manager In Moodle 2.0
There is no path. The new system moves everything into the database and then the "repositories" are just lists of text that are linked to entries in the database.
Your workflow is kaput. Hopefully there is a different way of doing it.
What would be really nice would be to see the Moodle dev team (I think it'd require the core team) make a set of "admin tools" or something to handle these issues; they've really done a number on virtually anyone who has more than one course.
Re: File Manager In Moodle 2.0
I'm with you -- take a wander over to http://moodle.org/mod/forum/discuss.php?d=180865#p800129 and please contibute your two cents worth (though I wish a user's contibution was worth more).
Re: File Manager In Moodle 2.0
Hello,
I have a few questions myself : what is it good for to attach metadata to the files we upload if there is no search engine for the server files? or the repositories in general?
Did anyone find an easy way to find files in the server file? Whenever I try to find a file there I remember how my son's room looks like ( he's a teenager!). It's a compete chaos.
Or is there a search engine and I just didn't find it?
Thanks,
Monica
Re: File Manager In Moodle 2.0
Monica, there is a tracker issue here on a relared issue (sorting): http://tracker.moodle.org/browse/MDL-31406
Derek
Re: File Manager In Moodle 2.0
Thanks, just voted for it!
Re: File Manager In Moodle 2.0
I just figured out the repositories! Great! I have used Google Docs and Dropbox for about three years now. I've also recently signed up for Box.net and have Google Drive. It is not too difficult to add these (except for Google Drive, yet) as repositories. I keep a huge number of files on Dropbox, so having direct access to them will be useful. I went to the Repositories link in the menu, and enabled Dropbox. I was directed to a page for an API key, and the page has a link to go to Dropbox to get it. From there, it was relatively painless to get the key and the secret name to set my Dropbox up as a repository. I now have direct access to all those files directly for using as resources in courses. The repository shows up with the other file locations when adding a resource. Great! Same with Box and Youtube. Haven't set up Google Docs because I don't use it very much.
So, what does this mean? I can do all my file work on Dropbox, which is really just like any other folder on my computer, and then add any file in Moodle because my Dropbox folder opens up there. Sweet!
I work on a desktop at home, a laptop at work, and my Android phone and tablet just about anywhere. With Dropbox, I have these files available anywhere, on all of my devices. I have actually edited courses on my tablet, and will now add files as resources there because I have Dropbox as a repository now.
Thanks, Moodle Developers!
Re: File Manager In Moodle 2.0
Hello everyone,
I have been reading (most of ) this thread, and feel indeed hat the best way to go is having a separate file server from the main Moodle. However, for the time being, in our university we're not going that way _don't ask ME why.
So, for what seems to be a fairly large crowd, for some time to come, the "My private files" folder seems to be the way to go.
That's where it problems really begin!
When you upload files to that folder and then create Ressources (or activities by the way), those files are actually COPIED to the "ressources" manager. This means you cannot create an alias of the main file for the ressource expecting that file to draw its sub-components from the original "my private files" folder. You must copy ALL the components, otherwise the links are broken.
This means you cannot update any common files.
Besides there is a bug that prevents you from updating the common files, even if you were ready to recreate manually all your sub folders and then copy manually all the aliases within them for the links not to break.
I've tried it for you....
When you do you get a :
"Coding error detected, it must be fixed by a programmer: PHP catchable fatal error"
This bug is reported here: MDL-36166.
If anyone among you thinks it's important, do not hesitate to go and "watch" it.
When that flaw has been corrected M2.x will be a real powerhouse, untill then it has many an IT manager thinking. In the menatime they look elsewhere...
If they did go another way it would mean hours, ney, days, weeks of lost work for many of us.
Cheers.