Moodle
  1. Moodle
  2. MDL-26831

Backup/restore links within a course do not restore properly.

    Details

    • Affected Branches:
      MOODLE_19_STABLE
    • Rank:
      16449

      Description

      Each time we try to backup/restore to create a new course, a number of the links to audio files do not update within the new course. That is to say, the URLs do not update and the course number in the URL stays the same for the new link, thereby creating a link that our students cannot use since they do not have access to the other, older course.

      EXAMPLE:
      1. We backed up our course PTP Fall 2010 (Fall10); the course ID for this course is 26
      2. We restored it to a new course, Practice Course 3 (PC3); the course ID for this course is 56
      3. A number of the links to files from within our resources do not update the course ID; e.g. this audio file's link for Fall10: http://lms.integrativenutrition.com/file.php/26/Fundamentals_01.m4a, should have been updated with the course ID within the new course as: http://lms.integrativenutrition.com/file.php/56/Fundamentals_01.m4a, but does not
      4. The files themselves DO transfer over; by simply updating the URL (replacing 26 with 56) we are able to get the link to work for the new class

      This does not happen with all files, but a good number of them, and we then have to go back and manually update all of the broken links for each file, each time we restore to a new course.

        Activity

        Hide
        Helen Foster added a comment -

        Andrew, thanks for your report. Just wondering whether the broken links were relative URLs? As the FAQ http://docs.moodle.org/en/Backup_and_restore_FAQ#Why_are_certain_course_links_broken_in_a_restored_course.3F explains, any links need to be full URLs in order to be processed properly during backup and restore.

        Show
        Helen Foster added a comment - Andrew, thanks for your report. Just wondering whether the broken links were relative URLs? As the FAQ http://docs.moodle.org/en/Backup_and_restore_FAQ#Why_are_certain_course_links_broken_in_a_restored_course.3F explains, any links need to be full URLs in order to be processed properly during backup and restore.
        Hide
        Andrew Tate added a comment -

        Hi Helen!

        They're full URLs, not relative.

        An example would be within our Practice Course 3 > Resources >Welcome with Joshua Rosenthal (http://lms.integrativenutrition.com/mod/resource/view.php?id=6723), the first audio link within "Online Recording - Welcome with Joshua Rosenthal"--the link for the audio file is: http://lms.integrativenutrition.com/file.php/26/Fundamentals_01.m4a.

        This is incorrect as the course ID within the URL is "26", which is for another course of ours (Fall10). Instead, the URL should contain the corresponding course's ID, 62. By updating the URL with the correct course ID manually, it corrects the link and students within the course are able to access it without issue.

        Show
        Andrew Tate added a comment - Hi Helen! They're full URLs, not relative. An example would be within our Practice Course 3 > Resources >Welcome with Joshua Rosenthal ( http://lms.integrativenutrition.com/mod/resource/view.php?id=6723 ), the first audio link within "Online Recording - Welcome with Joshua Rosenthal"--the link for the audio file is: http://lms.integrativenutrition.com/file.php/26/Fundamentals_01.m4a . This is incorrect as the course ID within the URL is "26", which is for another course of ours (Fall10). Instead, the URL should contain the corresponding course's ID, 62. By updating the URL with the correct course ID manually, it corrects the link and students within the course are able to access it without issue.
        Hide
        Andrea Bicciolo added a comment - - edited

        Hi Helen, I think this issue should be further investigated, we are experiencing similar problem. Please see MDL-29626

        Show
        Andrea Bicciolo added a comment - - edited Hi Helen, I think this issue should be further investigated, we are experiencing similar problem. Please see MDL-29626
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Just for the records, this (missing some conversions) is exactly the opposite than MDL-29626 (converting too much).

        Andrew, how do you get, in the moodle.xml file, that resource contents?

        1. http://lms.integrativenutrition.com/file.php/26/Fundamentals_01.m4a
        2. $@FILEPHP@$/Fundamentals_01.m4a

        And how is your $CFG->wwwroot defined in config.php ?

        TIA and ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Just for the records, this (missing some conversions) is exactly the opposite than MDL-29626 (converting too much). Andrew, how do you get, in the moodle.xml file, that resource contents? 1. http://lms.integrativenutrition.com/file.php/26/Fundamentals_01.m4a 2. $@FILEPHP@$/Fundamentals_01.m4a And how is your $CFG->wwwroot defined in config.php ? TIA and ciao
        Hide
        Michael de Raadt added a comment -

        Thanks for reporting this issue.

        We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

        If you believe that this issue is still relevant to current versions (2.3 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

        Michael d;

        4d6f6f646c6521

        Show
        Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.3 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; 4d6f6f646c6521
        Hide
        Michael de Raadt added a comment -

        I'm closing this issue as it has been inactive for over a year has been recorded as affecting versions that are no longer supported.

        If you still believe this is an issue in supported versions, please report a new issue.

        Show
        Michael de Raadt added a comment - I'm closing this issue as it has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you still believe this is an issue in supported versions, please report a new issue.

          People

          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: