Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: File handling.

Talk:File handling

From MoodleDocs
Revision as of 07:27, 21 August 2011 by Helen Foster (talk | contribs) (text copied from Page notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Update to Moodle 2.0

OK, files are different in M2. If this page is the jump off to file handling, we need references and screen shots of the file picker and some help for people who are used to earlier versions.

Course files starts to help those used to previous version. However, we learn that course files in M2 is the exception, not the rule.:) Perhaps some new pages are necessary for the subject of files in pre and post Moodle 2.0. --Chris collman 01:14, 5 December 2010 (UTC)

First things first

Chris, I am afraid we need more than this. What little information is here is written by experts and that is a mistake. The file picker is confusing of itself, but the basic file handling is just not addressed at all. How do links to a repository work? How can I upload a zip file and unzip it and access those files when I have a course in 1.9.x that contains 365 images without having to recreate every link to every image. People build courses over time and transitioning to M2 is going to take up far more time than they have - just to learn how file handling works. Perhaps we need to start in how we can access the files area, to create a repository, all in simple language. What is here and in the File System Repository page makes it clear that only an Admin has access to that, and if that is the case, then why are people complaining about the pain when they have shot themselves in the foot?--Colin Fraser 23:20, 26 December 2010 (UTC)

The first things first as you stated and I will restate. We need to personally feel comfortable with being a teacher and uploading "private files" for use in any of our courses. Then uploading files that my co teachers of a course can access. Then uploading and accessing files that are available for the site or courses that I am not a teacher but want to use. And of course being a student and uploading a file for a course and perhaps one I can use in more than one course. Just updated my profile at Moodle.org and it occurs to me it is a M2 site. Well I got to put on my snow gear, shovel some more snow and think about this new system--Chris collman 13:18, 29 December 2010 (UTC)

We need to make progress on documentation

Just got through reading a very long thread at http://moodle.org/mod/forum/discuss.php?d=174702 and I am really confuzeled.

However, I will plow on. I am committed to using 2.1 and am fortunate that we repeat the same course on the same server. So it should not be a big deal. I am making darn sure I upped the max file size to 200 MB so I can load up zip files, that previously I would do via the backdoor FTP into moodledirectory.

I think Elena is trying to give tips how to use the same file in multiple locations. I am storing this here for lack of a better place. Humm, maybe this belongs in FAQs?

How to link to an existing image/file

Once you have uploaded your image, you used 2.0 right-in-place upload and uploaded it directly into the Label or Page.

So, now, you will need be“creative” to make it work. Here is what will NOT work.

Take a look at the html code of you resource, you will see that you image source says “draftfile.php”, e.g. draftfile.php/13/user/draft/833634938/
This link is not static, it is generated when you look at the code. Next time you look at code- it will be different, e.g. draftfile.php/13/user/draft/7767458346.
Thus once you copy/paste the code into another resource, it will not work anymore.

Here is what WILL work: Instead you now need to a) add a resource b) in the non-editing mode hoover over the image with a mouse and copy paste that url instead, e.g. h_ttp://moodle.org/pluginfile.php/140/mod_forum/post/766556/bee_2-50.gif c0 then, when you add the new snippet, make sure that you change the location of the image, so it will not be draftfile something, but pluginfile.

This is a good example of when storing files in the Legacy Course Files area and linking to them like in 1.9 is the best solution.Thus, if I would have a need for this, I would enable external linking for the installation and turn on Legacy Course Files. So later I would be able to embed a linked image once, like in 1.9

The above "How to link" idea was written by Elena, shameless edited by Chris from one of many posts Elena made in the above forum thread.--Chris collman 22:00, 26 July 2011 (WST)


How to insert a file from another course using the repository system

Basically we will use the file picker and the server repository to add file located in one course to another course. It is helpful to know the course category and the location. The site must be set up to enable this or the user must have the right role permissions.

We can rewrite the instructions, but let me use demo.moodle.org as an example. I logged in as administrator. I created a new course called File Picker Demo Course (FDPC). Any one should be able to duplicate this on demo.moodle.org.

My goal in the new course is to add the "Moodle-Logo" image file as a resource file that is located in the Moodle Demo Course file structure. Then add a "Gold Star" to the top Summary. This file is located in the Moodle Demo Course's legacy files under Lesson. Then put the Moodle Logo image that was used as a resource file in the File Picker Demo Course, above the "Gold Star" in the Summary of topic 0 (top).

This will demonstrates the nature of the file navigation structure using the file picker and the repositories.

Note: I did this as administrator. When I logged in as teacher, I went to the Moodle Demo course and was able to see the two files I used in the example below. There must be site settings for this as both were located in English Category but teacher was not a teacher in the file picker demo course.

In the FPDC I added a file resource and got to the file picker popup. I clicked on the Server Repository. A breadcrumb tree popped up in the file menu area. There were no files available. The breadcrumb said System / English / File Picker Demo Course/

I clicked on English. I saw folders for each of the English category courses.

I clicked on Moodle Features Demo folder. The breadcrumb changed and I saw 7 folders.

I drilled down until my breadcrumb said system/English/Moodle Features Demo/ An image(File)/ Files and subfolders/images I clicked on the file I found called moodle-logo.jpg.

The File picker went away and I had a popup window with the file name (save as), Author's name and Choose license. I clicked on "Select this file".

Now the content area of the file resource I was trying to add had the Moodle-logo.jpg in it. I save my work and went back to the File Picker Demo home page.

Adding a legacy file from another course

My goal was to add a gold start at the top of my course's home page. I edited the top section and pressed insert a picture. I basically repeated the above process. Except I knew that my gold star was in System/English/Moodle Features Demo/Legacy course files/Lesson.

I clicked on gold_star.jpg and was able to insert that image. I centered it.


Adding a file already being used in the course

My next goal was to add the Moodle logo image I used as a file resource, to a spot above the gold star.

Again I clicked on the file server repository. I saw the breadcrumb System/English/File Picker Demo Course, with folders "Course Sections summaries and "New File from Moodle Demo (File). I clicked on the "New File" folder.

I drilled down to System/English/File Picker Demo Course/New File form Moodle Demo (file)/Files and sub folders/ where I saw a file called moodle-logo.jpg. I clicked on it. The insert image box appeared, I clicked on the tab and reduced the width from 600 to 200 and completed the insert imaage process.

Why are the developers so happy about that process?

They are excited because the Moodle Server is only storing 2 images, yet I can "see them" in 5 different places in the Server repository. It is different.

How can I use the html linking feature to link to a file in the server repository?

To be determined - see Elana's tip above.

--Chris collman 23:20, 26 July 2011 (WST)

File handling

File_handling_2.0 - GC, Jan 11, great start on FAQ, will need an entire section on this, need a page on FTP...