47 "0" =>
"matrix_subtype_sr",
48 "1" =>
"matrix_subtype_mr",
55 foreach ($subtypes as $idx => $st) {
62 $header->setTitle($this->
lng->txt(
"matrix_appearance"));
66 $column_separators =
new ilCheckboxInputGUI($this->
lng->txt(
"matrix_column_separators"),
"column_separators");
67 $column_separators->setValue(1);
68 $column_separators->setInfo($this->
lng->txt(
"matrix_column_separators_description"));
69 $column_separators->setRequired(
false);
70 $a_form->
addItem($column_separators);
74 $row_separators->setValue(1);
75 $row_separators->setInfo($this->
lng->txt(
"matrix_row_separators_description"));
76 $row_separators->setRequired(
false);
77 $a_form->
addItem($row_separators);
80 $neutral_column_separator =
new ilCheckboxInputGUI($this->
lng->txt(
"matrix_neutral_column_separator"),
"neutral_column_separator");
81 $neutral_column_separator->setValue(1);
82 $neutral_column_separator->setInfo($this->
lng->txt(
"matrix_neutral_column_separator_description"));
83 $neutral_column_separator->setRequired(
false);
84 $a_form->
addItem($neutral_column_separator);
88 $header->setTitle($this->
lng->txt(
"matrix_columns"));
93 $columns->setRequired(
false);
94 $columns->setAllowMove(
true);
95 $columns->setShowWizard(
true);
96 $columns->setShowNeutralCategory(
true);
97 $columns->setDisabledScale(
false);
98 $columns->setNeutralCategoryTitle($this->
lng->txt(
'matrix_neutral_answer'));
99 $columns->setCategoryText($this->
lng->txt(
'matrix_standard_answers'));
104 $header->setTitle($this->
lng->txt(
"matrix_column_settings"));
109 $bipolar->setInfo($this->
lng->txt(
"matrix_bipolar_adjectives_description"));
113 $bipolar1->setRequired(
false);
114 $bipolar->addSubItem($bipolar1);
117 $bipolar2 =
new ilTextInputGUI($this->
lng->txt(
"matrix_right_pole"),
"bipolar2");
118 $bipolar2->setRequired(
false);
119 $bipolar->addSubItem($bipolar2);
125 $header->setTitle($this->
lng->txt(
"matrix_rows"));
130 $rows->setRequired(
false);
131 $rows->setAllowMove(
true);
132 $rows->setLabelText($this->
lng->txt(
'label'));
133 $rows->setUseOtherAnswer(
true);
138 $subtype->setValue($this->
object->getSubtype());
139 $column_separators->setChecked($this->
object->getColumnSeparators());
140 $row_separators->setChecked($this->
object->getRowSeparators());
141 $neutral_column_separator->setChecked($this->
object->getNeutralColumnSeparator());
143 if (!$this->
object->getColumnCount()) {
144 $this->
object->columns->addCategory(
"");
146 $columns->setValues($this->
object->getColumns());
148 $bipolar1->setValue($this->
object->getBipolarAdjective(0));
149 $bipolar2->setValue($this->
object->getBipolarAdjective(1));
151 if ($this->
object->getRowCount() === 0) {
152 $this->
object->getRows()->addCategory(
"");
154 $rows->setValues($this->
object->getRows());
159 $this->
object->setSubtype($a_form->
getInput(
"type"));
160 $this->
object->setRowSeparators($a_form->
getInput(
"row_separators") ? 1 : 0);
161 $this->
object->setColumnSeparators($a_form->
getInput(
"column_separators") ? 1 : 0);
162 $this->
object->setNeutralColumnSeparator($a_form->
getInput(
"neutral_column_separator") ? 1 : 0);
165 $this->
object->setBipolarAdjective(0, $a_form->
getInput(
"bipolar1"));
166 $this->
object->setBipolarAdjective(1, $a_form->
getInput(
"bipolar2"));
169 $this->
object->flushColumns();
171 $columns = $this->request->getColumns();
172 foreach ($columns[
'answer'] as $key => $value) {
173 if (strlen($value ??
"")) {
174 $this->
object->getColumns()->addCategory($value, $columns[
'other'][$key] ?? 0, 0,
null, $columns[
'scale'][$key]);
177 if (isset($columns[
"neutral"][0]) && trim($columns[
"neutral"][0]) !==
"") {
178 $this->
object->getColumns()->addCategory(
179 $columns[
'neutral'][0],
183 $this->request->getColumnNeutralScale()
188 $this->
object->flushRows();
189 $rows = $this->request->getRows();
190 foreach ($rows[
'answer'] as $key => $value) {
191 if (strlen($value ??
"")) {
192 $this->
object->getRows()->addCategory($value, $rows[
'other'][$key] ?? 0, 0, $rows[
'label'][$key] ??
null);
198 ?array $a_working_data =
null,
199 bool $a_only_user_anwers =
false 201 if (is_array($a_working_data)) {
202 $user_answers = $a_working_data;
206 for ($i = 0; $i < $this->
object->getRowCount(); $i++) {
207 $rowobj = $this->
object->getRow($i);
212 for ($j = 0; $j < $this->
object->getColumnCount(); $j++) {
213 $cat = $this->
object->getColumn($j);
214 $value = ($cat->scale) ? ($cat->scale - 1) : $j;
216 $checked =
"unchecked";
217 if (is_array($a_working_data)) {
218 foreach ($user_answers as $user_answer) {
219 if ($user_answer[
"rowvalue"] == $i &&
220 $user_answer[
"value"] == $value) {
221 $checked =
"checked";
222 if ($user_answer[
"textanswer"]) {
223 $text = $user_answer[
"textanswer"];
229 if (!$a_only_user_anwers || $checked ===
"checked") {
230 $cols[$value] = array(
231 "title" => trim($cat->title)
232 ,
"neutral" => (
bool) $cat->neutral
233 ,
"checked" => $checked
238 if ($a_only_user_anwers || count($cols) || $text) {
240 $options[$row_idx] = array(
241 "title" => trim($rowobj->title)
242 ,
"other" => (
bool) $rowobj->other
243 ,
"textanswer" => $text
253 int $question_title = 1,
254 bool $show_questiontext =
true,
255 ?
int $survey_id =
null,
256 ?array $working_data =
null 260 $layout = $this->
object->getLayout();
261 $neutralstyle =
"3px solid #808080";
262 $bordercolor =
"#808080";
263 $template =
new ilTemplate(
"tpl.il_svy_qpl_matrix_printview.html",
true,
true,
"components/ILIAS/SurveyQuestionPool");
265 if ($this->show_layout_row) {
267 $template->setCurrentBlock(
"matrix_row");
268 $template->setVariable(
"ROW", $layout_row);
269 $template->parseCurrentBlock();
272 $tplheaders =
new ilTemplate(
"tpl.il_svy_out_matrix_columnheaders.html",
true,
true,
"components/ILIAS/SurveyQuestionPool");
273 if ($this->
object->getBipolarAdjective(0) !==
'' && $this->
object->getBipolarAdjective(1) !==
'') {
274 $tplheaders->setCurrentBlock(
"bipolar_start");
276 $style[] = sprintf(
"width: %.2F%s!important", $layout[
"percent_bipolar_adjective1"],
"%");
277 if (count($style) > 0) {
278 $tplheaders->setVariable(
"STYLE",
" style=\"" . implode(
";", $style) .
"\"");
280 $tplheaders->parseCurrentBlock();
283 for ($i = 0; $i < $this->
object->getColumnCount(); $i++) {
284 $cat = $this->
object->getColumn($i);
286 $tplheaders->setCurrentBlock(
"neutral_column_header");
288 $tplheaders->setVariable(
"CLASS",
"rsep");
290 $style[] = sprintf(
"width: %.2F%s!important", $layout[
"percent_neutral"],
"%");
291 if ($this->
object->getNeutralColumnSeparator()) {
292 $style[] =
"border-left: $neutralstyle!important;";
296 if ($this->
object->getColumnSeparators()) {
297 if (($i < $this->
object->getColumnCount() - 1)) {
298 $style[] =
"border-right: 1px solid $bordercolor!important";
302 "width: %.2F%s!important",
303 $layout[
"percent_columns"] / $this->
object->getColumnCount(),
306 $tplheaders->setCurrentBlock(
"column_header");
308 $tplheaders->setVariable(
"CLASS",
"center");
310 if (count($style) > 0) {
311 $tplheaders->setVariable(
"STYLE",
" style=\"" . implode(
";", $style) .
"\"");
313 $tplheaders->parseCurrentBlock();
316 if ($this->
object->getBipolarAdjective(0) !==
'' && $this->
object->getBipolarAdjective(1) !==
'') {
317 $tplheaders->setCurrentBlock(
"bipolar_end");
319 $style[] = sprintf(
"width: %.2F%s!important", $layout[
"percent_bipolar_adjective2"],
"%");
320 if (count($style) > 0) {
321 $tplheaders->setVariable(
"STYLE",
" style=\"" . implode(
";", $style) .
"\"");
323 $tplheaders->parseCurrentBlock();
327 $style[] = sprintf(
"width: %.2F%s!important", $layout[
"percent_row"],
"%");
328 if (count($style) > 0) {
329 $tplheaders->setVariable(
"STYLE",
" style=\"" . implode(
";", $style) .
"\"");
332 $template->setCurrentBlock(
"matrix_row");
333 $template->setVariable(
"ROW", $tplheaders->get());
334 $template->parseCurrentBlock();
336 $rowclass = array(
"tblrow1",
"tblrow2");
338 for ($i = 0; $i < $this->
object->getRowCount(); $i++) {
339 $rowobj = $this->
object->getRow($i);
340 $tplrow =
new ilTemplate(
"tpl.il_svy_qpl_matrix_printview_row.html",
true,
true,
"components/ILIAS/SurveyQuestionPool");
341 for ($j = 0; $j < $this->
object->getColumnCount(); $j++) {
342 $cat = $this->
object->getColumn($j);
343 if ($i === 0 && $j === 0) {
344 if ($this->
object->getBipolarAdjective(0) !==
'' && $this->
object->getBipolarAdjective(1) !==
'') {
345 $tplrow->setCurrentBlock(
"bipolar_start");
346 $tplrow->setVariable(
347 "TEXT_BIPOLAR_START",
350 $tplrow->setVariable(
"ROWSPAN", $this->
object->getRowCount());
351 $tplrow->parseCurrentBlock();
354 if ($i === 0 && $j === $this->
object->getColumnCount() - 1) {
355 if ($this->
object->getBipolarAdjective(0) !==
'' && $this->
object->getBipolarAdjective(1) !==
'') {
356 $tplrow->setCurrentBlock(
"bipolar_end");
357 $tplrow->setVariable(
361 $tplrow->setVariable(
"ROWSPAN", $this->
object->getRowCount());
362 $tplrow->parseCurrentBlock();
366 $value = ($cat->scale) ? ($cat->scale - 1) : $j;
367 $col = $options[$i][
"cols"][$value];
369 switch ($this->
object->getSubtype()) {
372 $tplrow->setCurrentBlock(
"neutral_radiobutton");
374 $tplrow->setCurrentBlock(
"radiobutton");
377 $tplrow->setVariable(
"ALT_RADIO", $this->
lng->txt($col[
"checked"]));
378 $tplrow->setVariable(
"TITLE_RADIO", $this->
lng->txt($col[
"checked"]));
379 $tplrow->parseCurrentBlock();
383 $tplrow->setCurrentBlock(
"neutral_checkbox");
385 $tplrow->setCurrentBlock(
"checkbox");
388 $tplrow->setVariable(
"ALT_CHECKBOX", $this->
lng->txt($col[
"checked"]));
389 $tplrow->setVariable(
"TITLE_CHECKBOX", $this->
lng->txt($col[
"checked"]));
390 $tplrow->parseCurrentBlock();
394 $tplrow->setCurrentBlock(
"neutral_answer");
396 if ($this->
object->getNeutralColumnSeparator()) {
397 $style[] =
"border-left: $neutralstyle!important";
400 $tplrow->setCurrentBlock(
"answer");
403 if ($this->
object->getColumnSeparators()) {
404 if ($j < $this->
object->getColumnCount() - 1) {
405 $style[] =
"border-right: 1px solid $bordercolor!important";
408 if ($this->
object->getRowSeparators()) {
409 if ($i < $this->
object->getRowCount() - 1) {
410 $style[] =
"border-bottom: 1px solid $bordercolor!important";
414 $tplrow->setVariable(
"STYLE",
" style=\"" . implode(
";", $style) .
"\"");
416 $tplrow->parseCurrentBlock();
419 if ($rowobj->other) {
420 $text = $options[$i][
"textanswer"];
421 $tplrow->setCurrentBlock(
"text_other");
422 $tplrow->setVariable(
"TEXT_OTHER", $text
423 ?:
" ");
424 $tplrow->parseCurrentBlock();
427 #force to have always the title 430 if ($question_title === 3) {
431 if (trim($rowobj->label)) {
438 $tplrow->setVariable(
"TEXT_ROW", $row_title);
439 $tplrow->setVariable(
"ROWCLASS", $rowclass[$i % 2]);
440 if ($this->
object->getRowSeparators()) {
441 if ($i < $this->
object->getRowCount() - 1) {
442 $tplrow->setVariable(
"STYLE",
" style=\"border-bottom: 1px solid $bordercolor!important\"");
445 $template->setCurrentBlock(
"matrix_row");
446 $template->setVariable(
"ROW", $tplrow->get());
447 $template->parseCurrentBlock();
450 if ($question_title) {
453 $template->setCurrentBlock();
454 if ($show_questiontext) {
457 $template->parseCurrentBlock();
458 return $template->get();
475 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_svy_qpl_layout.html",
"components/ILIAS/SurveyQuestionPool");
476 $this->show_layout_row =
true;
478 $this->tpl->setVariable(
"QUESTION_OUTPUT", $question_output);
479 $this->tpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this,
"saveLayout"));
480 $this->tpl->setVariable(
"SAVE", $this->
lng->txt(
"save"));
488 $percent_values = array(
489 "percent_row" => $this->request->getPercentRow(),
490 "percent_columns" => $this->request->getPercentColumns(),
491 "percent_bipolar_adjective1" => $this->request->getPercentBipAdj1(),
492 "percent_bipolar_adjective2" => $this->request->getPercentBipAdj2(),
493 "percent_neutral" => $this->request->getPercentNeutral()
495 $this->
object->setLayout($percent_values);
498 if (array_sum($percent_values) == 100) {
499 $this->
object->saveLayout(
500 $percent_values[
"percent_row"],
501 $percent_values[
'percent_columns'],
502 $percent_values[
'percent_bipolar_adjective1'],
503 $percent_values[
'percent_bipolar_adjective2'],
504 $percent_values[
"percent_neutral"]
506 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"));
508 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"svy_matrix_layout_percentages_sum_invalid"));
518 $percent_values = $this->
object->getLayout();
519 $template =
new ilTemplate(
"tpl.il_svy_out_matrix_layout.html",
true,
true,
"components/ILIAS/SurveyQuestionPool");
520 if ($this->
object->getBipolarAdjective(0) !==
'' && $this->
object->getBipolarAdjective(1) !==
'') {
521 $template->setCurrentBlock(
"bipolar_start");
522 $template->setVariable(
"VALUE_PERCENT_BIPOLAR_ADJECTIVE1",
" value=\"" . $percent_values[
"percent_bipolar_adjective1"] .
"\"");
523 $template->setVariable(
"STYLE",
" style=\"width:" . $percent_values[
"percent_bipolar_adjective1"] .
"%\"");
524 $template->parseCurrentBlock();
525 $template->setCurrentBlock(
"bipolar_end");
526 $template->setVariable(
"VALUE_PERCENT_BIPOLAR_ADJECTIVE2",
" value=\"" . $percent_values[
"percent_bipolar_adjective2"] .
"\"");
527 $template->setVariable(
"STYLE",
" style=\"width:" . $percent_values[
"percent_bipolar_adjective2"] .
"%\"");
528 $template->parseCurrentBlock();
530 $counter = $this->
object->getColumnCount();
531 if ($this->
object->hasNeutralColumn()) {
532 $template->setCurrentBlock(
"neutral_start");
533 $template->setVariable(
"VALUE_PERCENT_NEUTRAL",
" value=\"" . $percent_values[
"percent_neutral"] .
"\"");
534 $template->setVariable(
"STYLE_NEUTRAL",
" style=\"width:" . $percent_values[
"percent_neutral"] .
"%\"");
535 $template->parseCurrentBlock();
538 $template->setVariable(
"VALUE_PERCENT_ROW",
" value=\"" . $percent_values[
"percent_row"] .
"\"");
539 $template->setVariable(
"STYLE_ROW",
" style=\"width:" . $percent_values[
"percent_row"] .
"%\"");
540 $template->setVariable(
"COLSPAN_COLUMNS", $counter);
541 $template->setVariable(
"VALUE_PERCENT_COLUMNS",
" value=\"" . $percent_values[
"percent_columns"] .
"\"");
542 $template->setVariable(
"STYLE_COLUMNS",
" style=\"width:" . $percent_values[
"percent_columns"] .
"%\"");
543 return $template->get();
555 ?array $working_data =
null,
556 int $question_title = 1,
557 bool $show_questiontext =
true,
558 string $error_message =
"",
559 ?
int $survey_id =
null,
560 bool $compress_view =
false 562 $layout = $this->
object->getLayout();
563 $neutralstyle =
"3px solid #808080";
564 $bordercolor =
"#808080";
565 $template =
new ilTemplate(
"tpl.il_svy_out_matrix.html",
true,
true,
"components/ILIAS/SurveyQuestionPool");
567 if ($this->show_layout_row) {
569 $template->setCurrentBlock(
"matrix_row");
570 $template->setVariable(
"ROW", $layout_row);
571 $template->parseCurrentBlock();
574 $tplheaders =
new ilTemplate(
"tpl.il_svy_out_matrix_columnheaders.html",
true,
true,
"components/ILIAS/SurveyQuestionPool");
575 if ($this->
object->getBipolarAdjective(0) !==
'' && $this->
object->getBipolarAdjective(1) !==
'') {
576 $tplheaders->setCurrentBlock(
"bipolar_start");
578 $style[] = sprintf(
"width: %.2f%s!important", $layout[
"percent_bipolar_adjective1"],
"%");
579 if (count($style) > 0) {
580 $tplheaders->setVariable(
"STYLE",
" style=\"" . implode(
";", $style) .
"\"");
582 $tplheaders->parseCurrentBlock();
585 for ($i = 0; $i < $this->
object->getColumnCount(); $i++) {
587 $col = $this->
object->getColumn($i);
589 $tplheaders->setCurrentBlock(
"neutral_column_header");
591 $tplheaders->setVariable(
"CLASS",
"rsep");
592 $style[] = sprintf(
"width: %.2f%s!important", $layout[
"percent_neutral"],
"%");
593 if ($this->
object->getNeutralColumnSeparator()) {
594 $style[] =
"border-left: $neutralstyle!important;";
597 if ($this->
object->getColumnSeparators()) {
598 if (($i < $this->
object->getColumnCount() - 1)) {
599 $style[] =
"border-right: 1px solid $bordercolor!important";
603 "width: %.2f%s!important",
604 $layout[
"percent_columns"] / $this->
object->getColumnCount(),
607 $tplheaders->setCurrentBlock(
"column_header");
609 $tplheaders->setVariable(
"CLASS",
"center");
611 if (count($style) > 0) {
612 $tplheaders->setVariable(
"STYLE",
" style=\"" . implode(
";", $style) .
"\"");
614 $tplheaders->parseCurrentBlock();
616 if ($this->
object->getBipolarAdjective(0) !==
'' && $this->
object->getBipolarAdjective(1) !==
'') {
617 $tplheaders->setCurrentBlock(
"bipolar_end");
619 $style[] = sprintf(
"width: %.2f%s!important", $layout[
"percent_bipolar_adjective2"],
"%");
620 if (count($style) > 0) {
621 $tplheaders->setVariable(
"STYLE",
" style=\"" . implode(
";", $style) .
"\"");
623 $tplheaders->parseCurrentBlock();
627 $style[] = sprintf(
"width: %.2f%s!important", $layout[
"percent_row"],
"%");
628 if (count($style) > 0) {
629 $tplheaders->setVariable(
"STYLE",
" style=\"" . implode(
";", $style) .
"\"");
632 $template->setCurrentBlock(
"matrix_row");
633 $template->setVariable(
"ROW", $tplheaders->get());
634 $template->parseCurrentBlock();
636 $rowclass = array(
"tblrow1",
"tblrow2");
637 for ($i = 0; $i < $this->
object->getRowCount(); $i++) {
638 $rowobj = $this->
object->getRow($i);
639 $tplrow =
new ilTemplate(
"tpl.il_svy_out_matrix_row.html",
true,
true,
"components/ILIAS/SurveyQuestionPool");
640 for ($j = 0; $j < $this->
object->getColumnCount(); $j++) {
641 $cat = $this->
object->getColumn($j);
642 if ($i === 0 && $j === 0) {
643 if ($this->
object->getBipolarAdjective(0) !==
'' && $this->
object->getBipolarAdjective(1) !==
'') {
644 $tplrow->setCurrentBlock(
"bipolar_start");
645 $tplrow->setVariable(
646 "TEXT_BIPOLAR_START",
649 $tplrow->setVariable(
"ROWSPAN", $this->
object->getRowCount());
650 $tplrow->parseCurrentBlock();
653 if ($i === 0 && $j === $this->
object->getColumnCount() - 1) {
654 if ($this->
object->getBipolarAdjective(0) !==
'' && $this->
object->getBipolarAdjective(1) !==
'') {
655 $tplrow->setCurrentBlock(
"bipolar_end");
656 $tplrow->setVariable(
660 $tplrow->setVariable(
"ROWSPAN", $this->
object->getRowCount());
661 $tplrow->parseCurrentBlock();
664 switch ($this->
object->getSubtype()) {
667 $tplrow->setCurrentBlock(
"neutral_radiobutton");
669 $tplrow->setCurrentBlock(
"radiobutton");
671 $tplrow->setVariable(
"QUESTION_ID", $this->
object->getId());
672 $tplrow->setVariable(
"ROW", $i);
673 $tplrow->setVariable(
"VALUE", ($cat->scale) ? ($cat->scale - 1) : $j);
674 if (is_array($working_data)) {
675 foreach ($working_data as
$data) {
676 if (($data[
"value"] == $cat->scale - 1) && ($data[
"rowvalue"] == $i)) {
677 $tplrow->setVariable(
"CHECKED_RADIOBUTTON",
" checked=\"checked\"");
681 $tplrow->parseCurrentBlock();
685 $tplrow->setCurrentBlock(
"neutral_checkbox");
687 $tplrow->setCurrentBlock(
"checkbox");
689 $tplrow->setVariable(
"QUESTION_ID", $this->
object->getId());
690 $tplrow->setVariable(
"ROW", $i);
691 $tplrow->setVariable(
"VALUE", ($cat->scale) ? ($cat->scale - 1) : $j);
692 if (is_array($working_data)) {
693 foreach ($working_data as
$data) {
694 if (($data[
"value"] == $cat->scale - 1) && ($data[
"rowvalue"] == $i)) {
695 $tplrow->setVariable(
"CHECKED_CHECKBOX",
" checked=\"checked\"");
699 $tplrow->parseCurrentBlock();
703 $tplrow->setCurrentBlock(
"neutral_answer");
705 if ($this->
object->getNeutralColumnSeparator()) {
706 $style[] =
"border-left: $neutralstyle!important";
709 $tplrow->setCurrentBlock(
"answer");
712 if ($this->
object->getColumnSeparators()) {
713 if ($j < $this->
object->getColumnCount() - 1) {
714 $style[] =
"border-right: 1px solid $bordercolor!important";
717 if ($this->
object->getRowSeparators()) {
718 if ($i < $this->
object->getRowCount() - 1) {
719 $style[] =
"border-bottom: 1px solid $bordercolor!important";
723 $tplrow->setVariable(
"STYLE",
" style=\"" . implode(
";", $style) .
"\"");
725 $tplrow->parseCurrentBlock();
728 if ($rowobj->other) {
729 $tplrow->setCurrentBlock(
"row_other");
730 $tplrow->setVariable(
"QUESTION_ID", $this->
object->getId());
731 $tplrow->setVariable(
"ROW", $i);
732 if (is_array($working_data)) {
733 foreach ($working_data as
$data) {
734 if ($data[
"rowvalue"] == $i) {
735 $tplrow->setVariable(
742 $tplrow->parseCurrentBlock();
745 $tplrow->setVariable(
"ROWCLASS", $rowclass[$i % 2]);
746 if ($this->
object->getRowSeparators()) {
747 if ($i < $this->
object->getRowCount() - 1) {
748 $tplrow->setVariable(
"STYLE",
" style=\"border-bottom: 1px solid $bordercolor!important\"");
751 $template->setCurrentBlock(
"matrix_row");
752 $template->setVariable(
"ROW", $tplrow->get());
753 $template->parseCurrentBlock();
756 $template->setVariable(
760 $template->setCurrentBlock(
"question_data_matrix");
761 if (strcmp($error_message,
"") !== 0) {
762 $template->setVariable(
"ERROR_MESSAGE",
"<p class=\"warning\">$error_message</p>");
764 if ($show_questiontext) {
767 $template->parseCurrentBlock();
768 return $template->get();
importEditFormValues(ilPropertyFormGUI $a_form)
This class represents an option in a radio group.
getQuestionTitle(int $question_title_mode=1)
getPrintViewQuestionTitle(int $question_title=1)
saveLayout()
Saves the layout for the matrix question.
layout()
Creates a layout view of the question.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPrintView(int $question_title=1, bool $show_questiontext=true, ?int $survey_id=null, ?array $working_data=null)
outQuestionText(ilTemplate $template)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
addFieldsToEditForm(ilPropertyFormGUI $a_form)
setQuestionTabsForClass(string $guiclass)
getWorkingForm(?array $working_data=null, int $question_title=1, bool $show_questiontext=true, string $error_message="", ?int $survey_id=null, bool $compress_view=false)
Creates the question output form for the learner.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getParsedAnswers(?array $a_working_data=null, bool $a_only_user_anwers=false)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static getHtmlPath(string $relative_path)
get url of path
activateTab(string $a_id)
getLayoutRow()
Creates a row to define the matrix question layout with percentage values.
Basic class for all survey question types The SurveyQuestionGUI class defines and encapsulates basic ...