/** * creates the html for the global features-input * * @access private * @return string the html */ function createQuestionFeatures() { $group =& $this->tree->getGroupObject($this->itemID); $templateID = $group->getTemplateID(); if ($templateID) { $template = new EvaluationQuestion($templateID); $templateTitle = htmlReady($template->getText()); } else { $templateTitle = NO_TEMPLATE_GROUP; } //_("keine Vorlage"); if ($templateTitle == "") { $templateTitle = NO_TEMPLATE; } $table = new HTML("table"); $table->addAttr("border", "0"); $table->addAttr("align", "center"); $table->addAttr("cellspacing", "0"); $table->addAttr("cellpadding", "0"); $table->addAttr("width", "98%"); // $table->addAttr ("style", "border:5px solid white;"); $tr = new HTML("tr"); $td = new HTMl("td"); $td->addAttr("class", "table_row_odd"); $td->addAttr("colspan", "2"); $b = new HTML("b"); $b->addContent(_("Eigenschaften")); $b->addContent(":"); $td->addContent($b); $tr->addContent($td); $table->addContent($tr); $tr = new HTML("tr"); $td = new HTMl("td"); $td->addAttr("style", "border-bottom:0px dotted black;"); $td->addContent(_("Die Fragen dieses Blocks müssen beantwortet werden (Pflichtfelder):")); $tr->addContent($td); $td = new HTMl("td"); $td->addAttr("style", "border-bottom:0px dotted black;"); $input = new HTMLempty("input"); $input->addAttr("type", "radio"); $input->addAttr("value", "0"); $input->addAttr("name", "mandatory"); if (!$group->isMandatory()) { $input->addAttr("checked", "checked"); } $td->addContent($input); $td->addContent(_("nein")); $td->addContent(new HTMLempty("br")); $input = new HTMLempty("input"); $input->addAttr("type", "radio"); $input->addAttr("value", "1"); $input->addAttr("name", "mandatory"); if ($group->isMandatory()) { $input->addAttr("checked", "checked"); } $td->addContent($input); $td->addContent(_("ja")); $tr->addContent($td); $table->addContent($tr); $tr = new HTML("tr"); $td = new HTML("td"); $td->addAttr("style", "border-bottom:0px dotted black;"); $td->addHTMLContent(sprintf(_("Diesem Fragenblock ist die Antwortenvorlage <b>%s</b> zugewiesen."), $templateTitle)); $text = _("Das Zuweisen einer Antwortenvorlage ändert alle Antwortenmöglichkeiten der Fragen dieses Fragenblocks."); if ($templateTitle == NO_TEMPLATE_GROUP) { $text .= " " . _("Da dieser Fragenblock keine Antwortenvorlage benutzt, würde ein Zuweisen einer Antwortenvorlage zum Verlust aller eingegebenen Antworten führen."); } $td->addHTMLContent($this->createImage(EVAL_PIC_HELP, $text)); $tr->addContent($td); $td = new HTML("td"); $td->addAttr("style", "border-bottom:0px dotted black;"); $td->addAttr("nowrap", "nowrap"); $td->addHTMLContent($this->createTemplateSelection($templateID)); $td->addContent(" "); $td->addHTMLContent(Button::create(_('Zuweisen'), 'cmd[ChangeTemplate]', array('title' => _('Eine andere Antwortenvorlage für diesen Fragenblock auswählen')))); $tr->addContent($td); $table->addContent($tr); return $table->createContent(); }