Details

    • Testing Instructions:
      Hide

      1. Download the attached GIFT format file
      2. As a teacher, navigate to the Questions page of a course, choose Import link from Settings
      3. Select GIFT as the import format, upload GIFT text file that you downloaded in step 1
      4. Click Import

      You should be shown that the questions are being imported properly, instead you see a message that the format of the file is not recognized.

      Show
      1. Download the attached GIFT format file 2. As a teacher, navigate to the Questions page of a course, choose Import link from Settings 3. Select GIFT as the import format, upload GIFT text file that you downloaded in step 1 4. Click Import You should be shown that the questions are being imported properly, instead you see a message that the format of the file is not recognized.
    • Workaround:
      Hide

      If you take out all of the comment lines (the ones that start with //) then the file will import fine.

      Show
      If you take out all of the comment lines (the ones that start with //) then the file will import fine.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      wip-MDL-33338-master

      Description

      A GIFT import file that uses comment lines will not be imported because the format is not recognized.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              ppichet Pierre Pichet added a comment -

              Although this work OK on Moodle 2.3dev (Build: 20120511) ?

              Show
              ppichet Pierre Pichet added a comment - Although this work OK on Moodle 2.3dev (Build: 20120511) ?
              Hide
              ppichet Pierre Pichet added a comment -

              BTW How do we get MOODLE_23_STABLE ?

              Show
              ppichet Pierre Pichet added a comment - BTW How do we get MOODLE_23_STABLE ?
              Hide
              ppichet Pierre Pichet added a comment - - edited

              Error on last master version.(20120522 on-demand release 2.3dev)
              The file picker has changed between the 11 may version and the bug appears in the loading process.

              Show
              ppichet Pierre Pichet added a comment - - edited Error on last master version.(20120522 on-demand release 2.3dev) The file picker has changed between the 11 may version and the bug appears in the loading process.
              Hide
              ppichet Pierre Pichet added a comment -

              More precisely
              Invalid JSON string
              Fatal error: Class 'finfo' not found in D:\moodle2\server\moodle\moodle_v\lib\filestorage\file_storage.php on line 1805

              I let experts in this filestorage code proceed further

              Show
              ppichet Pierre Pichet added a comment - More precisely Invalid JSON string Fatal error: Class 'finfo' not found in D:\moodle2\server\moodle\moodle_v\lib\filestorage\file_storage.php on line 1805 I let experts in this filestorage code proceed further
              Hide
              salvetore Michael de Raadt added a comment -

              When I replicated this I know longer saw the JSON error. I believe this has been fixed by the linked issue.

              I did get a file error though. I think the file is not being recognised correctly because of the // at the start of the file.

              The type of the file you selected (document/unknown) does not match the type expected by this import format (text/plain).

              If the mime type is unknown (cannot be determined correctly), we should not fail the import. I suspect this will happen a lot.

              Show
              salvetore Michael de Raadt added a comment - When I replicated this I know longer saw the JSON error. I believe this has been fixed by the linked issue. I did get a file error though. I think the file is not being recognised correctly because of the // at the start of the file. The type of the file you selected (document/unknown) does not match the type expected by this import format (text/plain). If the mime type is unknown (cannot be determined correctly), we should not fail the import. I suspect this will happen a lot.
              Hide
              ppichet Pierre Pichet added a comment -

              This could mean that the code checking the format needs to be improved
              or as a temporary patch we should add some info in the GIFT import docs.

              Show
              ppichet Pierre Pichet added a comment - This could mean that the code checking the format needs to be improved or as a temporary patch we should add some info in the GIFT import docs.
              Hide
              ppichet Pierre Pichet added a comment -

              This is related to MDL-31901

              Show
              ppichet Pierre Pichet added a comment - This is related to MDL-31901
              Hide
              marina Marina Glancy added a comment -

              fixed mimetype recognition for uploaded files and also added a format validation in import form, so it does not fail with fatal error if one forgets to select the format.

              Show
              marina Marina Glancy added a comment - fixed mimetype recognition for uploaded files and also added a format validation in import form, so it does not fail with fatal error if one forgets to select the format.
              Hide
              poltawski Dan Poltawski added a comment -

              Hi Marina,

              It'd be great to have a unit test for this problem. I have done a lot of work expanding the filestorage unit tests in MDL-33326

              Show
              poltawski Dan Poltawski added a comment - Hi Marina, It'd be great to have a unit test for this problem. I have done a lot of work expanding the filestorage unit tests in MDL-33326
              Hide
              poltawski Dan Poltawski added a comment -

              Thanks Marina, i've integrated this now. As mentioned, i'd love to see a unit test added for this. As I spent a lot of time adding tests in MDL-33326

              Show
              poltawski Dan Poltawski added a comment - Thanks Marina, i've integrated this now. As mentioned, i'd love to see a unit test added for this. As I spent a lot of time adding tests in MDL-33326
              Hide
              abgreeve Adrian Greeve added a comment -

              I checked this in current master first and looked at the error generated.
              I then ran the same test in master integration.
              The file was imported with no trouble. No other problems encountered.
              Test passed

              Show
              abgreeve Adrian Greeve added a comment - I checked this in current master first and looked at the error generated. I then ran the same test in master integration. The file was imported with no trouble. No other problems encountered. Test passed
              Hide
              poltawski Dan Poltawski added a comment -

              Congratulations!

              Your work has made into the latest Moodle release!

              You are only authorised to celebrate after testing 15 Moodle 2.3 QA tests, thanks!

              Show
              poltawski Dan Poltawski added a comment - Congratulations! Your work has made into the latest Moodle release! You are only authorised to celebrate after testing 15 Moodle 2.3 QA tests, thanks!

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    25/Jun/12