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

Blackboard question import is broken

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.10, 2.1.7, 2.2.4, 2.3.1
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      IMPORTANT NOTICE

      All tests should be conducted with developper 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.

      WHAT ARE WE TESTING ?

      Go to Question Bank -> Import.
      This issue is about fixing the "Blackboard" question import file format.
      Don't be confused, this issue is just about the "Blackboard" file format.
      Clicking on the help icon for this format format should dispay : Blackboard format enables questions saved in the Blackboard version 5 "POOL" type export format to be imported.).
      Don't use the "Blackboard V6+" it's another "Blackboard" file format wich is broken and will be fixed in another traker issue.
      If you are somewhat lost with all these "Blackboard" formats, so are all 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 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. I suggest not to try the other formats as some are still broken at this point.

      PART TWO FIRST TEST FOR EACH QUESTION TYPE

      Try to import the sample_blackboard.dat file attached to the present tracker issue (MDL-34738) using the "Blackboard" 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).
      These are the same questions that are 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.
      The matching question is interesting because this type of question was never imported correctly, even in Moodle 1.9. You should get 3 subquestions (cat, frog, newt) and 3 choices (mammal, insect, amphibian) of course insect is a distractor and frog and newt are both amphibians. These are the parts that were not working previously.
      This part of the test will test that MDL-16479 (marked as duplicate) is fixed.

      PART THREE TEST WITH A REAL FILE SUBMITTED BY USER

      Try to import the res00000.dat file attached by Matt Cambell to tracker issue MDL-16479 (it contains 40 questions and should import cleanly).
      Specially look at the question "Match the following descriptions with the appropriate bone structure." and verify it include 6 subquestions and 6 choices. Periosteum and Medullary cavity are distractors, Diaphysis and Epiphyses are used 2 times each (but I really don't know what all this means )

      PART FOUR OTHER FILE SUBMITTED BY USER

      Go to tracker issue MDL-25492 and download the fmm4k0000.dat file 81kb uploaded January 27th 2011
      Try to import this file file using the "Blackboard" file format. Verify no warnings are displayed during import.
      This file should import 80 questions of various types on something like "marketing?" You are not required to test that each question can be edited and previewed correctly but a few one would be appreciated.

      PART FIVE : NO IMAGE !!

      Go to same tracker issue MDL-25492 and download the res00000.dat file 21kb uploaded December 02nd 2010.
      This file should import 15 questions about "numbers".
      These questions include ref to images.
      Open some of these questions for editing. You should see broken images. This is the expected result.
      We can't do anything to correct this problem because the poster of the file has not included these images. So you should consider the test as passed even with these broken images.
      But you should no see any oter problem and except the broken images these questions should work without any problem.

      PART SIX : TEST IMPORT OF A FILE NOT SUITABLE FOR THIS PLUGIN

      As I said most Moodle users are completely lost between all "Blackboard" formats. So we will now try to import a file of another format.
      Try importing the res00001.dat attached to the present issue (MDL-34738) using the "Blackboard" file format.
      You should get an error message "There are no questions in the import file" wich is quite normal as this file is of another Blackboard format (it's not a "POOL" file !) so if you get this error message, please consider this test as passed.

      At this point you should be as convinced as I am that the Blackboard format is no more broken (wich of course don't means it is bug free !).
      If not, ask for more sample files

      Show
      IMPORTANT NOTICE All tests should be conducted with developper 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. WHAT ARE WE TESTING ? Go to Question Bank -> Import. This issue is about fixing the "Blackboard" question import file format. Don't be confused, this issue is just about the "Blackboard" file format. Clicking on the help icon for this format format should dispay : Blackboard format enables questions saved in the Blackboard version 5 "POOL" type export format to be imported.). Don't use the "Blackboard V6+" it's another "Blackboard" file format wich is broken and will be fixed in another traker issue. If you are somewhat lost with all these "Blackboard" formats, so are all 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 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. I suggest not to try the other formats as some are still broken at this point. PART TWO FIRST TEST FOR EACH QUESTION TYPE Try to import the sample_blackboard.dat file attached to the present tracker issue ( MDL-34738 ) using the "Blackboard" 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). These are the same questions that are 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. The matching question is interesting because this type of question was never imported correctly, even in Moodle 1.9. You should get 3 subquestions (cat, frog, newt) and 3 choices (mammal, insect, amphibian) of course insect is a distractor and frog and newt are both amphibians. These are the parts that were not working previously. This part of the test will test that MDL-16479 (marked as duplicate) is fixed. PART THREE TEST WITH A REAL FILE SUBMITTED BY USER Try to import the res00000.dat file attached by Matt Cambell to tracker issue MDL-16479 (it contains 40 questions and should import cleanly). Specially look at the question "Match the following descriptions with the appropriate bone structure." and verify it include 6 subquestions and 6 choices. Periosteum and Medullary cavity are distractors, Diaphysis and Epiphyses are used 2 times each (but I really don't know what all this means ) PART FOUR OTHER FILE SUBMITTED BY USER Go to tracker issue MDL-25492 and download the fmm4k0000.dat file 81kb uploaded January 27th 2011 Try to import this file file using the "Blackboard" file format. Verify no warnings are displayed during import. This file should import 80 questions of various types on something like "marketing?" You are not required to test that each question can be edited and previewed correctly but a few one would be appreciated. PART FIVE : NO IMAGE !! Go to same tracker issue MDL-25492 and download the res00000.dat file 21kb uploaded December 02nd 2010. This file should import 15 questions about "numbers". These questions include ref to images. Open some of these questions for editing. You should see broken images. This is the expected result. We can't do anything to correct this problem because the poster of the file has not included these images. So you should consider the test as passed even with these broken images. But you should no see any oter problem and except the broken images these questions should work without any problem. PART SIX : TEST IMPORT OF A FILE NOT SUITABLE FOR THIS PLUGIN As I said most Moodle users are completely lost between all "Blackboard" formats. So we will now try to import a file of another format. Try importing the res00001.dat attached to the present issue ( MDL-34738 ) using the "Blackboard" file format. You should get an error message "There are no questions in the import file" wich is quite normal as this file is of another Blackboard format (it's not a "POOL" file !) so if you get this error message, please consider this test as passed. At this point you should be as convinced as I am that the Blackboard format is no more broken (wich of course don't means it is bug free !). If not, ask for more sample files
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:

      Description

      The blackboard format in question/format/blackboard is broken since Moodle 2.0 because of the changes made in the files API.
      This issue is different from MDL-25492 wich deals with the "Blackboard V6+" format in question/format/blackboard_six, but I understand that with so many "Blackboard" formats people are completely lost .
      As the question/format/blackboard format is a lot simpler it seems logical to first tackle this one before doing the hardest one.
      While I was working on it I discovered that import of matching questions was not working in all cases, so I reworked it.
      So the proposed file includes :

      • fixes to repair the format for all question types
      • reworked import of matching questions that I think works in all cases
      • coding style fixes, the codechecker still reports 15 warnings about too long lines that I didn't bother to fix (in fact I don't really know the rules to break lines !)
        I have included phpunit tests of truefalse, multichoice single and multi, and matching imports. The test of matching import was really needed to see if my new code was working and if I didn't broke something, but while I was writing tests I also included questions types for wich I had sample files (truefalse and multichoice single and multi). I started from real examples files and changed the questions to standard ones.
        Unfortunately I don't have sample of essay and fill in the blank questions in blackboard form, so I was not able to include them in tests. Of course I can do some "reverseengineering" of the format's code and create fake examples but that don't seems to me a very good proof that the code is working .
        I also included the xml file used for the tests in question/format/blackboard/test/fixtures/ so that for instance it is possible to use this file to test import in Moodle 1.9 and see that the matching question "Classify the animals." is not imported correctly in Moodle 1.9, contrary to my reworked version.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  2 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

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