From a2bebb8f3149e31c1d84eaa70d251355e970f638 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Fri, 20 Jan 2012 13:52:18 +0000 Subject: [PATCH] New feature: Attribute hide_tip now available for date question git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12129 b72ed6b6-b9f8-46b5-92b4-906544132732 --- application/helpers/common_helper.php | 2 +- application/helpers/qanda_helper.php | 1180 ++++++++++++------------- 2 files changed, 591 insertions(+), 591 deletions(-) diff --git a/application/helpers/common_helper.php b/application/helpers/common_helper.php index f9548e0ad66..03e39ec7c2d 100644 --- a/application/helpers/common_helper.php +++ b/application/helpers/common_helper.php @@ -3309,7 +3309,7 @@ function questionAttributes($returnByName=false) // End Map Options $qattributes["hide_tip"]=array( - "types"=>"!KLMNOPRSWZ", + "types"=>"!DKLMNOPRSWZ", 'category'=>$clang->gT('Display'), 'sortorder'=>100, 'inputtype'=>'singleselect', diff --git a/application/helpers/qanda_helper.php b/application/helpers/qanda_helper.php index 0c64fa7ee06..0c9900b7f02 100644 --- a/application/helpers/qanda_helper.php +++ b/application/helpers/qanda_helper.php @@ -1,17 +1,17 @@ 0 && $thissurvey['shownoanswer'] != 'N') @@ -75,7 +75,7 @@ function retrieveAnswers($ia) global $thissurvey, $gl; //These are set by index.php //$clang = Yii::app()->lang; - $clang = Yii::app()->lang; + $clang = Yii::app()->lang; //DISPLAY $display = $ia[7]; @@ -171,32 +171,32 @@ function retrieveAnswers($ia) { $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->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 $ia - * @param $show - true if should initially be visible - * @return - */ +* +* @param $ia +* @param $show - true if should initially be visible +* @return +*/ function validation_message($ia,$show) { $qinfo = LimeExpressionManager::GetQuestionStatus($ia[0]); @@ -450,19 +450,19 @@ function validation_message($ia,$show) } $tip .= ">" . $qinfo['validTip'] . ""; 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; -// } - } + // 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 .= '

'; $answer .= ' - '; + '; } @@ -1235,7 +1235,7 @@ function do_date($ia) { if ($clang->langcode !== 'en') { - $js_header_includes[] = '/scripts/jquery/locale/jquery.ui.datepicker-'.$clang->langcode.'.js'; + $js_header_includes[] = '/scripts/jquery/locale/jquery.ui.datepicker-'.$clang->langcode.'.js'; } $css_header_includes[]= '/scripts/jquery/css/start/jquery-ui.css'; @@ -1269,16 +1269,16 @@ function do_date($ia) $goodchars = str_replace( array("m","d","y"), "", $dateformatdetails['jsdate']); $goodchars = "0123456789".$goodchars[0]; - $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 = '

- '; $answer = $sselect.$answer; @@ -1871,7 +1871,7 @@ function do_list_radio($ia) function do_listwithcomment($ia) { global $maxoptionsize, $dropdownthreshold, $thissurvey; - $clang=Yii::app()->lang; + $clang=Yii::app()->lang; if ($thissurvey['nokeyboard']=='Y') { @@ -2044,14 +2044,14 @@ function do_listwithcomment($ia) // TMSW TODO - Can remove DB query by passing in answer list from EM function do_ranking($ia) { - // note to self: this function needs to define: - // inputnames, answer, among others - global $thissurvey, $showpopups; + // note to self: this function needs to define: + // inputnames, answer, among others + global $thissurvey, $showpopups; - // the future string that goes into the answer segment of templates - $answer = ''; + // the future string that goes into the answer segment of templates + $answer = ''; - $clang=Yii::app()->lang; + $clang=Yii::app()->lang; $imageurl = Yii::app()->getConfig("imageurl"); if ($ia[8] == 'Y') @@ -2363,10 +2363,10 @@ function do_multiplechoice($ia) } // Check if the max_answers attribute is set -// $maxansw = 0; -// $callmaxanswscriptcheckbox = ''; -// $callmaxanswscriptother = ''; -// $maxanswscript = ''; + // $maxansw = 0; + // $callmaxanswscriptcheckbox = ''; + // $callmaxanswscriptother = ''; + // $maxanswscript = ''; $exclude_all_others_auto = trim($aQuestionAttributes["exclude_all_others_auto"]); @@ -2375,36 +2375,36 @@ function do_multiplechoice($ia) $autoArray[$ia[1]]['parent'] = $ia[1]; } -// if (((int)$aQuestionAttributes['max_answers']>0) && $exclude_all_others_auto=='0') -// { -// $maxansw=$aQuestionAttributes['max_answers']; -// $callmaxanswscriptcheckbox = "limitmaxansw_{$ia[0]}(this);"; -// $callmaxanswscriptother = "onkeyup='limitmaxansw_{$ia[0]}(this)'"; -// $maxanswscript = "\t\n"; -// $answer = $maxanswscript . $answer; -// } -// -// -// if ( $minansw > 0 ) -// { -// $minanswscript .= -// "\tif (count < {$minansw} && document.getElementById('display{$ia[0]}').value == 'on'){\n" -// . "alert('".sprintf($clang->gT("Please choose at least %d answer(s) for question \"%s\"","js"), -// $minansw, trim(javascript_escape(str_replace(array("\n", "\r"), "",$ia[3]),true,true)))."');\n" -// . "return false;\n" -// . "\t} else {\n" -// . "if (oldonsubmit_{$ia[0]}){\n" -// . "\treturn oldonsubmit_{$ia[0]}();\n" -// . "}\n" -// . "return true;\n" -// . "\t}\n" -// . "}\n" -// . "document.limesurvey.onsubmit = ensureminansw_{$ia[0]}\n" -// . "-->\n" -// . "\t\n"; -// //$answer = $minanswscript . $answer; -// } + // if ( $maxansw > 0 ) + // { + // $maxanswscript .= " + // if (count > max) + // { + // alert('".sprintf($clang->gT("Please choose at most %d answers for question \"%s\"","js"), $maxansw, trim(javascript_escape(str_replace(array("\n", "\r"), "", $ia[3]),true,true)))."'); + // if (me.type == 'checkbox') { me.checked = false; } + // if (me.type == 'text') { + // me.value = ''; + // if (document.getElementById('answer'+me.name + 'cbox') ){ + // document.getElementById('answer'+me.name + 'cbox').checked = false; + // } + // } + // return max; + // } + // } + // //--> + // \n"; + // $answer = $maxanswscript . $answer; + // } + // + // + // if ( $minansw > 0 ) + // { + // $minanswscript .= + // "\tif (count < {$minansw} && document.getElementById('display{$ia[0]}').value == 'on'){\n" + // . "alert('".sprintf($clang->gT("Please choose at least %d answer(s) for question \"%s\"","js"), + // $minansw, trim(javascript_escape(str_replace(array("\n", "\r"), "",$ia[3]),true,true)))."');\n" + // . "return false;\n" + // . "\t} else {\n" + // . "if (oldonsubmit_{$ia[0]}){\n" + // . "\treturn oldonsubmit_{$ia[0]}();\n" + // . "}\n" + // . "return true;\n" + // . "\t}\n" + // . "}\n" + // . "document.limesurvey.onsubmit = ensureminansw_{$ia[0]}\n" + // . "-->\n" + // . "\t\n"; + // //$answer = $minanswscript . $answer; + // } $checkotherscript = ""; if ($other == 'Y') @@ -2715,8 +2715,8 @@ function do_multiplechoice_withcomments($ia) foreach($qaresult->readAll() as $qarow) { $qquery = "SELECT qid FROM {{questions}} WHERE sid=".$thissurvey['sid']." AND qid=".$qarow['qid']; - $qresult = Yii::app()->db->createCommand($qquery)->query(); //Checked - if (count($qresult)> 0) + $qresult = Yii::app()->db->createCommand($qquery)->query(); //Checked + if (count($qresult)> 0) { $attribute_ref = true; } @@ -2752,41 +2752,41 @@ function do_multiplechoice_withcomments($ia) { $othertext=$clang->gT('Other:'); } -// // Check if the max_answers attribute is set -// $maxansw=0; -// $callmaxanswscriptcheckbox = ''; -// $callmaxanswscriptcheckbox2 = ''; + // // Check if the max_answers attribute is set + // $maxansw=0; + // $callmaxanswscriptcheckbox = ''; + // $callmaxanswscriptcheckbox2 = ''; $callmaxanswscriptother = ''; -// $maxanswscript = ''; -// if (trim($aQuestionAttributes['max_answers'])!='') { -// $maxansw=$aQuestionAttributes['max_answers']; -// $callmaxanswscriptcheckbox = "limitmaxansw_{$ia[0]}(this);"; -// $callmaxanswscriptcheckbox2= "limitmaxansw_{$ia[0]}"; -// $callmaxanswscriptother = "onkeyup=\"limitmaxansw_{$ia[0]}(this)\""; -// -// $maxanswscript = "\t\n"; -// $answer = $maxanswscript . $answer; -// } -// -// if ( $minansw > 0 ) -// { -// $minanswscript .= -// "\tif (count < {$minansw} && document.getElementById('display{$ia[0]}').value == 'on'){\n" -// . "alert('".sprintf($clang->gT("Please choose at least %d answer(s) for question \"%s\"","js"), -// $minansw, trim(javascript_escape(str_replace(array("\n", "\r"), "",$ia[3]),true,true)))."');\n" -// . "return false;\n" -// . "\t} else {\n" -// . "if (oldonsubmit_{$ia[0]}){\n" -// . "\treturn oldonsubmit_{$ia[0]}();\n" -// . "}\n" -// . "return true;\n" -// . "\t}\n" -// . "}\n" -// . "document.limesurvey.onsubmit = ensureminansw_{$ia[0]}\n" -// . "-->\n" -// . "\t\n"; -// //$answer = $minanswscript . $answer; -// } + // if ( $maxansw > 0 ) + // { + // $maxanswscript .= "\tif (count > max)\n" + // . "{\n" + // . "alert('".sprintf($clang->gT("Please choose at most %d answers for question \"%s\"","js"), $maxansw, trim(javascript_escape($ia[3],true,true)))."');\n" + // . "var commentname='answer'+me.name+'comment';\n" + // . "if (me.type == 'checkbox') {\n" + // . "\tme.checked = false;\n" + // . "\tvar commentname='answer'+me.name+'comment';\n" + // . "}\n" + // . "if (me.type == 'text') {\n" + // . "\tme.value = '';\n" + // . "\tif (document.getElementById(me.name + 'cbox') ){\n" + // . " document.getElementById(me.name + 'cbox').checked = false;\n" + // . "\t}\n" + // . "}" + // . "document.getElementById(commentname).value='';\n" + // . "return max;\n" + // . "}\n" + // . "\t}\n" + // . "\t//-->\n" + // . "\t\n"; + // $answer = $maxanswscript . $answer; + // } + // + // if ( $minansw > 0 ) + // { + // $minanswscript .= + // "\tif (count < {$minansw} && document.getElementById('display{$ia[0]}').value == 'on'){\n" + // . "alert('".sprintf($clang->gT("Please choose at least %d answer(s) for question \"%s\"","js"), + // $minansw, trim(javascript_escape(str_replace(array("\n", "\r"), "",$ia[3]),true,true)))."');\n" + // . "return false;\n" + // . "\t} else {\n" + // . "if (oldonsubmit_{$ia[0]}){\n" + // . "\treturn oldonsubmit_{$ia[0]}();\n" + // . "}\n" + // . "return true;\n" + // . "\t}\n" + // . "}\n" + // . "document.limesurvey.onsubmit = ensureminansw_{$ia[0]}\n" + // . "-->\n" + // . "\t\n"; + // //$answer = $minanswscript . $answer; + // } $checkotherscript = ""; //if ($other == 'Y' && $aQuestionAttributes['other_comment_mandatory']==1) //TIBO @@ -3054,9 +3054,9 @@ function do_file_upload($ia) }; \n"; /*if ($pos) - $answer .= ""; + $answer .= ""; else - $answer .= "";*/ + $answer .= "";*/ $js_header_includes[]= '/scripts/modaldialog.js'; // Modal dialog @@ -3101,7 +3101,7 @@ function do_file_upload($ia) var i; var jsonstring = "["; - for (i = 1, filecount = 0; i <= '.$aQuestionAttributes['max_num_of_files'].'; i++) + for (i = 1, filecount = 0; i <= '.$aQuestionAttributes['max_num_of_files'].'; i++) { if ($("#'.$ia[1].'_"+i).val() == "") continue; @@ -3259,7 +3259,7 @@ function do_multipleshorttext($ia) . "\n" . "\t\n".$prefix."\n".'