Skip to content

Commit

Permalink
Dev Updated queXMLPDF class to version 1.3.2
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@9500 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
adamzammit committed Nov 18, 2010
1 parent 5a4a5b0 commit 8b98ee4
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions admin/classes/quexml/quexmlpdf.php
Expand Up @@ -220,7 +220,7 @@ class queXMLPDF extends TCPDF {
* @var string Defaults to 0.1.
* @since 2010-09-20
*/
protected $singleResponseBoxBorder = 0.1;
protected $singleResponseBoxBorder = 0.15;

/**
* Length of the "eye guide" for a vertical response box
Expand Down Expand Up @@ -281,10 +281,10 @@ class queXMLPDF extends TCPDF {
/**
* The border width of a text resposne box
*
* @var mixed Defaults to 0.1.
* @var mixed Defaults to 0.15. Any less than this may produce printing problems
* @since 2010-09-20
*/
protected $textResponseBorder = 0.1;
protected $textResponseBorder = 0.15;

/**
* The height of a text response box
Expand Down Expand Up @@ -500,7 +500,7 @@ class queXMLPDF extends TCPDF {
* @var mixed Defaults to 5.
* @since 2010-10-29
*/
protected $questionnaireInfoMargin = 5;
protected $questionnaireInfoMargin = 20;

/**
* Height of a response label
Expand Down Expand Up @@ -1074,11 +1074,12 @@ public function createqueXML($quexml)
{
$sqtmp = array();
foreach ($sq->text as $ttmp)
{
if (!isset($sqtmp['text']))
$sqtmp['text'] = "";
{
if (!isset($sqtmp['text']))
$sqtmp['text'] = "";

$sqtmp['text'] .= $ttmp;
}
}
$sqtmp['varname'] = $sq['varName'];
$rstmp['subquestions'][] = $sqtmp;
}
Expand Down Expand Up @@ -1584,19 +1585,31 @@ protected function drawCells($cells)
{
//draw text cells
if ($cells == 1) //only
$border = array('LTRB' => array('width' => $this->textResponseBorder, 'dash' => 0));
$border = array('LTR' => array('width' => $this->textResponseBorder, 'dash' => 0), 'B' => array('width' => ($this->textResponseBorder * 2), 'dash' => 0));
else if ($j == 0) //first
$border = array('LTB' => array('width' => $this->textResponseBorder, 'dash' => 0), 'R' => array('width' => $this->textResponseBorder, 'dash' => 1));
$border = array('LT' => array('width' => $this->textResponseBorder, 'dash' => 0), 'R' => array('width' => $this->textResponseBorder, 'dash' => 1), 'B' => array('width' => ($this->textResponseBorder * 2), 'dash' => 0));
else if (($j + 1) == $cells) //last
$border = array('TRB' => array('width' => $this->textResponseBorder, 'dash' => 0));
{
$border = array('TR' => array('width' => $this->textResponseBorder, 'dash' => 0), 'B' => array('width' => ($this->textResponseBorder * 2), 'dash' => 0));

//add a border gap
$this->SetX($this->GetX() + ($this->textResponseBorder),false);
}
else //middle
$border = array('TB' => array('width' => $this->textResponseBorder, 'dash' => 0), 'R' => array('width' => $this->textResponseBorder, 'dash' => 1));
{
$border = array('T' => array('width' => $this->textResponseBorder, 'dash' => 0), 'R' => array('width' => $this->textResponseBorder, 'dash' => 1), 'B' => array('width' => ($this->textResponseBorder * 2), 'dash' => 0));
//add a border gap
$this->SetX($this->GetX() + ($this->textResponseBorder),false);
}

//Add the box to the layout scheme
$this->addBox($this->GetX(),$this->GetY(),$this->GetX() + $this->textResponseWidth,$this->GetY() + $this->textResponseHeight);
//Draw the box
$this->Cell($this->textResponseWidth,$this->textResponseHeight,'',$border,0,'',true,'',0,false,'T','C');
}

//add some spacing for the bottom border
//$this->SetY(($this->GetY() + ($this->textResponseBorder * 2)),false);
}

/**
Expand Down

0 comments on commit 8b98ee4

Please sign in to comment.