\n";
+
+ $answer = Yii::app()->getController()->renderPartial('/survey/questions/5pointchoice/5pointchoice_header', array('id'=>$id), true);
+
for ($fp=1; $fp<=5; $fp++)
{
- $answer .= "\t
\ngetConfig('surveyID')][$ia[1]] == $fp)
{
- $answer .= CHECKED;
+ //$answer .= CHECKED;
+ $checkedState = ' CHECKED ';
}
- $answer .= " onclick=\"$checkconditionFunction(this.value, this.name, this.type)\" />\n\n\t
\n";
+
+ $aData = array(
+ 'ia' => $ia,
+ 'fp' => $fp,
+ 'checkedState' => $checkedState,
+ 'checkconditionFunction' => $checkconditionFunction,
+ );
+ $answer .= Yii::app()->getController()->renderPartial('/survey/questions/5pointchoice/item_row', $aData, true);
}
if ($ia[6] != "Y" && SHOW_NO_ANSWER == 1) // Add "No Answer" option if question is not mandatory
{
- $answer .= "\t
\ngetConfig('surveyID')][$ia[1]])
{
- $answer .= CHECKED;
+ $checkedState = ' CHECKED ';
}
- $answer .= " onclick=\"$checkconditionFunction(this.value, this.name, this.type)\" />\n\n\t
\n";
+ $aData = array(
+ 'ia' => $ia,
+ 'checkedState' => $checkedState,
+ 'checkconditionFunction' => $checkconditionFunction,
+ );
+ $answer .= Yii::app()->getController()->renderPartial('/survey/questions/5pointchoice/item_noanswer_row', $aData, true);
}
- $answer .= "
\n