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

Blackboard V6+ question import is broken

    Details

    • Database:
      MySQL
    • Testing Instructions:
      Hide

      IMPORTANT NOTICE

      This needs to be tested in all target branches
      All tests should be conducted with developer debugging set to enabled to verify that no error or warning is displayed during imports.
      This is especially important because even when it was working in Moodle 1.9 this import format produced a lot of notices when importing some files.
      Purge all caches, to force lang string renewal.

      WHAT ARE WE TESTING ?

      Go to Question Bank -> Import.
      This issue is about fixing the "Blackboard V6+" question import file format.
      Don't be confused, this issue is just about the "Blackboard V6+" file format and not the "Blackboard" file format.
      Clicking on the help icon for this format format should display : Blackboard V6+ format enables questions saved in all Blackboard export formats to be imported via a dat or zip file. For zip files, images import is supported.
      But in fact we are not only fixing this format which was broken since Moodle 2.0, we are also extending it so that it is able to import all types of "Blackboard" files.
      So once this is integrated, it could be made the only Blackboard question import format available in the question bank.
      This will be a lot easier for Moodle users.

      FIRST PART : VERIFY I DIDN'T BREAK OTHER AREAS

      The first thing to test is that nothing is broken in questions import/export as this change is not limited to the Blackboard V6+ format code.
      So try to import and export various questions using both "Moodle XML format" and "Gift format" file formats to ensure all is working as before.
      In each part I give in the title the type of file being imported, but this information is only interesting for me, to classify the example files. The import procedure is exactly the same for all types : just select the file format "Blackboard V6+" file format and upload the file. No difference.

      PART TWO TEST IMPORT OF AN "ASSESSEMENT QTI" .DAT FILE

      Try to import the question/format/blackboard_six/tests/fixtures/sample_blackboard_qti.dat file, using the "Blackboard V6+" file format.
      The import should not produce any warning and cleanly import 6 questions (1 essay, 1 multichoice single answer, 1 multichoice multianswer, 1 fill in the blank (shortanswer), 1 true/false and 1 matching).
      This is the same file that is used in phpunit tests.
      Test that each of these 6 questions is working, that you can edit or preview it without any warning or problem.
      In the matching question, verify that you get get 3 subquestions (cat, frog, newt) and 3 choices (mammal, insect, amphibian). Opening it for editing you should see 4 subquestions one of them with empty question and insect as answer.

      PART THREE TEST IMPORT OF A "QUESTION POOL" .DAT FILE

      Try to import the question/format/blackboard_six/tests/fixtures/sample_blackboard_pool.dat file, using the "Blackboard V6+" file format.
      The import should not produce any warning and cleanly import 6 questions (1 essay, 1 multichoice single answer, 1 multichoice multianswer, 1 fill in the blank (shortanswer), 1 true/false and 1 matching).
      This is the same file that is used in phpunit tests.
      Test that each of these 6 questions is working, that you can edit or preview it without any warning or problem.
      In the matching question, verify that you get get 3 subquestions (cat, frog, newt) and 3 choices (mammal, insect, amphibian). Opening it for editing you should see 4 subquestions one of them with empty question and insect as answer.

      PART FOUR TEST RECODING OF ENTITIES

      Download the apostrophe.zip file attached to this issue (I don't remember where I got it but it's a user file). Try to import this file file using the "Blackboard V6+" file format. Verify no warnings are displayed during import.
      This should import only 1 MCQ question. Open it for editing. Both in the title and question text you should see Mendel's classic pea and looking at the html source code of the question text you should not see an entity instead of the apostrophe between Mendel and s.

      PART FIVE TEST IMPORT OF AN "ASSESSEMENT QTI" .ZIP ARCHIVE WITH SOME IMAGES

      Download the testgen_images.ZIP file attached to the present issue
      Try to import this file file using the "Blackboard V6+" file format. Verify no warnings are displayed during import. You should also get no notification of missing image.
      This file should import 1 MCQ question with name : Describe this image. Verify that both in preview and in editing the question text and each choice display a book image (the right answer is not what you may think first).
      Looking at the question text the image src should be a valid draftfile url ending with

      ppg__questions with image1127111308__f1q1g1.jpg


      Looking at the choice with the image that looks the same, the img src should be a valid draftfile url ending with

      ppg__questions with image1127111308__f1q1g3.jpg

      PART SIX : TEST IMPORT OF A "QUESTION POOL" .ZIP ARCHIVE WITH SOME IMAGES

      Download the 6.4 greeks.zip file from http://moodle.tccsa.net/tccsa2/mod/resource/view.php?id=635 1072 ko. Try to import this file file using the "Blackboard V6+" file format. Verify no warnings are displayed during import. You should also get no notification of missing image.
      This file should import 12 MCQ questions. One of these questions has a name that display as * but is in fact * followed by a non breaking space entity. This name is wierd but is the expected result as we don't want any image included in question's names.
      Preview this question, it should diplay an image with some text in the question's text (text in the image begin by atlas), verify it is working as expected, the right answer is Greeks.
      Open the same question for editing and look at the html source of the question text. The image src should be a valid draftfile url with

      ppg__examview__6-4-greeks__mc009-1.jpg

      as last part, alt should be just "mc009-1.jpg".
      Preview the question whose name start with "Ancients Greeks used myths about ..." and verify that for both correct and incorrect responses a clipart of Zeus is displayed. Open this question for editing and verify the draftfile url in combined feedback for any correct response ends with

      ppg__examview__6-4-greeks__mc010-1.jpg

      (this test is distinct from the one we did for question text because question text is a special case so we must ensure all is OK in both cases)
      Download the alg2_sequences_and_series_benchmark.zip file from http://moodle.org/pluginfile.php/134/mod_forum/attachment/621559/alg2_sequences_and_series_benchmark.zip . Try to import this file file using the "Blackboard V6+" file format. Verify no warnings are displayed during import. You should also get no notification of missing image.
      It should import 12 MCQ questions. Verify that 2 of these questions have names "imported question q8" and "imported question q12". Open these questions for editing and verify that their question text is just an img tag inside a <p> tag. This test that the code to set a default name when there is no plain text in question text is working and also the id of the question is correctly extracted from the file.
      Open the question "What is the fifth term of the expansion of ?" and verify that each of the 4 choices is just an image inside a <p> tag. For the answer that reads 420 x^4^, the image draftfile url should ends with

      ppg__examview__alg2_sec_and_series__mc003-5.jpg

      PART SEVEN : TEST IMPORT OF AN "UNDEPLOYED ASSESSEMENT QTI" .ZIP ARCHIVE

      This part is to verify that MDL-23893 is fixed (see forum http://moodle.org/mod/forum/discuss.php?d=155794, the sample file used come from this thread).
      Download the file L1Group.zip (this file is issued from this forum thread but I have attached it to the present issue for commodity) attached to the present issue and try to import it using the "Blackboard V6+" format.
      This should import 22 MCQ questions written in some oriental language. You are not required to do anything with these questions, the test is just to verify that they are imported because previously no questions were found in the archive.

      PART EIGHT TEST IMPORT OF AN "ASSESSEMENT QTI" ZIP ARCHIVE WITH MULTIPLE QUESTIONS RESSOURCES FILES IN IT

      This part is to verify that MDL-10314 is fixed, but I will use a rather big file to also test performance of the code. Be sure your Moodle server settings allow for enough memory and that the max execution time of php scripts is set to > 4 minutes before attempting this test.
      First try to download the file as it was uploaded by user : download David_0538753099_249380.zip file uploaded 27/Jan/11 8:59 AM 479 kB from the present issue. This big archive weight more than 10 Mo when unzipped.
      Try to import this file using the using the "Blackboard V6+" file format.
      You should get an error message : Error importing question Error while parsing the IMS manifest document Cannot read import file (or file is empty)
      This is the error message displayed to user but as you have debugging activated you should see that the problem is "Input is not proper UTF-8". This file contains invalid UTF-8 characters.
      Download the David_0538753099_249380_corrected.zip file. This is exactly the same archive but I have corrected the invalid UTF-8 characters problem.
      Try to import it using the "Blackboard V6+" import format. You should get 1950 questions if your server is able to swallow it.
      This test that now the import format is able to find all resource files in the archive. Previously only 145 questions were imported.

      Thanks a lot for all that testing. I will be more than happy if all is working as expected.

      Show
      IMPORTANT NOTICE This needs to be tested in all target branches All tests should be conducted with developer debugging set to enabled to verify that no error or warning is displayed during imports. This is especially important because even when it was working in Moodle 1.9 this import format produced a lot of notices when importing some files. Purge all caches, to force lang string renewal. WHAT ARE WE TESTING ? Go to Question Bank -> Import. This issue is about fixing the "Blackboard V6+" question import file format. Don't be confused, this issue is just about the "Blackboard V6+" file format and not the "Blackboard" file format. Clicking on the help icon for this format format should display : Blackboard V6+ format enables questions saved in all Blackboard export formats to be imported via a dat or zip file. For zip files, images import is supported. But in fact we are not only fixing this format which was broken since Moodle 2.0, we are also extending it so that it is able to import all types of "Blackboard" files. So once this is integrated, it could be made the only Blackboard question import format available in the question bank. This will be a lot easier for Moodle users. FIRST PART : VERIFY I DIDN'T BREAK OTHER AREAS The first thing to test is that nothing is broken in questions import/export as this change is not limited to the Blackboard V6+ format code. So try to import and export various questions using both "Moodle XML format" and "Gift format" file formats to ensure all is working as before. In each part I give in the title the type of file being imported, but this information is only interesting for me, to classify the example files. The import procedure is exactly the same for all types : just select the file format "Blackboard V6+" file format and upload the file. No difference. PART TWO TEST IMPORT OF AN "ASSESSEMENT QTI" .DAT FILE Try to import the question/format/blackboard_six/tests/fixtures/sample_blackboard_qti.dat file, using the "Blackboard V6+" file format. The import should not produce any warning and cleanly import 6 questions (1 essay, 1 multichoice single answer, 1 multichoice multianswer, 1 fill in the blank (shortanswer), 1 true/false and 1 matching). This is the same file that is used in phpunit tests. Test that each of these 6 questions is working, that you can edit or preview it without any warning or problem. In the matching question, verify that you get get 3 subquestions (cat, frog, newt) and 3 choices (mammal, insect, amphibian). Opening it for editing you should see 4 subquestions one of them with empty question and insect as answer. PART THREE TEST IMPORT OF A "QUESTION POOL" .DAT FILE Try to import the question/format/blackboard_six/tests/fixtures/sample_blackboard_pool.dat file, using the "Blackboard V6+" file format. The import should not produce any warning and cleanly import 6 questions (1 essay, 1 multichoice single answer, 1 multichoice multianswer, 1 fill in the blank (shortanswer), 1 true/false and 1 matching). This is the same file that is used in phpunit tests. Test that each of these 6 questions is working, that you can edit or preview it without any warning or problem. In the matching question, verify that you get get 3 subquestions (cat, frog, newt) and 3 choices (mammal, insect, amphibian). Opening it for editing you should see 4 subquestions one of them with empty question and insect as answer. PART FOUR TEST RECODING OF ENTITIES Download the apostrophe.zip file attached to this issue (I don't remember where I got it but it's a user file). Try to import this file file using the "Blackboard V6+" file format. Verify no warnings are displayed during import. This should import only 1 MCQ question. Open it for editing. Both in the title and question text you should see Mendel's classic pea and looking at the html source code of the question text you should not see an entity instead of the apostrophe between Mendel and s. PART FIVE TEST IMPORT OF AN "ASSESSEMENT QTI" .ZIP ARCHIVE WITH SOME IMAGES Download the testgen_images.ZIP file attached to the present issue Try to import this file file using the "Blackboard V6+" file format. Verify no warnings are displayed during import. You should also get no notification of missing image. This file should import 1 MCQ question with name : Describe this image. Verify that both in preview and in editing the question text and each choice display a book image (the right answer is not what you may think first). Looking at the question text the image src should be a valid draftfile url ending with ppg__questions with image1127111308__f1q1g1.jpg Looking at the choice with the image that looks the same, the img src should be a valid draftfile url ending with ppg__questions with image1127111308__f1q1g3.jpg PART SIX : TEST IMPORT OF A "QUESTION POOL" .ZIP ARCHIVE WITH SOME IMAGES Download the 6.4 greeks.zip file from http://moodle.tccsa.net/tccsa2/mod/resource/view.php?id=635 1072 ko. Try to import this file file using the "Blackboard V6+" file format. Verify no warnings are displayed during import. You should also get no notification of missing image. This file should import 12 MCQ questions. One of these questions has a name that display as * but is in fact * followed by a non breaking space entity. This name is wierd but is the expected result as we don't want any image included in question's names. Preview this question, it should diplay an image with some text in the question's text (text in the image begin by atlas), verify it is working as expected, the right answer is Greeks. Open the same question for editing and look at the html source of the question text. The image src should be a valid draftfile url with ppg__examview__6-4-greeks__mc009-1.jpg as last part, alt should be just "mc009-1.jpg". Preview the question whose name start with "Ancients Greeks used myths about ..." and verify that for both correct and incorrect responses a clipart of Zeus is displayed. Open this question for editing and verify the draftfile url in combined feedback for any correct response ends with ppg__examview__6-4-greeks__mc010-1.jpg (this test is distinct from the one we did for question text because question text is a special case so we must ensure all is OK in both cases) Download the alg2_sequences_and_series_benchmark.zip file from http://moodle.org/pluginfile.php/134/mod_forum/attachment/621559/alg2_sequences_and_series_benchmark.zip . Try to import this file file using the "Blackboard V6+" file format. Verify no warnings are displayed during import. You should also get no notification of missing image. It should import 12 MCQ questions. Verify that 2 of these questions have names "imported question q8" and "imported question q12". Open these questions for editing and verify that their question text is just an img tag inside a <p> tag. This test that the code to set a default name when there is no plain text in question text is working and also the id of the question is correctly extracted from the file. Open the question "What is the fifth term of the expansion of ?" and verify that each of the 4 choices is just an image inside a <p> tag. For the answer that reads 420 x^4^, the image draftfile url should ends with ppg__examview__alg2_sec_and_series__mc003-5.jpg PART SEVEN : TEST IMPORT OF AN "UNDEPLOYED ASSESSEMENT QTI" .ZIP ARCHIVE This part is to verify that MDL-23893 is fixed (see forum http://moodle.org/mod/forum/discuss.php?d=155794 , the sample file used come from this thread). Download the file L1Group.zip (this file is issued from this forum thread but I have attached it to the present issue for commodity) attached to the present issue and try to import it using the "Blackboard V6+" format. This should import 22 MCQ questions written in some oriental language. You are not required to do anything with these questions, the test is just to verify that they are imported because previously no questions were found in the archive. PART EIGHT TEST IMPORT OF AN "ASSESSEMENT QTI" ZIP ARCHIVE WITH MULTIPLE QUESTIONS RESSOURCES FILES IN IT This part is to verify that MDL-10314 is fixed, but I will use a rather big file to also test performance of the code. Be sure your Moodle server settings allow for enough memory and that the max execution time of php scripts is set to > 4 minutes before attempting this test. First try to download the file as it was uploaded by user : download David_0538753099_249380.zip file uploaded 27/Jan/11 8:59 AM 479 kB from the present issue. This big archive weight more than 10 Mo when unzipped. Try to import this file using the using the "Blackboard V6+" file format. You should get an error message : Error importing question Error while parsing the IMS manifest document Cannot read import file (or file is empty) This is the error message displayed to user but as you have debugging activated you should see that the problem is "Input is not proper UTF-8". This file contains invalid UTF-8 characters. Download the David_0538753099_249380_corrected.zip file. This is exactly the same archive but I have corrected the invalid UTF-8 characters problem. Try to import it using the "Blackboard V6+" import format. You should get 1950 questions if your server is able to swallow it. This test that now the import format is able to find all resource files in the archive. Previously only 145 questions were imported. Thanks a lot for all that testing. I will be more than happy if all is working as expected.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:

      Description

      I have recently upgraded to 2.0 and then 2.0+ (this weeks build). Ever since I upgraded I have not be able to import my quizzes from Examview -> Blackboard using the Blackboard 5 feature. The error that occurs is "Error writing to database". I am not concerned with the images at this time, just the quiz. I can work with the images later like have done in the past (1.9+).

        Gliffy Diagrams

          Attachments

          1. 6.4-greeks.zip
            1.05 MB
          2. adub_complex test.zip
            4 kB
          3. adub_question Import error.txt
            4 kB
          4. apostrophe.zip
            0.9 kB
          5. blackboard_six.zip
            10 kB
          6. blackboard_six.zip
            10 kB
          7. David_0538753099_249380_corrected.zip
            431 kB
          8. David_0538753099_249380.zip
            479 kB
          9. examview_bbsixplus.zip
            6 kB
          10. Examview_export_Blackboard 6.0-7.0.zip
            6 kB
          11. Examview_export_Blackboard 6.0-7.0.zip
            6 kB
          12. Examview_export_Blackboard 7.1.zip
            11 kB
          13. Examview_export_Blackboard 7.1.zip
            11 kB
          14. Examview_export_WebCT CE 4-6-Vista 3-4.zip
            12 kB
          15. Examview_export_WebCT CE 4-6-Vista 3-4.zip
            12 kB
          16. ExamviewFiles.zip
            4.58 MB
          17. fmm4k00001.dat
            81 kB
          18. L1Group.zip
            7 kB
          19. quiz_import_error.png
            quiz_import_error.png
            16 kB
          20. res00000.dat
            21 kB
          21. RTF Format questions.rtf
            74 kB
          22. RTF Format questions.rtf
            74 kB
          23. smurf.xml
            16 kB
          24. testgen_images.ZIP
            23 kB

            Issue Links

              Activity

                People

                • Votes:
                  47 Vote for this issue
                  Watchers:
                  25 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12