ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAssSingleChoiceFeedback.php
Go to the documentation of this file.
1<?php
2
28{
32 public const SPECIFIC_QUESTION_TABLE_NAME = 'qpl_qst_sc';
33
34 protected function getSpecificQuestionTableName(): string
35 {
37 }
38
39 protected function buildAnswerOptionLabel(int $index, $answer): string
40 {
41 $label = [];
42
43 if ($answer->hasImage()) {
44 if ($this->questionOBJ->getThumbSize()) {
45 $src = $this->questionOBJ->getImagePathWeb() . $this->questionOBJ->getThumbPrefix() . $answer->getImage();
46 } else {
47 $src = $this->questionOBJ->getImagePathWeb() . $answer->getImage();
48 }
49
50 $label[] = "<img src='{$src}' />";
51 }
52
53 if ($answer->getAnswertext() !== null
54 && $answer->getAnswertext() !== '') {
55 $label[] = $answer->getAnswertext();
56 }
57
58 return implode('<br />', $label);
59 }
60}
const SPECIFIC_QUESTION_TABLE_NAME
table name for specific feedback