4 include_once
"./Modules/TestQuestionPool/classes/class.ilSingleChoiceWizardInputGUI.php";
15 $this->values =
array();
16 if (is_array($a_value)) {
17 if (is_array($a_value[
'answer'])) {
19 include_once
"./Modules/TestQuestionPool/classes/class.assAnswerMultipleResponseImage.php";
21 array_push($this->values, $answer);
36 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
47 if (is_array($foundvalues)) {
49 if (is_array($foundvalues[
'answer'])) {
50 foreach ($foundvalues[
'answer'] as $aidx => $answervalue) {
51 if (((strlen($answervalue)) == 0) && (strlen($foundvalues[
'imagename'][$aidx]) == 0)) {
52 $this->
setAlert($lng->txt(
"msg_input_is_required"));
59 if (is_array($foundvalues[
'points'])) {
60 foreach ($foundvalues[
'points'] as $points) {
64 if (((strlen($points)) == 0) || (!is_numeric($points))) {
65 $this->
setAlert($lng->txt(
"form_msg_numeric_value_required"));
71 $this->
setAlert($lng->txt(
"enter_enough_positive_points"));
75 $this->
setAlert($lng->txt(
"msg_input_is_required"));
91 $tpl =
new ilTemplate(
"tpl.prop_essaykeywordswizardinput.html",
true,
true,
"Modules/TestQuestionPool");
93 foreach ($this->values as
$value) {
95 if (is_object($value)) {
96 $tpl->setCurrentBlock(
"prop_text_propval");
98 $tpl->parseCurrentBlock();
99 $tpl->setCurrentBlock(
"prop_points_propval");
101 $tpl->parseCurrentBlock();
103 $tpl->setCurrentBlock(
'singleline');
105 $tpl->setVariable(
"SINGLELINE_ID", $this->
getPostVar() .
"[answer][$i]");
106 $tpl->setVariable(
"SINGLELINE_ROW_NUMBER",
$i);
110 $tpl->setVariable(
"DISABLED_SINGLELINE",
" disabled=\"disabled\"");
112 $tpl->parseCurrentBlock();
115 if (is_object($value)) {
116 $tpl->setCurrentBlock(
"prop_points_propval");
118 $tpl->parseCurrentBlock();
123 $tpl->setCurrentBlock(
"row");
125 $tpl->setVariable(
"ROW_NUMBER",
$i);
127 $tpl->setVariable(
"POINTS_ID", $this->
getPostVar() .
"[points][$i]");
128 $tpl->setVariable(
"CMD_ADD",
"cmd[add" . $this->
getFieldId() .
"][$i]");
129 $tpl->setVariable(
"CMD_REMOVE",
"cmd[remove" . $this->
getFieldId() .
"][$i]");
131 $tpl->setVariable(
"DISABLED_POINTS",
" disabled=\"disabled\"");
135 $tpl->parseCurrentBlock();
140 $tpl->setVariable(
"TEXT_YES", $lng->txt(
'yes'));
141 $tpl->setVariable(
"TEXT_NO", $lng->txt(
'no'));
142 $tpl->setVariable(
"DELETE_IMAGE_HEADER", $lng->txt(
'delete_image_header'));
143 $tpl->setVariable(
"DELETE_IMAGE_QUESTION", $lng->txt(
'delete_image_question'));
144 $tpl->setVariable(
"ANSWER_TEXT", $lng->txt(
'answer_text'));
145 $tpl->setVariable(
"POINTS_TEXT", $lng->txt(
'points'));
146 $tpl->setVariable(
"COMMANDS_TEXT", $lng->txt(
'actions'));
147 $tpl->setVariable(
"POINTS_CHECKED_TEXT", $lng->txt(
'checkbox_checked'));
149 $a_tpl->setCurrentBlock(
"prop_generic");
150 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
151 $a_tpl->parseCurrentBlock();
154 $tpl->addJavascript(
"./Services/Form/js/ServiceFormWizardInput.js");
155 $tpl->addJavascript(
"./Modules/TestQuestionPool/templates/default/essaykeywordwizard.js");
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getMaxLength()
Get Max Length.
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
ASS_AnswerBinaryStateImage is a class for answers with a binary state indicator (checked/unchecked, set/unset) and an image file.
static get($a_glyph, $a_text="")
Get glyph html.
special template class to simplify handling of ITX/PEAR
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.
Create styles array
The data for the language used.