From cc64834bdec12e07f8a30564eac17ec116b17a3a Mon Sep 17 00:00:00 2001 From: azammitdcarf Date: Thu, 30 Sep 2010 00:53:26 +0000 Subject: [PATCH] Upped memory limit of limesurvey to 128 Added multiplier for long text boxes and line colour specifier to queXMLPDF Will only export case_id and date fields in queXML when not outputting to a PDF --- .../admin/classes/quexml/quexmlpdf.php | 3 ++- .../admin/export_structure_quexml.php | 17 +++++++++-------- include/limesurvey/config-defaults.php | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/limesurvey/admin/classes/quexml/quexmlpdf.php b/include/limesurvey/admin/classes/quexml/quexmlpdf.php index db8a458d..103c324c 100644 --- a/include/limesurvey/admin/classes/quexml/quexmlpdf.php +++ b/include/limesurvey/admin/classes/quexml/quexmlpdf.php @@ -323,7 +323,7 @@ class queXMLPDF extends TCPDF { * @var mixed Defaults to 1. * @since 2010-09-20 */ - protected $longTextResponseHeightMultiplier = 1; + protected $longTextResponseHeightMultiplier = 0.0390625; /** * Width of a long text response box @@ -1280,6 +1280,7 @@ class queXMLPDF extends TCPDF { $this->SetX(($this->getPageWidth() - $this->getMainPageX() - $this->skipColumnWidth - $this->longTextResponseWidth),false); //Add to pay layout $this->addBox($this->GetX(),$this->GetY(),$this->GetX() + $this->longTextResponseWidth, $this->GetX() + $height); + $this->SetDrawColor($this->lineColour[0],$this->lineColour[1],$this->lineColour[2]); $this->Cell($this->longTextResponseWidth,$height,'',$border,0,'',true,'',0,false,'T','C'); $currentY = $currentY + $height; $this->SetY($currentY,false); diff --git a/include/limesurvey/admin/export_structure_quexml.php b/include/limesurvey/admin/export_structure_quexml.php index 23b87a89..779794ac 100644 --- a/include/limesurvey/admin/export_structure_quexml.php +++ b/include/limesurvey/admin/export_structure_quexml.php @@ -495,6 +495,12 @@ while ($Row = $QueryResult->FetchRow()) $questionnaire->append_child($section); } + +$dom->append_child($questionnaire); + + +if (!(isset($noheader) && $noheader == true)) +{ //Add caseid field $section = $dom->create_element("section"); @@ -522,13 +528,6 @@ while ($Row = $QueryResult->FetchRow()) $questionnaire->append_child($section); - -$dom->append_child($questionnaire); - -$quexml = $dom->dump_mem(true,'UTF-8'); - -if (!(isset($noheader) && $noheader == true)) -{ $fn = "survey_$surveyid.xml"; header("Content-Type: application/download"); header("Content-Disposition: attachment; filename=$fn"); @@ -537,7 +536,9 @@ if (!(isset($noheader) && $noheader == true)) Header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); // HTTP/1.0 - echo $quexml; + echo $dom->dump_mem(true,'UTF-8'); exit(); } + +$quexml = $dom->dump_mem(true,'UTF-8'); ?> diff --git a/include/limesurvey/config-defaults.php b/include/limesurvey/config-defaults.php index c33533c7..3673e42b 100644 --- a/include/limesurvey/config-defaults.php +++ b/include/limesurvey/config-defaults.php @@ -94,7 +94,7 @@ $debug = 0; // Set this to 1 if you are looking for errors. // LimeSurvey developers set this to 2 to circumvent the restriction to remove the installation directory or to change the password // If you set it to 3 then in addition PHP STRICT warnings will be shown -$memorylimit = '32M'; // This sets how much memory LimeSurvey can access. 16M is the minimum (M=mb) recommended. +$memorylimit = '128M'; // This sets how much memory LimeSurvey can access. 16M is the minimum (M=mb) recommended. $sessionlifetime = 3600; // How long until a survey session expires in seconds $showpopups = 1; // Show popup messages if mandatory or conditional questions have not been answered correctly.