コード例 #1
0
     break;
 case "H":
     //ARRAY (Flexible) - Column Format
     create_subQuestions($question, $RowQ['qid'], $sgq);
     $response->append_child(create_fixed($qid, true, false, 0, $other, $sgq));
     $question->append_child($response);
     break;
 case "1":
     //Dualscale multi-flexi array
     //select subQuestions from answers table where QID
     create_subQuestions($question, $qid, $sgq);
     $response = $dom->create_element("response");
     $response->append_child(create_fixed($qid, false, false, 0, $other, $sgq));
     $response2 = $dom->create_element("response");
     $response2->set_attribute("varName", cleanup($sgq) . "_2");
     $response2->append_child(create_fixed($qid, false, false, 1, $other, $sgq));
     $question->append_child($response);
     $question->append_child($response2);
     break;
 case ":":
     //multi-flexi array numbers
     create_subQuestions($question, $qid, $sgq);
     //get multiflexible_checkbox - if set then each box is a checkbox (single fixed response)
     $mcb = get_length($qid, 'multiflexible_checkbox', -1);
     if ($mcb != -1) {
         create_multi($question, $qid, $sgq, 1);
     } else {
         //get multiflexible_max - if set then make boxes of max this width
         $mcm = strlen(get_length($qid, 'multiflexible_max', 1));
         create_multi($question, $qid, $sgq, 1, array('f' => 'integer', 'len' => $mcm, 'lab' => ''));
     }
コード例 #2
0
     break;
 case "H":
     //ARRAY (Flexible) - Column Format
     create_subQuestions(&$question, $RowQ['qid'], $RowQ['title']);
     $response->append_child(create_fixed($qid, true, false));
     $question->append_child($response);
     break;
 case "1":
     //Dualscale multi-flexi array
     //select subQuestions from answers table where QID
     create_subQuestions(&$question, $qid, $RowQ['title']);
     $response = $dom->create_element("response");
     $response->append_child(create_fixed($qid, false, false));
     $response2 = $dom->create_element("response");
     $response2->set_attribute("varName", cleanup($RowQ['title']) . "_2");
     $response2->append_child(create_fixed($qid, false, false, 1));
     $question->append_child($response);
     $question->append_child($response2);
     break;
 case ":":
     //multi-flexi array numbers
     create_subQuestions(&$question, $qid, $RowQ['title']);
     //get multiflexible_checkbox - if set then each box is a checkbox (single fixed response)
     $mcb = get_length($qid, 'multiflexible_checkbox', -1);
     if ($mcb != -1) {
         create_multi(&$question, $qid, $RowQ['title'], 1);
     } else {
         //get multiflexible_max - if set then make boxes of max this width
         $mcm = strlen(get_length($qid, 'multiflexible_max', 1));
         create_multi(&$question, $qid, $RowQ['title'], 1, array('f' => 'integer', 'len' => $mcm, 'lab' => ''));
     }