Details
-
Type:
Bug
-
Status:
Reopened
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.9.6, 2.0, 2.2, 2.2.1, 2.2.2
-
Fix Version/s: 2.0.8, 2.3, STABLE backlog
-
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
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
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.