22 if (is_array($a_value)) {
23 if (is_array($a_value[
'points']) && is_array($a_value[
'points_unchecked'])) {
25 $this->values[
$index]->setPoints($a_value[
'points'][
$index]);
26 $this->values[
$index]->setPointsUnchecked($a_value[
'points_unchecked'][$index]);
37 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
42 if (is_array($foundvalues)) {
45 if (is_array($foundvalues[
'points'])) {
46 foreach ($foundvalues[
'points'] as $points) {
50 if (((strlen($points)) == 0) || (!is_numeric($points))) {
51 $this->
setAlert(
$lng->txt(
"form_msg_numeric_value_required"));
55 foreach ($foundvalues[
'points_unchecked'] as $points) {
59 if (((strlen($points)) == 0) || (!is_numeric($points))) {
60 $this->
setAlert(
$lng->txt(
"form_msg_numeric_value_required"));
66 $this->
setAlert(
$lng->txt(
"enter_enough_positive_points"));
80 $lng = $DIC->language();
82 $tpl =
new ilTemplate(
"tpl.prop_multiplechoicecorrection_input.html",
true,
true,
"Modules/TestQuestionPool");
86 foreach ($this->values as
$value) {
87 if ($this->qstObject->isSingleline) {
88 if (strlen($value->getImage())) {
89 $imagename = $this->qstObject->getImagePathWeb() . $value->getImage();
90 if (($this->
getSingleline()) && ($this->qstObject->getThumbSize())) {
91 if (@file_exists($this->qstObject->getImagePath() . $this->qstObject->getThumbPrefix() . $value->getImage())) {
92 $imagename = $this->qstObject->getImagePathWeb() . $this->qstObject->getThumbPrefix() . $value->getImage();
96 $tpl->setCurrentBlock(
'image');
97 $tpl->setVariable(
'SRC_IMAGE', $imagename);
98 $tpl->setVariable(
'IMAGE_NAME', $value->getImage());
100 $tpl->parseCurrentBlock();
102 $tpl->setCurrentBlock(
'image');
103 $tpl->touchBlock(
'image');
104 $tpl->parseCurrentBlock();
108 $tpl->setCurrentBlock(
"answer");
109 $tpl->setVariable(
"ANSWER", $value->getAnswertext());
110 $tpl->parseCurrentBlock();
112 $tpl->setCurrentBlock(
"row");
114 $tpl->setVariable(
"POINTS_ROW_NUMBER",
$i);
117 $tpl->parseCurrentBlock();
122 if ($this->qstObject->isSingleline) {
123 $tpl->setCurrentBlock(
"image_heading");
124 $tpl->setVariable(
"ANSWER_IMAGE",
$lng->txt(
'answer_image'));
126 $tpl->parseCurrentBlock();
129 $tpl->setCurrentBlock(
"points_heading");
130 $tpl->setVariable(
"POINTS_CHECKED_TEXT",
$lng->txt(
'points_checked'));
131 $tpl->setVariable(
"POINTS_UNCHECKED_TEXT",
$lng->txt(
'points_unchecked'));
132 $tpl->parseCurrentBlock();
135 $tpl->setVariable(
"ANSWER_TEXT",
$lng->txt(
'answer_text'));
137 $a_tpl->setCurrentBlock(
"prop_generic");
138 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
139 $a_tpl->parseCurrentBlock();
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
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.