From 2569d3f073051e2c9da3b477ff98cdc4d6919f2b Mon Sep 17 00:00:00 2001 From: Nils Haagen Date: Fri, 15 Sep 2023 09:21:44 +0200 Subject: [PATCH] TA: QuestionList, add option to export/import --- Modules/Test/classes/class.ilObjTest.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Modules/Test/classes/class.ilObjTest.php b/Modules/Test/classes/class.ilObjTest.php index 5e400e701638..a610e7e33c36 100755 --- a/Modules/Test/classes/class.ilObjTest.php +++ b/Modules/Test/classes/class.ilObjTest.php @@ -3422,8 +3422,12 @@ public function fromXML(ilQTIAssessment $assessment) $result_summary_settings = $result_summary_settings->withPassDeletionAllowed((bool) $metadata["entry"]); break; case "show_summary": - $participant_functionality_settings = $participant_functionality_settings->withQuestionListMode((int) $metadata["entry"]); + $participant_functionality_settings = $participant_functionality_settings->withUsrPassOverviewMode((int) $metadata["entry"]); break; + case "question_list": + $participant_functionality_settings = $participant_functionality_settings->withQuestionListEnabled((bool) $metadata["entry"]); + break; + case "reporting_date": $result_summary_settings = $result_summary_settings->withReportingDate( $metadata['ReportingDate'] !== null ? @@ -3861,6 +3865,11 @@ public function toXML(): string $a_xml_writer->xmlElement("fieldentry", null, sprintf("%d", $this->getScoreReporting())); $a_xml_writer->xmlEndTag("qtimetadatafield"); + $a_xml_writer->xmlStartTag("qtimetadatafield"); + $a_xml_writer->xmlElement("fieldlabel", null, "question_list"); + $a_xml_writer->xmlElement("fieldentry", null, sprintf("%d", $main_settings->getParticipantFunctionalitySettings()->getQuestionListEnabled())); + $a_xml_writer->xmlEndTag("qtimetadatafield"); + $a_xml_writer->xmlStartTag("qtimetadatafield"); $a_xml_writer->xmlElement("fieldlabel", null, "solution_details"); $a_xml_writer->xmlElement("fieldentry", null, (int) $this->getShowSolutionDetails());