diff --git a/Modules/Survey/classes/class.ilObjSurvey.php b/Modules/Survey/classes/class.ilObjSurvey.php index a754713fdf3e..ee18f469a522 100755 --- a/Modules/Survey/classes/class.ilObjSurvey.php +++ b/Modules/Survey/classes/class.ilObjSurvey.php @@ -3390,7 +3390,8 @@ public function toXML() $attribs = array("id" => $question_array[0]["question_id"]); $attribs = array( "showQuestiontext" => $question_array[0]["questionblock_show_questiontext"], - "showBlocktitle" => $question_array[0]["questionblock_show_blocktitle"] + "showBlocktitle" => $question_array[0]["questionblock_show_blocktitle"], + "compressView" => $question_array[0]["questionblock_compress_view"] ); $a_xml_writer->xmlStartTag("questionblock", $attribs); if (strlen($question_array[0]["questionblock_title"])) { diff --git a/Services/Survey/classes/class.SurveyImportParser.php b/Services/Survey/classes/class.SurveyImportParser.php index b7ec8a7f7969..fcce661a702d 100755 --- a/Services/Survey/classes/class.SurveyImportParser.php +++ b/Services/Survey/classes/class.SurveyImportParser.php @@ -9,6 +9,9 @@ */ class SurveyImportParser extends ilSaxParser { + protected int $showQuestiontext; + protected int $showBlocktitle; + protected int $compressView; public $path; public $depth; public $activequestion; @@ -89,6 +92,8 @@ public function __construct($a_spl_id, $a_xml_file = '', $spl_exists = false, $a $this->questionblocks = array(); $this->questionblock = array(); $this->showQuestiontext = 1; + $this->showBlocktitle = 0; + $this->compressView = 0; $this->questionblocktitle = ""; $this->mapping = $a_mapping; } @@ -179,11 +184,19 @@ public function handlerBeginTag($a_xml_parser, $a_name, $a_attribs) $this->questionblock = array(); $this->questionblocktitle = ""; $this->showQuestiontext = 1; + $this->showBlocktitle = 0; + $this->compressView = 0; foreach ($a_attribs as $attrib => $value) { switch ($attrib) { case "showQuestiontext": $this->showQuestiontext = $value; break; + case "showBlocktitle": + $this->showBlocktitle = $value; + break; + case "compressView": + $this->compressView = $value; + break; } } break; @@ -411,7 +424,13 @@ public function handlerEndTag($a_xml_parser, $a_name) foreach ($questionblock as $question_id) { array_push($qblock, $this->questions[$question_id]); } - $this->survey->createQuestionblock($title, $this->showQuestiontext, false, $qblock); + $this->survey->createQuestionblock( + $title, + $this->showQuestiontext, + $this->showBlocktitle, + $qblock, + $this->compressView + ); } }