4 include_once
"./Modules/TestQuestionPool/classes/class.ilSingleChoiceWizardInputGUI.php";
15 $this->values =
array();
16 if (is_array( $a_value ))
18 if (is_array( $a_value[
'answer'] ))
20 foreach ($a_value[
'answer'] as $index =>
$value)
22 include_once
"./Modules/TestQuestionPool/classes/class.assAnswerMultipleResponseImage.php";
24 array_push( $this->values, $answer );
39 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
48 if (is_array( $foundvalues ))
51 if (is_array( $foundvalues[
'answer'] ))
53 foreach ($foundvalues[
'answer'] as $aidx => $answervalue)
55 if (((strlen( $answervalue )) == 0) && (strlen( $foundvalues[
'imagename'][$aidx] ) == 0))
57 $this->
setAlert( $lng->txt(
"msg_input_is_required" ) );
64 if (is_array( $foundvalues[
'points'] ))
66 foreach ($foundvalues[
'points'] as $points)
72 if (((strlen( $points )) == 0) || (!is_numeric( $points )))
74 $this->
setAlert( $lng->txt(
"form_msg_numeric_value_required" ) );
81 $this->
setAlert( $lng->txt(
"enter_enough_positive_points" ) );
87 $this->
setAlert( $lng->txt(
"msg_input_is_required" ) );
103 $tpl =
new ilTemplate(
"tpl.prop_essaykeywordswizardinput.html",
true,
true,
"Modules/TestQuestionPool");
105 foreach ($this->values as
$value)
109 if (is_object( $value ))
111 $tpl->setCurrentBlock(
"prop_text_propval" );
113 $tpl->parseCurrentBlock();
114 $tpl->setCurrentBlock(
"prop_points_propval" );
116 $tpl->parseCurrentBlock();
118 $tpl->setCurrentBlock(
'singleline' );
120 $tpl->setVariable(
"SINGLELINE_ID", $this->
getPostVar() .
"[answer][$i]" );
121 $tpl->setVariable(
"SINGLELINE_ROW_NUMBER", $i );
126 $tpl->setVariable(
"DISABLED_SINGLELINE",
" disabled=\"disabled\"" );
128 $tpl->parseCurrentBlock();
133 if (is_object( $value ))
135 $tpl->setCurrentBlock(
"prop_points_propval" );
137 $tpl->parseCurrentBlock();
142 $tpl->setCurrentBlock(
"row" );
144 $tpl->setVariable(
"ROW_NUMBER", $i );
146 $tpl->setVariable(
"POINTS_ID", $this->
getPostVar() .
"[points][$i]" );
147 $tpl->setVariable(
"CMD_ADD",
"cmd[add" . $this->
getFieldId() .
"][$i]" );
148 $tpl->setVariable(
"CMD_REMOVE",
"cmd[remove" . $this->
getFieldId() .
"][$i]" );
151 $tpl->setVariable(
"DISABLED_POINTS",
" disabled=\"disabled\"" );
155 $tpl->parseCurrentBlock();
160 $tpl->setVariable(
"TEXT_YES", $lng->txt(
'yes' ) );
161 $tpl->setVariable(
"TEXT_NO", $lng->txt(
'no' ) );
162 $tpl->setVariable(
"DELETE_IMAGE_HEADER", $lng->txt(
'delete_image_header' ) );
163 $tpl->setVariable(
"DELETE_IMAGE_QUESTION", $lng->txt(
'delete_image_question' ) );
164 $tpl->setVariable(
"ANSWER_TEXT", $lng->txt(
'answer_text' ) );
165 $tpl->setVariable(
"POINTS_TEXT", $lng->txt(
'points' ) );
166 $tpl->setVariable(
"COMMANDS_TEXT", $lng->txt(
'actions' ) );
167 $tpl->setVariable(
"POINTS_CHECKED_TEXT", $lng->txt(
'checkbox_checked' ) );
169 $a_tpl->setCurrentBlock(
"prop_generic" );
170 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get() );
171 $a_tpl->parseCurrentBlock();
174 $tpl->addJavascript(
"./Services/Form/js/ServiceFormWizardInput.js");
175 $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.