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

Error importing QTI quizz in common caridge

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.6, 2.0, 2.2, 2.2.1, 2.2.2
    • Fix Version/s: 2.0.10, 2.3.11, 2.7.3
    • Component/s: Backup
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_23_STABLE, MOODLE_27_STABLE

      Description

      Importing this package in current version of Moodle throws a lot of errors.

      Notice: Undefined variable: type in /var/www/vhosts/test.moodle.org/html/imscc/backup/cc/entity.quiz.class.php on line 933
      Notice: Undefined variable: type in /var/www/vhosts/test.moodle.org/html/imscc/backup/cc/entity.quiz.class.php on line 935
      Notice: Undefined variable: type in /var/www/vhosts/test.moodle.org/html/imscc/backup/cc/entity.quiz.class.php on line 938
      Notice: Undefined variable: type in /var/www/vhosts/test.moodle.org/html/imscc/backup/cc/entity.quiz.class.php on line 941
      Notice: Undefined variable: type in /var/www/vhosts/test.moodle.org/html/imscc/backup/cc/entity.quiz.class.php on line 944
      Notice: Undefined variable: type in /var/www/vhosts/test.moodle.org/html/imscc/backup/cc/entity.quiz.class.php on line 947
      Notice: Undefined variable: type in /var/www/vhosts/test.moodle.org/html/imscc/backup/cc/entity.quiz.class.php on line 950

      Note:
      See attached package and list of error messages

        Gliffy Diagrams

          Attachments

          1. patch.txt
            0.8 kB
          2. Project1_quiz_with_metadata.zip
            1.91 MB
          3. Project1_quiz.zip
            2.89 MB
          4. TestVS Course restore.htm
            68 kB

            Activity

            Hide
            darko.miletic Darko Miletic added a comment -

            To understand this issue we need to understand how is common cartridge QTI detection implemented in Moodle. In the current implementation we use metadata for every quizz to determine the appropriate type. Like this:

            <itemmetadata>
            <qtimetadata>
            <qtimetadatafield>
            <fieldlabel>cc_profile</fieldlabel>
            <fieldentry>cc.multiple_choice.v0p1</fieldentry>
            </qtimetadatafield>
            </qtimetadata>
            </itemmetadata>

            Having these descriptos directly enable us to determine the type. We tried to create detection code for quizzes based only on their structure ignoring metadata but it turns out to be impossible task. Common cartridge supports 6 types of QTI quizzes - True / False, Multiple Choice , Multiple Response , EESAY, FIB and Pattern Match. Using structure detection we can only detect 100% sure Multiple response and Essay.

            The way to resolve this issue is to add metadata that identifies type of quizz.

            Show
            darko.miletic Darko Miletic added a comment - To understand this issue we need to understand how is common cartridge QTI detection implemented in Moodle. In the current implementation we use metadata for every quizz to determine the appropriate type. Like this: <itemmetadata> <qtimetadata> <qtimetadatafield> <fieldlabel>cc_profile</fieldlabel> <fieldentry>cc.multiple_choice.v0p1</fieldentry> </qtimetadatafield> </qtimetadata> </itemmetadata> Having these descriptos directly enable us to determine the type. We tried to create detection code for quizzes based only on their structure ignoring metadata but it turns out to be impossible task. Common cartridge supports 6 types of QTI quizzes - True / False, Multiple Choice , Multiple Response , EESAY, FIB and Pattern Match. Using structure detection we can only detect 100% sure Multiple response and Essay. The way to resolve this issue is to add metadata that identifies type of quizz.
            Hide
            darko.miletic Darko Miletic added a comment -

            Added patch file that fixes issue with importing quizz activities that have only one question.
            Added modified package originaly from microsoft that add's missing metadata for quizzes.

            Show
            darko.miletic Darko Miletic added a comment - Added patch file that fixes issue with importing quizz activities that have only one question. Added modified package originaly from microsoft that add's missing metadata for quizzes.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            applying....

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - applying....
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Patch applied both to 1.9 and HEAD.
            CVS update in test site executed.

            Everything should be in place now. Resolving this as fixed. Thanks!

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Patch applied both to 1.9 and HEAD. CVS update in test site executed. Everything should be in place now. Resolving this as fixed. Thanks! Ciao
            Hide
            darko.miletic Darko Miletic added a comment -

            I have scheduled conference call with Microsoft dev. team about this issue. We will see if this patch is enough to resolve the issue they have, and if not I will reopen it.

            Show
            darko.miletic Darko Miletic added a comment - I have scheduled conference call with Microsoft dev. team about this issue. We will see if this patch is enough to resolve the issue they have, and if not I will reopen it.
            Hide
            darko.miletic Darko Miletic added a comment -

            After the talk with people from Microsoft and Colin Smythe on behalf of IMS we concluded that the current implementation of CC import in Moodle does not process QTI assesments completely correct.

            There are two issues at stake here:

            1. <material> tags are not being completely processed. Right now only mattext is being used, while matimage, matvideo, mataudio and other rich content tags are simply ignored. This should be fixed.

            2. <flow_mat> tags are not correctly processed and thus no feedback present is being currently imported into Moodle. This also should be fixed.

            I am reopening the issue, and we will try to adress it as sonn as possible

            Show
            darko.miletic Darko Miletic added a comment - After the talk with people from Microsoft and Colin Smythe on behalf of IMS we concluded that the current implementation of CC import in Moodle does not process QTI assesments completely correct. There are two issues at stake here: 1. <material> tags are not being completely processed. Right now only mattext is being used, while matimage, matvideo, mataudio and other rich content tags are simply ignored. This should be fixed. 2. <flow_mat> tags are not correctly processed and thus no feedback present is being currently imported into Moodle. This also should be fixed. I am reopening the issue, and we will try to adress it as sonn as possible
            Hide
            darko.miletic Darko Miletic added a comment -

            Still applies

            Show
            darko.miletic Darko Miletic added a comment - Still applies
            Hide
            darko.miletic Darko Miletic added a comment -

            Applies only to CC 1.0, CC 1.1 and onward have different structures.

            Show
            darko.miletic Darko Miletic added a comment - Applies only to CC 1.0, CC 1.1 and onward have different structures.
            Hide
            darko.miletic Darko Miletic added a comment -

            Just closing this since it is already working

            Show
            darko.miletic Darko Miletic added a comment - Just closing this since it is already working

              People

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

                Dates

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