Workflow with Filepicker: developer question

Workflow with Filepicker: developer question

by Derek Chirnside -
Number of replies: 9

No doubt you have seen the Moodle.org discussion here: http://moodle.org/mod/forum/discuss.php?d=169791 on the file picker. And outside Moodle.org for example here: http://www.mattcornock.co.uk/blog/matt/moodle-2/file-repository-course-files  Some light, lots of heat.

I just wonder where the official MoodleHQ view is on the file picker scenario, or what developers who wrote this had in mind.

The basic question is this (from my point of view)

Case 1: Uploading ONE file used once in a site: fine, no problems. 
Security is taken care of etc etc.

Case 2: Uploading file you want to use in several places in a site (eg a statement of ethics, a video of something, a course related form)

Using core Moodle, without enabling a contrbuted plugin or enabing Legacy course files: is there a workflow for this that was envisioned for this scenario??

<Could insert here a bit of a summary of all the cludgy work arounds people have suggested (hidden folders etc), google apps etc>

But I was interested in something from the designers/developers point of view.

-Derek

Average of ratings: -
In reply to Derek Chirnside

Re: Workflow with Filepicker: developer question

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Case 2. Either rely on recent files, or first upload the file to My Private files, then keep grabbing it from there.

In reply to Tim Hunt

Re: Workflow with Filepicker: developer question

by Glenys Hanson -

Hi Tim,

So using My Private Files is kosher but using Legacy Course Files isn't. Have I understood right?

I thought the new logic was to put files somewhere everybody on the site could access them to avoid duplication.

Cheers,

Glenys

In reply to Glenys Hanson

Re: Workflow with Filepicker: developer question

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

"I thought the new logic was to put files somewhere everybody on the site could access them to avoid duplication."

I think that is almost entirely wrong.

Files belong to particular bits of context. For example:

  1. If you are a resource to your course, that file belongs to the resource.
  2. If you put an image in the feedback to a multiple-choice question, that file belongs to the multiple choice question.
  3. If you embed a photo in a forum post, the photo belongs to that forum post.

Access to those files is controlled by the same logic as access to the thing that owns them. So, for example in 1. are you allowed to see that resource (taking into account roles and capabilities, restrict to group members only, whether the resource is visible, etc.) There are almost no places where a file would be accessible to everyone. (Label or resource on the front page, I guess.)

Because of the clear ownership of files, then at a conceptual level, there could be a lot of duplication (for example if you have the same 100 page tedious academic policy document as a resource in every course.) However, Moodle does something magic behind the scenes so that file is only stored once on the server.

 

The think about My private files is that it is it is completely private to you. It is just a staging area where you can put files, so that wherever you go to add files for real, then those files are easy to get at in the file-picker. However (if you are a teacher) students will lever get a file that comes from your 'My private files' area. They would only get the files that you have added to a course as a resource (or something).

By contrast, files dumped into the Legacy course files area are accessible directly to students. You could put a link to such a file into a 'page' resource and it will 'work'. Suppose, however, that you then backup that page, in order to copy it to another course. Then Moodle will not know that page depends on that file, and so the copy of the page in the other course will break. If, instead, you had done it properly, so that the file belonged to the page, backup and restore, etc. would work.

Average of ratings: Useful (2)
In reply to Tim Hunt

Re: Workflow with Filepicker: developer question

by Glenys Hanson -

Hi Tim,

That's really helpful. I think I'm beginning to understand. Can I paraphrase to see if I really do?

  1. Files are attached to (owned by) particular resources or activities.
  2. The same file can be duplicated in several resources/activities but it is only stored once on the server.
  3. Duplicating a file is different from copying a file. (But I don't really understand this.)
  4. When a resource/activity is moved to another course (or a different Moodle platform) the files remain attached (unlike in 1.9 where links are sometimes broken).

I don't understand how the Moodle magician recognises a file as being the "same" document. For example, in my hundreds of Hot Potatoes exercises, I have hundreds of files named: 01.mp3 but in each exercise the content of the file is different. Does the magician understand that the 01.mp3 in Exercise A is not the same as the 01.mp3 in Exercise B?

Cheers,

Glenys

In reply to Glenys Hanson

Re: Workflow with Filepicker: developer question

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Glenys,
welcome to the A-side (advantages) of a content-addressable storage wink: see here for details.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Workflow with Filepicker: developer question

by Glenys Hanson -

Hi Matteo,

The texts you refer to do help though they are awfully difficult for non programmers like me. But I understand that "content-addressable storage" means that thanks to something called a "SHA1 hash of the file contents" the magician is able to see inside a file and recognise that all my 01.mp3 files are different files and store them separately.

It really is magic!

Cheers,

Glenys

In reply to Glenys Hanson

Re: Workflow with Filepicker: developer question - Private files

by Glenys Hanson -

Hi there,

Now to see if I've got it about My Private Files. For example, if I want to show off my cat, I can put it in My Private Files* and then link to it from here:

Everybody, even non-logged-in guests can see it, but if I move the forum elsewhere the link will break. If I'd used the file picker, I'd have been able to move the activity without breaking the link.

On the other hand, I can easily find the image again if I need a demo picture.

And, more important, students can do this!!! cool

I'm slow, but I feel I'm getting there. big grin

Cheers,

Glenys

*Navigation > My Profile > My Private Files & remember to click on "Save changes" - I didn't of course just now. tongueout

In reply to Glenys Hanson

Re: Workflow with Filepicker: developer question - Private files

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes, you are starting to get it.

It all works fine if you are a single teacher. The situation that is not dealt with well is when you have a group of teachers collaborating on a course. There is nothing like My Private Files that is a convenient place to temporarily upload files where they are readily available to put into their rightful home using the file-picker.

You could add a hidden folder resource in the course, just like you might create a hidden Teachers' form as a place to discuss the creation of the course. However, accessing the files there would be several clicks in the filepicker.

 

By the way, the fact that need to remember to click save changes when editing the My Private files area, is a really horrible usability problem. There must be a way to fix it.

In reply to Tim Hunt

Re: Workflow with Filepicker: developer question - Private files

by Mark Hilliard -

Tim,

Quote: "The situation that is not dealt with well is when you have a group of teachers collaborating on a course."

You have just described an extremely common ( 95 % + ) that we are running into with cooperative Moodle site courses, and shared learning courses.

So FP 2.0 works for solo practioners...what about a multi-instructor courses?

Your work-around (even if possible) sounds painful to deploy and/or admin. There must be a better way to address this need...Elena ivanova spotted this issue way back in Aug. 2010 and posted extensively on it...is anyone in Moodle HQ taking it seriously?  I know she got them to support legacy files but i don't really call that a solution...what about fixing FP 2.x's processes?

Mark H.