Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-19421

Dependencies and Activity Links do not restore correctly in backup

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3, 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Backup, Lesson
    • Labels:
      None
    • Environment:
      Also replicated on Moodle 2.2.1 from self to self
    • Database:
      Any
    • Testing Instructions:
      Hide

      Setup for testing

      In a course, turn editing on and:

      • Create a new lesson
      • Create a second new lesson
        • Toggle the 'Show Advanced' button
        • Under the 'Dependent on' section choose the first lesson
        • Under the 'Link to an Activity' option choose the 'forum - News forum' (or some other activity you have)

      You may like to confirm that the settings are correct in the database with a query like:

      select id, course, name, activitylink, dependency from mdl_lesson order by id asc;
      

      Functionality testing

      Lesson duplication

      • Duplicate the second lesson using the 'x2' button and click through
      • Edit the new lesson
        • Confirm that the 'Dependent on' reports that the lesson is dependent on the first lesson
        • Confirm that the 'Link to an Activity' option points to the 'forum - News forum'

      Lesson backup/restore within the same course

      • Select the lesson
      • Back up just the lesson
      • Restore the lesson
        • Confirm that the 'Dependent on' reports that the lesson is dependent on the first lesson
        • Confirm that the 'Link to an Activity' option points to the 'forum - News forum'

      Lesson backup/restore from coursea to courseb

      • Select the lesson
      • Back up just the lesson
      • Restore the lesson to a different course
        • Confirm that the 'Dependent on' lesson link is not set
        • Confirm that the 'Link to an Activity' option is not set

      Full course backup/restore

      • Back up the entire course
      • Restore the course
        • Confirm that the 'Dependent on' section is correct for each of the lessons
        • Confirm that the 'Link to an Activity' option points to the 'forum - News forum'
      Show
      Setup for testing In a course, turn editing on and: Create a new lesson Create a second new lesson Toggle the 'Show Advanced' button Under the 'Dependent on' section choose the first lesson Under the 'Link to an Activity' option choose the 'forum - News forum' (or some other activity you have) You may like to confirm that the settings are correct in the database with a query like: select id, course, name, activitylink, dependency from mdl_lesson order by id asc; Functionality testing Lesson duplication Duplicate the second lesson using the 'x2' button and click through Edit the new lesson Confirm that the 'Dependent on' reports that the lesson is dependent on the first lesson Confirm that the 'Link to an Activity' option points to the 'forum - News forum' Lesson backup/restore within the same course Select the lesson Back up just the lesson Restore the lesson Confirm that the 'Dependent on' reports that the lesson is dependent on the first lesson Confirm that the 'Link to an Activity' option points to the 'forum - News forum' Lesson backup/restore from coursea to courseb Select the lesson Back up just the lesson Restore the lesson to a different course Confirm that the 'Dependent on' lesson link is not set Confirm that the 'Link to an Activity' option is not set Full course backup/restore Back up the entire course Restore the course Confirm that the 'Dependent on' section is correct for each of the lessons Confirm that the 'Link to an Activity' option points to the 'forum - News forum'
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-19421-master-3

      Description

      When restoring a lesson backup, the dependency information is not correctly re-mapped on the new data. As a result, it still points towards the original ID.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12