How to crosslink to a file in another class/course?

How to crosslink to a file in another class/course?

by Katie Meyer -
Number of replies: 14

Moodle 2.2+, from what I can tell; on a hosting service. (I'm working in the Moodle system for a client on their set-up)

Having difficulty cross-linking and wonder, do I just need to upload the same file to different courses? For version control, would prefer to upload a resource in one class, and if it's needed in another class, just "cross-link" to it. I can add a URL to an "external" file but that isn't what I want to do...

How do I get the exact url to a resource that's already loaded in another course?

Is this something I should upload to a repository in the Moodle system and just link to from different courses?

Thanks in advance for assistance - I'm a new but enthusiastic Moodler smile

-Katie

Average of ratings: -
In reply to Katie Meyer

Re: How to crosslink to a file in another class/course?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi Katie -yes one advantage of Moodle 2 is that you only need to upload once. Upload the file to course A and then go to course B; click to add a file in the same way as you did in Course A but instead of clicking "upload  a file" click "recent files" and you should see your file there referenced from the other course. Click to add it and it's done. Another way is to click "server files" and find the course you uploaded it to in the first instance and click to add it from there. You are only uploading it once and linking to its central storage location but the way it's done is as above.

In reply to Mary Cooch

Re: How to crosslink to a file in another class/course?

by ben reynolds -

Following Mary to say "Sort of."

In fact, you will notice the links in different classrooms are different. Here are paths for the same student to the same crosslinked file in two different classrooms/courses.

http://twilight.cty.jhu.edu/mod/resource/view.php?id=1606
http://twilight.cty.jhu.edu/mod/resource/view.php?id=1605

What this means is that, if you change the resource in one classroom (say, correct typos or add text), upload and overwrite in that classroom, the resource is NOT changed in the other classroom.

In reply to ben reynolds

Re: How to crosslink to a file in another class/course?

by Katie Meyer -

Thank you Mary and Ben for replying to my question. So it sounds like I am placing multiple copies of a file by having to "upload" it in different courses, which is a mess on the version-control side if that file needs updating - I'd have to re-upload corrected file into each course it was placed in.

I was hoping to be able to upload it once, then maybe use a URL resource to point to it, link to it from within other courses.

So even if the file gets placed in say some repository folder, I can't really link to it, I have to upload it to each course it needs to appear in? Is that because of access/permission settings within each course and/or roles/permissions assigned to users?

Is it possible to add a URL resource in one course that points directly to/will download, say, a text file that's in a different course? Will that work if the file is hosted in a folder on the client site, next to but not down in the Moodle installation folder?

Many thanks-
Katie

In reply to Katie Meyer

Re: How to crosslink to a file in another class/course?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

This is an issue that a lot of people have expressed concerns about and hopefully will be addressed in a later version of Moodle. You could use Googledocs?

In reply to Katie Meyer

Re: How to crosslink to a file in another class/course?

by Itamar Tzadok -

You can put the files in a folder resource and add URL resources with links to the files in the folder (in the folder view right-click a file link and copy the url). The url of a file in the folder points to the file by file name and the folder's filearea rather than to the actual file and so as long as it's the same folder resource and the same file name you can replace the file with another and the linking URL resources will not break.

You can also store the files outside Moodle's file system by uploading them directly to the server either inside or outside the Moodle installation folder. But this makes your files less protected and hence not recommended.

hth smile

In reply to Itamar Tzadok

Re: How to crosslink to a file in another class/course?

by ben reynolds -

Itamar,

As far as I can determine in our 2.2.3 test environ, if you crosslink from Course A to Course B, uploading a new file to Course A of the same file name and overwriting the old file does NOT change what Course B sees.

Course A student sees the new file of the same name. Course B same student sees the old file of the same name. (I'm repeating earlier forum complaints, I know.)

This is not helpful if (as we do) you replicate the same course 20 times and then find a single, crucial typo in one place in a .doc or .pdf. You are suddenly presented with not only replacing the file but the fact that the old file, if you delete the activity/resource is immediately deleted.

So, for each instance of the course, we need to recreate the whole activity, upload file, upload file, make link, etc.

I don't think that the 2.3 changes address this. Am I wrong? (I hope so.)

In reply to ben reynolds

Re: How to crosslink to a file in another class/course?

by Itamar Tzadok -

That's not how what I've suggested works.

You upload/replace the file in only one place, the designated folder resource which serves as the files repo. The links can then be created as url resources in any context that allows access to the folder resource (in its context).

(Katie said that she was hoping to be able to upload it once, then maybe use a URL resource to point to it, link to it from within other courses)

It should probably be not too difficult to create a new resource type, a sort of hybrid url-folder, which would allow the user to set a new virtual repo or connect to existing one and display a link to one of the files in that repo. As soon as I have some time I'll look into that. 

smile

In reply to Itamar Tzadok

Re: How to crosslink to a file in another class/course?

by ben reynolds -

Ah, I missed the right click copy URL in classroom A then paste it into a resource in classroom B part of your earlier message. I'll experiment with that this weekend and report back.

Assuming it works, the next question is, if you update the file in A by overwriting the previous file, is the link preserved and does it work in B?

In reply to ben reynolds

Re: How to crosslink to a file in another class/course?

by Itamar Tzadok -

Yes, because the file is referenced by context, component, filearea and itemid which is a sort of perm link as long as the resource exists, and then a file name which identifies the file in the resource's file space. So the link is

.../context/component/filearea/itemid/filename

and it will be the same link after you upload a new file with the same file name to the the same resource and overwrite the existing file. smile

Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: How to crosslink to a file in another class/course?

by ben reynolds -

Itamar,

Not to be difficult -- I read so many posts from Using Moodle -- but have you said this before? It is the answer to so many teachers' worries about moving to Moodle 2+.

It's also the answer to my biggest concern about my own institution moving to 2+. So, many thanks, Mr. Useful!

In reply to Itamar Tzadok

Re: How to crosslink to a file in another class/course?

by Katie Meyer -

Eureka! I've managed to do the "right-click-copy URL in classroom A then paste it into a resource in classroom B". Thank you!

(Now all I need to do is maintain a spreadsheet listing which cross-linked files are the "original" ones, for all the categories/courses...overall though, some version control progress for me in working with Moodle!).

What I am having trouble with in the Resource Module is, how to add a URL resource inside a course folder. I can add a resource or activity at main course level, but when I click into a folder, all I can do is edit settings--which gives me the template to upload a file, no choice to add a URL.

In a course, I have one folder that contains materials the student needs to download. Since one of the files I'd like to put in there already exists in a different course, isn't there a way to add a URL inside a folder? What if I wanted to create a unique folder that contained, say, external links to publicly available supplemental material?

URLs can only be added to a course in the top level, not within anything inside the course? We're using folders in some courses to nest things, otherwise it's gonna be scroll city.

Thank you-
Katie

In reply to Katie Meyer

Re: How to crosslink to a file in another class/course?

by Itamar Tzadok -

No can do with the Folder resource. The Folder resource is just an interface for management and display of files in a certain area of the Moodle file system.

If you want a flexible repository try the Database activity module (or the Dataform plugin if you don't mind it's current Beta phase). There you can construct a template for uploading a resource as either a file or a url or just text and then add mixed resources. The Data???? entries may be linked from different places with the 'right-click-copy' technique. The Dataform is far more flexible than the Database and allows you also to display the list in various ways in a block or even embedded in a course section. smile

In reply to Itamar Tzadok

Re: How to crosslink to a file in another class/course?

by Doug Baleshta -

Is it possible to use the My Private Files area to accomplish this and then in the file picker, choose the appropriate file from My Private Files?

In reply to Itamar Tzadok

Re: How to crosslink to a file in another class/course?

by Katie Meyer -

Thank you for your patience and helpfulness with this. Greatly appreciated!

Couldn't I just activate the URL Downloader Repository:

http://docs.moodle.org/22/en/URL_downloader_repository

So that when I want to add a file that is URL resource, it's available as a choice in the File Picker? (Or will that URL resource module repository whatzit only accept "external" URLs such as youtube.com, dropbox.com, et al?)

That way, when I click "add resource/file",  I could double-click into a folder through that interface. Then I could "upload" a URL that points to a file in another course in Moodle, and it would be listed in that folder.

Currently running version 2.1.1, build 20110801.

Thank you-
Katie