Resource embedded links - lost when copying course

Resource embedded links - lost when copying course

by Pat McDenn -
Number of replies: 3

If there is a solution or workaround, it would be most welcome.

As an example, we have a course where we have included PDFs to official documents. Our PAGEs are full lessons, with these documents embedded at certain points, so the user can scroll through the document in the embed window, or continue on scrolling in the main window. To link to the documents, they have been uploaded in a hidden topic area in the same course (hidden but available). 

When we create a new offering of the course (course copy), the embedded links don't update. This is presumably because, globally, they are not linked to the course ID but instead to the overall resource list (the 9474 below).

https://website.net/pluginfile.php/9474/mod_resource/content

So, when this course is copied, the 9474 persists but a new resource is created in the new course. From the new course, a student can't see the 9474 resource because it is in the new course. I'm certain many of you are familiar with the linking issue, but I suspected that Moodle would see that it was linking to a resource within the course, and update the resource to link to the equivalent resource in the new course. 

Is there a solution and still achieve the same presentation? Is there a workaround?

Thank you for your time.

Average of ratings: -
In reply to Pat McDenn

Resource embedded links - lost when copying course

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers
yea, I've the same issue using the H5P iframes. even though I clone the course, the iFrame IDs are still pointing to the original course they came from. I've changed my practice to instead use the H5P filter which has been great. But in your case, I wonder if you're better off putting your documents into an external course (that would serve as a content library to house the linked documents, then the URL can remain the same), or on an external site such as G Drive or Dropbox where again then the iframe would not change when cloning.
I'm curious how others may handle this...
Average of ratings: Useful (2)
In reply to John Provasnik

Re: Resource embedded links - lost when copying course

by Pat McDenn -
Hey John!

Thanks a bunch for responding. Excuse the delay.

I will consider the external course option. A bit of a risk unless each instructor had their own external course, else I would risk them deleting each other's content as they add, remove and reorganize. An external drive might be an option as well

I'll also look into the H5P filter... but I do believe that linking to an H5P activity is not an issue as it seems to migrate ok... but the filter is nice.

Thanks again for responding to others in need. I've seen quite a few of your posts and I'm sure they will help others for a long time into the future smile
In reply to Pat McDenn

Re: Resource embedded links - lost when copying course

by Jason McGensy -
One thing that will work with course copying is to link to the Moodle resource rather than the file directly:
https://yoursiteurl/mod/resource/view.php?id=506322
If you have the file resource configured to "Open" it should display in an iframe the same as it would if you clicked on it from the course page and when you copy the course and the new resource is created, the link should point to the newly created link rather than the old one