Ejemplo n.º 1
0
 /**
  * createEvaluationFooter: generate the foot of an evaluation (buttons etc.)
  * @param   the evaluation
  * @returns a table row
  */
 function createEvaluationFooter($eval, $voted, $isPreview)
 {
     global $auth;
     if ($isPreview) {
         $voted = YES;
     }
     $br = new HTMpty("br");
     $tr = new HTM("tr");
     $td = new HTM("td");
     $td->attr("class", "content_body");
     $td->attr("align", "center");
     $td->attr("data-dialog-button", "");
     $td->cont($br);
     /* vote button */
     if (!$voted) {
         $button = Button::createAccept(_('Abschicken'), 'voteButton', array('title' => _('Senden Sie Ihre Antworten hiermit ab.'), 'data-dialog' => ''));
         $td->cont($button);
     }
     /* close button */
     if (!Request::isXHR()) {
         $button = new HTM("p");
         $button->cont(_("Sie können dieses Fenster jetzt schließen."));
         $td->cont($button);
     }
     /* reload button */
     if ($isPreview) {
         $button = LinkButton::create(_('Aktualisieren'), URLHelper::getURL('show_evaluation.php?evalID=' . $eval->getObjectID() . '&isPreview=1'), array('title' => _('Vorschau aktualisieren.')));
         $td->cont($button);
     }
     $td->cont($br);
     $td->cont($br);
     $tr->cont($td);
     return $tr;
 }
Ejemplo n.º 2
0
 /**
  * create a fat-printed sub headline with some space
  */
 function createSubHeadline($text)
 {
     $div = new HTM("div");
     $div->attr("style", "margin-bottom:4px; margin-top:4px;");
     $b = new HTM("b");
     $b->cont($text);
     $div->cont($b);
     return $div;
 }
Ejemplo n.º 3
0
        break;
}
/* Surrounding Table ------------------------------------------------------- */
$br = new HTMpty("br");
$tableA = new HTM("table");
$tableA->attr("border", "0");
$tableA->attr("align", "center");
$tableA->attr("cellspacing", "0");
$tableA->attr("cellpadding", "2");
$tableA->attr("width", "250");
$trA = new HTM("tr");
$tdA = new HTM("td");
$tdA->attr("class", "blank");
$tdA->html($lib->createInfoBox($command));
$trA->cont($tdA);
$tableA->cont($trA);
$trA = new HTM("tr");
$tdA = new HTM("td");
$tdA->cont(EvalCommon::createTitle(_("Antwortenvorlagen"), NULL, 2));
$trA->cont($tdA);
$tableA->cont($trA);
$trA = new HTM("tr");
$tdA = new HTM("td");
$table = new HTM("table");
$table->attr("border", "0");
$table->attr("align", "center");
$table->attr("cellspacing", "0");
$table->attr("cellpadding", "3");
$table->attr("width", "100%");
$tr = new HTM("tr");
$td = new HTM("td");
Ejemplo n.º 4
0
} else {
    $userID = $auth->auth["uid"];
}
/* ---------------------------------------------------------- end: variables */
$br = new HTMpty("br");
/* Surrounding Form -------------------------------------------------------- */
$form = new HTM("form");
$form->attr("action", URLHelper::getLink(Request::url()));
$form->attr("method", "post");
$form->html(CSRFProtection::tokenTag());
if (Request::isXHR()) {
    header('X-Title:' . _("Stud.IP Online-Evaluation"));
} else {
    // TODO: This should use Assets::img() but on the other hand it should also use templates
    $titlebar = EvalCommon::createTitle(_("Stud.IP Online-Evaluation"), Icon::create('test', 'info_alt')->asImagePath());
    $form->cont($titlebar);
}
/* Surrounding Table ------------------------------------------------------- */
$table = new HTM("table");
$table->attr("border", "0");
$table->attr("align", "center");
$table->attr("cellspacing", "0");
$table->attr("cellpadding", "3");
$table->attr("width", "100%");
$table->attr("class", "table_row_even");
/* count mandatory items */
$mandatories = checkMandatoryItems($eval);
$answers = Request::quotedArray('answers');
/* ------------------------------------------------------------------------- */
if ($votedNow) {
    $answers = Request::quotedArray('answers');