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

1.9 question with question.image pointing to a subfolder of course files will not import into 2.x

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.0.7, 2.1.4
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a subfolder under Files in 1.9.x and place an image into it
      2. Create a quiz and a question of any type that uses the image from subfolder.
      3. Export the quiz in 'moodle xml' format.
      4. Import exported xml file in 2.x and view.

      Show
      1. Create a subfolder under Files in 1.9.x and place an image into it 2. Create a quiz and a question of any type that uses the image from subfolder. 3. Export the quiz in 'moodle xml' format. 4. Import exported xml file in 2.x and view.
    • Workaround:
      Hide

      See format.php.patch in attachments for quick and dirty workaround for /var/www/moodle/question/format/xml/format.php

      PS. Patch was made against $release = '2.1.2+ (Build: 20111012)'; $version = 2011070102.02

      Show
      See format.php.patch in attachments for quick and dirty workaround for /var/www/moodle/question/format/xml/format.php PS. Patch was made against $release = '2.1.2+ (Build: 20111012)'; $version = 2011070102.02
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Exported ('moodle xml' format) questions from 1.9.x with images (those saved in subfolders of course files 'repo') is incorrectly importing into 2.x

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            timhunt Tim Hunt added a comment -

            Sorry, I did not mean to close this.

            Show
            timhunt Tim Hunt added a comment - Sorry, I did not mean to close this.
            Hide
            timhunt Tim Hunt added a comment -

            Thank you very much for submitting this bug report with a proposed fix.

            In the end, I implemented a slightly different fix which I think handles more edge cases betters.

            Show
            timhunt Tim Hunt added a comment - Thank you very much for submitting this bug report with a proposed fix. In the end, I implemented a slightly different fix which I think handles more edge cases betters.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Tim, this has been integrated now.

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Tim, this has been integrated now.
            Hide
            rwijaya Rossiani Wijaya added a comment -

            This is working great.

            Thanks for fixing this Tim.

            Test passed.

            Show
            rwijaya Rossiani Wijaya added a comment - This is working great. Thanks for fixing this Tim. Test passed.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Sent upstream! Just in time for Moodle 2.2rc1 (if related), yay!

            Closing and big thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Sent upstream! Just in time for Moodle 2.2rc1 (if related), yay! Closing and big thanks!

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jan/12