Skip to content

Commit

Permalink
Fixed issue #4565: QUESTION_CODE is no longer displayed in question-b…
Browse files Browse the repository at this point in the history
…y-question or all-in-one survey mode

Fixed issue #4581: Typo's in dateformat variable in printablesurvey


git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@9116 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Sep 7, 2010
1 parent 7b916d2 commit 55dd802
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 32 deletions.
2 changes: 1 addition & 1 deletion admin/preview.php
Expand Up @@ -82,9 +82,9 @@ function noop_checkconditions(value, name, type)

$answer=$answers[0][1];
$help=$answers[0][2];
$questioncode=$answers[0][5];

$question = $answers[0][0];
$question['code']=$answers[0][5];
$question['class'] = question_class($qrows['type']);
$question['essentials'] = 'id="question'.$qrows['qid'].'"';
if ($qrows['mandatory'] == 'Y')
Expand Down
33 changes: 4 additions & 29 deletions admin/printablesurvey.php
Expand Up @@ -70,35 +70,10 @@ function try_debug($line)
}
if(isset($_POST['printableexport'])){$pdf->titleintopdf($surveyname,$surveydesc);}

switch($dateformattype)
{
case 1: $dformat = 'd.m.Y'; // dd.mm.yyyy
break;
case 2: $dformat = 'd-m-Y'; // dd-mm-yyyy
break;
case 5: $dformat = 'd/m/Y'; // dd/mm/yyyy
break;
case 3: $dformat = 'Y.m.d'; // yyyy.mm.dd
break;
case 7: $dformat = 'Y/m/d'; // yyyy/mm/dd
break;
case 6: $dbformat = 'Y-m-d'; // yyyy-mm-dd
break;
case 4: $dformat = 'j.n.Y'; // d.m.yyyy
break;
case 8: $dformat = 'j/n/y'; // d/m/yyyy
break;
case 12: $dbformat = 'j-n-Y'; // d-m-yyyy
break;
case 9: $dformat = 'm-d-Y'; // mm-dd-yyyy
break;
case 10: $dbformat = 'm.d.Y'; // mm.dd.yyyy
break;
case 11: $dbformat = 'm/d/Y'; // mm/dd/yyyy
break;
default: $dformat = 'Y-m-d'; // yyyy-mm-dd
break;
};

$dformat=getDateFormatData($dateformattype);
$dformat=$dformat['phpdate'];

$expirytimestamp = strtotime($surveyexpirydate);
$expirytimeofday_h = date('H',$expirytimestamp);
$expirytimeofday_m = date('i',$expirytimestamp);
Expand Down
2 changes: 0 additions & 2 deletions admin/templates.php
Expand Up @@ -510,12 +510,10 @@
,'input_error_class' => ''
);

// $questioncode="1a";
$answer="<ul><li><input type='radio' class='radiobtn' name='1' value='1' id='radio1' /><label class='answertext' for='radio1'>One</label></li><li><input type='radio' class='radiobtn' name='1' value='2' id='radio2' /><label class='answertext' for='radio2'>Two</label></li><li><input type='radio' class='radiobtn' name='1' value='3' id='radio3' /><label class='answertext' for='radio3'>Three</label></li></ul>\n";
$myoutput = array_merge($myoutput, doreplacement(sGetTemplatePath($templatename)."/question.pstpl"));

// $question='<span class="asterisk">*</span>'.$clang->gT("Please explain something in detail:");
// $questioncode="2";
$answer="<textarea class='textarea' rows='5' cols='40'>Some text in this answer</textarea>";
$question = array(
'all' => '<span class="asterisk">*</span>'.$clang->gT("Please explain something in detail:")
Expand Down

0 comments on commit 55dd802

Please sign in to comment.