-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.4
When you import an Ordering type question to Moodle 4.4 using the GIFT format it throws the following error:
Exception - qtype_ordering::import_from_gift(): Argument #2 ($question) must be of type ?stdClass, bool given, called in [dirroot]/question/format.php on line 315
More information about this error
Debug info:
Error code: generalexceptionmessage×Dismiss this notification
Stack trace:
line 311 of /question/type/ordering/questiontype.php: TypeError thrown
line 315 of /question/format.php: call to qtype_ordering->import_from_gift()
line 291 of /question/format/gift/format.php: call to qformat_default->try_importing_using_qtypes()
line 734 of /question/format.php: call to qformat_gift->readquestion()
line 353 of /question/format.php: call to qformat_default->readquestions()
line 127 of /question/bank/importquestions/import.php: call to qformat_default->importprocess()
Steps to replicate:
Create a course
Go to the Question bank
Create an Ordering type question
Export the question bank in Gift format
delete the question
Import the freshly created GIFT format export
Fails
Works in other formats so Moodle XML in the question edit dropdown imports without issue.