Book modules, uploaded content (media) and copying/course cloning.

Book modules, uploaded content (media) and copying/course cloning.

by James McLean -
Number of replies: 4

I just had to look into a problem with a book module where an uploaded movie file was not available to students, however it was available to users in the system with higher roles.

With our courses, student cohorts get their own instance of a course in each study period, which requires courses to be cloned from study period to study period (works fine, generally).

The root cause was that the media that was inaccessible was uploaded to the book as part of course ID 345 (specific ID not important) then at the end of the study period that course was then copied using the moodle web-service to course ID 678 (again the specific ID isn't important). The content of the book was included in the copy/clone, but it was using the previous courses details through the m_files table, the m_context table and into m_course_modules.

My understanding of the "new" moodle data file system structure and concepts were that new links to this media should be created directly to the content when the activity was cloned, rather than simply copying the old link. Students in course id 678 have no rights to view content added to course 345, so this is why the link is inaccessible at this point to the students.

Is this a bug or has something else happened? 

Happy to raise a tracker issue if this is believed to be a bug.

Average of ratings: -
In reply to James McLean

Re: Book modules, uploaded content (media) and copying/course cloning.

by Wendell Jones -
James, Have you discovered anything further? I think that we have encountered the same issue with book import. A book was developed in one section with links to pdfs, but when it was imported into a second course, students would receive an error that self-enrollment into the first course was not allowed. This is apparently due to the links pointing to the files in the first course. What version of Moodle are you using? We are on version 2.7.1+ (20140731). Let me know if you have put in a tracker issue.
In reply to Wendell Jones

Re: Book modules, uploaded content (media) and copying/course cloning.

by James McLean -

Thanks for the reply Wendell. I haven't done any further investigation on this as yet due to some other important issues that required my attention.

We're on Moodle 2.6.4+ currently. 

I'm yet to put in a tracker issue, but it sounds like others are affected. I'll see if I get a chance to put one in this afternoon, but I would like to do some further testing if possible before hand.

In reply to James McLean

Re: Book modules, uploaded content (media) and copying/course cloning.

by Wendell Jones -
Although we are on different versions, they are approximately the same vintage. I had a look through the Recent Changes list for anything that might be related. I didn't find anything relating to Book, but this item seemed to have some similarity to our situation: "MDL-45616 repositories: more clearly distinguish when we use source and when reference". I can't find that tracker item to read more about it, though, so it may be totally unrelated. Just a thought.
In reply to Wendell Jones

Re: Book modules, uploaded content (media) and copying/course cloning.

by Jeanette Swain -

Hi,

I tend to back up the course with the users in it then restore without and it seems to redirect links to the new course - not back to the old - I am not sure if this can be replicated for importing.