$question = new EvaluationQuestion($questionID, NULL, EVAL_LOAD_ALL_CHILDREN); if ($question->getNumberChildren() == 0) { $question->setType(EVALQUESTION_TYPE_MC); for ($i = 0; $i < 4; $i++) { $answer = new EvaluationAnswer(); $answer->setParentID($question->getObjectID()); $answer->setText(""); $answer->setPosition(1); $question->addChild($answer); } } $td->cont($lib->createTemplateForm($question, $onthefly)); break; case "createfree_scale": $question = new EvaluationQuestion(); $question->setObjectID(md5(uniqid(rand()))); $question->setType(EVALQUESTION_TYPE_MC); $question->setText(_("Freitext")); $answer = new EvaluationAnswer(); $answer->setParentID($question->getObjectID()); $answer->setText(""); $answer->setRows(1); $question->addChild($answer); $td->cont($lib->createTemplateFormFree($question)); break; case "editfree_scale": $question = new EvaluationQuestion(Request::option('template_editfree_scale'), NULL, EVAL_LOAD_ALL_CHILDREN); $td->cont($lib->createTemplateFormFree($question)); break; case "back": $td->cont(" ");