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

Links to some 1.9 resource types break after upgrade to 2.2 followed by backup and restore

    Details

    • Testing Instructions:
      Hide

      Prerequisites

      You will need the following:

      • A 1.9 installation.
        • A course in your 1.9 installation.
      • Access to the database.
      • Patience.

      Preparation

      1. In a course in your 1.9 installation, create one each of the following:
        • A web page.
        • A text page.
        • A url.
        • A directory with files in it.
      2. Next create a new web page and add links to each of the resources that are mentioned above. (http://yourmoodleinstance.com/mod/resource/view.php?id=x)
      3. Also create links to each of the resources, but use the resource id instead of the cmid. You may have to load up the mdl_resource table and look up the ID for each resource. Your URL should end up looking like: http://yourmoodleinstance.com/mod/resource/view.php?r=x.
      4. Upgrade your installation to 2.2

      Testing

      1. Go to the course that has these resources and create a backup of the course.
      2. restore the back up on master (or some other version).
      3. Go to the website that you created with the links to the other resources and click on each one.
      4. Ensure that the links redirect to the correct page and that no errors are displayed.

      Tedium

      1. Run through the instructions again, but this time upgrade to 2.2 and then immediately to the fix versions (possibly 2.3, 2.4, 2.5 and master) and do a backup of the course, restore, etc.
      Show
      Prerequisites You will need the following: A 1.9 installation. A course in your 1.9 installation. Access to the database. Patience. Preparation In a course in your 1.9 installation, create one each of the following: A web page. A text page. A url. A directory with files in it. Next create a new web page and add links to each of the resources that are mentioned above. ( http://yourmoodleinstance.com/mod/resource/view.php?id=x ) Also create links to each of the resources, but use the resource id instead of the cmid. You may have to load up the mdl_resource table and look up the ID for each resource. Your URL should end up looking like: http://yourmoodleinstance.com/mod/resource/view.php?r=x . Upgrade your installation to 2.2 Testing Go to the course that has these resources and create a backup of the course. restore the back up on master (or some other version). Go to the website that you created with the links to the other resources and click on each one. Ensure that the links redirect to the correct page and that no errors are displayed. Tedium Run through the instructions again, but this time upgrade to 2.2 and then immediately to the fix versions (possibly 2.3, 2.4, 2.5 and master) and do a backup of the course, restore, etc.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-32862-master
    • Story Points (Obsolete):
      13
    • Sprint:
      BACKEND Sprint 4

      Description

      Steps to reproduce:

      1. Create a Moodle 1.9 course with a resource of the following type: URL, text page, web page, or directory
      2. In a topic of the course (or other wysiwyg-editable text in the course), create a link to your resource
      3. Upgrade your Moodle instance to Moodle 2.2
      4. At this point, you'll find that the link still works. It will point to mod/resource/view.php but will redirect to the correct Moodle 2.2 URL such as mod/page/view.php
      5. Create a backup file of the course
      6. Restore the backup file into a new course

      Result: The link in the restored course will not work. It will point to mod/resource/view.php, but now the page will show you the error message "Invalid course module ID".

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  12 Vote for this issue
                  Watchers:
                  20 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Nov/13