From a2bebb8f3149e31c1d84eaa70d251355e970f638 Mon Sep 17 00:00:00 2001
From: Carsten Schmitz
\n"
-// . $clang->gT('Check any that apply').'';
-// $question_text['help'] = $clang->gT('Check any that apply');
-// }
-// else
-// {
-// if ($maxansw && $minansw)
-// {
-// $qtitle .= "
\n"
-// . sprintf($clang->gT("Check between %d and %d answers"), $minansw, $maxansw)."";
-// $question_text['help'] = sprintf($clang->gT("Check between %d and %d answers"), $minansw, $maxansw);
-// } elseif ($maxansw)
-// {
-// $qtitle .= "
\n"
-// . sprintf($clang->gT("Check at most %d answers"), $maxansw)."";
-// $question_text['help'] = sprintf($clang->gT("Check at most %d answers"), $maxansw);
-// } else
-// {
-// $qtitle .= "
\n"
-// . sprintf($clang->ngT("Check at least %d answer","Check at least %d answers",$minansw),$minansw)."";
-// $question_text['help'] = sprintf($clang->ngT("Check at least %d answer","Check at least %d answers",$minansw),$minansw);
-// }
-// }
- }
+ // if (!($maxansw || $minansw))
+ // {
+ // $qtitle .= "
\n"
+ // . $clang->gT('Check any that apply').'';
+ // $question_text['help'] = $clang->gT('Check any that apply');
+ // }
+ // else
+ // {
+ // if ($maxansw && $minansw)
+ // {
+ // $qtitle .= "
\n"
+ // . sprintf($clang->gT("Check between %d and %d answers"), $minansw, $maxansw)."";
+ // $question_text['help'] = sprintf($clang->gT("Check between %d and %d answers"), $minansw, $maxansw);
+ // } elseif ($maxansw)
+ // {
+ // $qtitle .= "
\n"
+ // . sprintf($clang->gT("Check at most %d answers"), $maxansw)."";
+ // $question_text['help'] = sprintf($clang->gT("Check at most %d answers"), $maxansw);
+ // } else
+ // {
+ // $qtitle .= "
\n"
+ // . sprintf($clang->ngT("Check at least %d answer","Check at least %d answers",$minansw),$minansw)."";
+ // $question_text['help'] = sprintf($clang->ngT("Check at least %d answer","Check at least %d answers",$minansw),$minansw);
+ // }
+ // }
+ }
break;
case 'I': //Language Question
@@ -212,34 +212,34 @@ function retrieveAnswers($ia)
$values=do_multiplechoice_withcomments($ia);
if (count($values[1]) > 1 && $aQuestionAttributes['hide_tip']==0)
{
-// $maxansw=trim($aQuestionAttributes["max_answers"]);
-// $minansw=trim($aQuestionAttributes["min_answers"]);
-// if (!($maxansw || $minansw))
-// {
-// $qtitle .= "
\n"
-// . $clang->gT('Check any that apply').'';
-// $question_text['help'] = $clang->gT('Check any that apply');
-// }
-// else
-// {
-// if ($maxansw && $minansw)
-// {
-// $qtitle .= "
\n"
-// . sprintf($clang->gT("Check between %d and %d answers"), $minansw, $maxansw)."";
-// $question_text['help'] = sprintf($clang->gT("Check between %d and %d answers"), $minansw, $maxansw);
-// } elseif ($maxansw)
-// {
-// $qtitle .= "
\n"
-// . sprintf($clang->gT("Check at most %d answers"), $maxansw)."";
-// $question_text['help'] = sprintf($clang->gT("Check at most %d answers"), $maxansw);
-// } else
-// {
-// $qtitle .= "
\n"
-// . sprintf($clang->gT("Check at least %d answers"), $minansw)."";
-// $question_text['help'] = sprintf($clang->gT("Check at least %d answers"), $minansw);
-// }
-// }
- }
+ // $maxansw=trim($aQuestionAttributes["max_answers"]);
+ // $minansw=trim($aQuestionAttributes["min_answers"]);
+ // if (!($maxansw || $minansw))
+ // {
+ // $qtitle .= "
\n"
+ // . $clang->gT('Check any that apply').'';
+ // $question_text['help'] = $clang->gT('Check any that apply');
+ // }
+ // else
+ // {
+ // if ($maxansw && $minansw)
+ // {
+ // $qtitle .= "
\n"
+ // . sprintf($clang->gT("Check between %d and %d answers"), $minansw, $maxansw)."";
+ // $question_text['help'] = sprintf($clang->gT("Check between %d and %d answers"), $minansw, $maxansw);
+ // } elseif ($maxansw)
+ // {
+ // $qtitle .= "
\n"
+ // . sprintf($clang->gT("Check at most %d answers"), $maxansw)."";
+ // $question_text['help'] = sprintf($clang->gT("Check at most %d answers"), $maxansw);
+ // } else
+ // {
+ // $qtitle .= "
\n"
+ // . sprintf($clang->gT("Check at least %d answers"), $minansw)."";
+ // $question_text['help'] = sprintf($clang->gT("Check at least %d answers"), $minansw);
+ // }
+ // }
+ }
break;
case '|': //File Upload
$values=do_file_upload($ia);
@@ -336,7 +336,7 @@ function retrieveAnswers($ia)
$qtitle .= $mandatory_msg;
$question_text['man_message'] = $mandatory_msg;
-// if (($_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['step'] != $_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['maxstep']) || ($_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['step'] == $_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['prevstep'])) {
+ // if (($_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['step'] != $_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['maxstep']) || ($_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['step'] == $_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['prevstep'])) {
if (!isset($aQuestionAttributes['hide_tip']) || $aQuestionAttributes['hide_tip']==0) {
$_vshow = true; // whether should initially be visible - TODO should also depend upon 'hidetip'?
}
@@ -429,18 +429,18 @@ function mandatory_message($ia)
$qinfo = LimeExpressionManager::GetQuestionStatus($ia[0]);
if ($qinfo['mandViolation']) {
return $qinfo['mandTip'];
- }
+ }
else {
return "";
- }
- }
+ }
+}
/**
- *
- * @param
'.$tip.'
';
-// }
-// else {
-// return $tip;
-// }
- }
+ // if (!$qinfo['valid']) {
+ // if (strlen($tip) == 0) {
+ // $help = $clang->gT('This question must be answered correctly');
+ // }
+ // else {
+ // $tip =' '.$tip.'';
+ // }
+ // return '
'.$tip.'
';
+ // }
+ // else {
+ // return $tip;
+ // }
+}
// TMSW Validation -> EM
function file_validation_message($ia)
@@ -595,14 +595,14 @@ function return_timer_script($aQuestionAttributes, $ia, $disable=null) {
$thissurvey['timercount']=1;
}
- if($thissurvey['format'] != "S")
+ if($thissurvey['format'] != "S")
+ {
+ if($thissurvey['format'] != "G")
{
- if($thissurvey['format'] != "G")
- {
- return "\n\n\n\n";
- //We don't do the timer in any format other than question-by-question
- }
+ return "\n\n\n\n";
+ //We don't do the timer in any format other than question-by-question
}
+ }
$time_limit=$aQuestionAttributes['time_limit'];
@@ -833,8 +833,8 @@ function countdown(questionid,timer,action,warning,warning2,warninghide,warning2
case 2: //Just move on, no warning
if(document.getElementById('movenextbtn') !== null) {
if(document.getElementById('movenextbtn').disabled==true) document.getElementById('movenextbtn').disabled=false;
- }
- if(document.getElementById('moveprevbtn') !== null) {
+ }
+ if(document.getElementById('moveprevbtn') !== null) {
if(document.getElementById('moveprevbtn').disabled==true && '$disable_prev' > 0) document.getElementById('moveprevbtn').disabled=false;
}
freezeFrame(disable);
@@ -849,8 +849,8 @@ function countdown(questionid,timer,action,warning,warning2,warninghide,warning2
document.getElementById(expireddisplay).style.display='';
if(document.getElementById('movenextbtn') !== null) {
if(document.getElementById('movenextbtn').disabled==true) document.getElementById('movenextbtn').disabled=false;
- }
- if(document.getElementById('moveprevbtn') !== null) {
+ }
+ if(document.getElementById('moveprevbtn') !== null) {
if(document.getElementById('moveprevbtn').disabled==true && '$disable_prev' > 0) document.getElementById('moveprevbtn').disabled=false;
}
freezeFrame(disable);
@@ -860,8 +860,8 @@ function countdown(questionid,timer,action,warning,warning2,warninghide,warning2
document.getElementById(expireddisplay).style.display='';
if(document.getElementById('movenextbtn') !== null) {
if(document.getElementById('movenextbtn').disabled==true) document.getElementById('movenextbtn').disabled=false;
- }
- if(document.getElementById('moveprevbtn') !== null) {
+ }
+ if(document.getElementById('moveprevbtn') !== null) {
if(document.getElementById('moveprevbtn').disabled==true && '$disable_prev' > 0) document.getElementById('moveprevbtn').disabled=false;
}
freezeFrame(disable);
@@ -889,21 +889,21 @@ function countdown(questionid,timer,action,warning,warning2,warninghide,warning2
}
function return_array_filter_strings($ia, $aQuestionAttributes, $thissurvey, $ansrow, $rowname, $trbc='', $valuename, $method="tbody", $class=null) {
- $htmltbody2 = "\n\n\t<$method id='javatbd$rowname'";
- $htmltbody2 .= ($class !== null) ? " class='$class'": "";
- if (isset($_SESSION['relevanceStatus'][$rowname]) && !$_SESSION['relevanceStatus'][$rowname])
- {
- $htmltbody2 .= " style='display: none'";
- }
- $htmltbody2 .= ">\n";
- $htmltbody2 .= ">\n";
- if($ia[4]=="1") {
- //This is an array dual scale question and we have to massage the tbidpslay rowname
- $hiddenfield = "\n";
- $hiddenfield .= "\n";
- } else {
- $hiddenfield = "\n";
- }
+ $htmltbody2 = "\n\n\t<$method id='javatbd$rowname'";
+ $htmltbody2 .= ($class !== null) ? " class='$class'": "";
+ if (isset($_SESSION['relevanceStatus'][$rowname]) && !$_SESSION['relevanceStatus'][$rowname])
+ {
+ $htmltbody2 .= " style='display: none'";
+ }
+ $htmltbody2 .= ">\n";
+ $htmltbody2 .= ">\n";
+ if($ia[4]=="1") {
+ //This is an array dual scale question and we have to massage the tbidpslay rowname
+ $hiddenfield = "\n";
+ $hiddenfield .= "\n";
+ } else {
+ $hiddenfield = "\n";
+ }
return array($htmltbody2, $hiddenfield);
}
@@ -1122,42 +1122,42 @@ function do_date($ia)
{
$i_date_selected = '';
}
- $answer .= ' \n";
+ $answer .= ' \n";
}
$answer .='';
break;
// Show month select box
case 'n':
case 'm': $answer .= ' ';
- break;
- // Show year select box
+ $answer .= ' ';
+ }
+ $answer .= ' ';
+ break;
+ // Show year select box
case 'Y': $answer .= ' ';
break;
- }
- }
+ }
+ }
$answer .= '
- gT('Date picker')."\" size=\"10\" name=\"{$ia[1]}\" id=\"answer{$ia[1]}\" value=\"$dateoutput\" maxlength=\"10\" onkeypress=\"return goodchars(event,'".$goodchars."')\" onchange=\"$checkconditionFunction(this.value, this.name, this.type)\" /> - - - + $answer ="
+ gT('Date picker')."\" size=\"10\" name=\"{$ia[1]}\" id=\"answer{$ia[1]}\" value=\"$dateoutput\" maxlength=\"10\" onkeypress=\"return goodchars(event,'".$goodchars."')\" onchange=\"$checkconditionFunction(this.value, this.name, this.type)\" /> + + + -
-- ".sprintf($clang->gT('Format: %s'),$dateformatdetails['dateformat'])."
"; + if (trim($aQuestionAttributes['hide_tip'])==1) { + $answer.="".sprintf($clang->gT('Format: %s'),$dateformatdetails['dateformat'])."
"; + } } $inputnames[]=$ia[1]; @@ -1328,7 +1328,7 @@ function do_list_dropdown($ia) { global $dropdownthreshold; - $clang=Yii::app()->lang; + $clang=Yii::app()->lang; if ($ia[8] == 'Y') { @@ -1419,9 +1419,9 @@ function do_list_dropdown($ia) } if ($prefixStyle == 1) { $_prefix = ++$_rowNum . ') '; - } + } $answer .= "\n"; - } + } } else { @@ -1498,7 +1498,7 @@ function do_list_dropdown($ia) } if ($prefixStyle == 1) { $_prefix = ++$_rowNum . ') '; - } + } $answer .= ' \n"; } @@ -1506,7 +1506,7 @@ function do_list_dropdown($ia) { if ($prefixStyle == 1) { $_prefix = ++$_rowNum . ') '; - } + } $answer .= '\n"; } $answer .= ' @@ -1522,7 +1522,7 @@ function do_list_dropdown($ia) } $sselect = '-