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 Bug
    • Status: Closed
    • Priority: Major 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:
    • Rank:
      33173

      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

        Activity

        Hide
        Tim Hunt added a comment -

        Sorry, I did not mean to close this.

        Show
        Tim Hunt added a comment - Sorry, I did not mean to close this.
        Hide
        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
        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
        Sam Hemelryk added a comment -

        Thanks Tim, this has been integrated now.

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

        This is working great.

        Thanks for fixing this Tim.

        Test passed.

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

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

        Closing and big thanks!

        Show
        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: