$td->cont($lib->createTemplateFormFree($question));
            break;
        case "back":
            $td->cont(" ");
            break;
    }
    $tr->cont($td);
    $table->cont($tr);
    $tdA->cont($table);
    $trA->cont($tdA);
    $tableA->cont($trA);
}
/* Javascript function for preview-link */
$js = EvalCommon::createEvalShowJS(YES);
/* --------------------------------------------------------------------- */
return $js->createContent() . $tableA->createContent();
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
function save1($myuserid)
{
    $mineexists = 0;
    /*Existiert Question/Template schon?*/
    $qdb = new EvaluationQuestionDB();
    if (!$template_id) {
        $template_id = Request::option("template_id");
    }
    if ($qdb->exists($template_id)) {
        $question = new EvaluationQuestion($template_id, NULL, EVAL_LOAD_ALL_CHILDREN);
        if ($question->getParentID() != $myuserid) {
            $foreign = TRUE;
            $question = new EvaluationQuestion();
Exemple #2
0
} elseif ($votedEarlier) {
    /* header ------ */
    $table->cont($lib->createEvaluationHeader($eval, $votedNow, $votedEarlier));
} else {
    /* header ------ */
    $table->cont($lib->createEvaluationHeader($eval, $votedNow, $votedEarlier));
    /* the whole evaluation ------ */
    $table->cont($lib->createEvaluation($tree));
}
/* footer ------ */
$table->cont($lib->createEvaluationFooter($eval, $votedNow || $votedEarlier, $isPreview));
$form->cont($table);
/* Ausgabe erzeugen---------------------------------------------------------- */
//Content (TODO: besser mit TemplateFactory)
if (Request::isXHR()) {
    echo $form->createContent();
} else {
    $layout = $GLOBALS['template_factory']->open('layouts/base.php');
    $layout->content_for_layout = $form->createContent();
    echo $layout->render();
}
page_close();
/**
 * checkMandatoryItems:
 * put IDs of mandatory questions into global array $mandatories
 *  (or, if the user has voted, the IDs of the mandatory questions, which he did not answer to)
 *
 * @param object  the Evaluation object (when called externally).
 */
function checkMandatoryItems($item)
{