MDL-81952 questions: Fix warning in export of multitype

This commit is contained in:
Stephan Robotta
2024-12-14 13:16:19 +01:00
parent a97ddeb2a2
commit 49a9803144
2 changed files with 48 additions and 1 deletions
+2 -1
View File
@@ -99,8 +99,9 @@ function get_questions_category(object $category, bool $noparent, bool $recurse
// Iterate through questions, getting stuff we need.
$qresults = [];
foreach($questions as $key => $question) {
foreach ($questions as $question) {
$question->export_process = $export;
$question->categoryobject = $category;
$qtype = question_bank::get_qtype($question->qtype, false);
if ($export && $qtype->name() === 'missingtype') {
// Unrecognised question type. Skip this question when exporting.