ILIAS  release_8 Revision v8.23
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  {
36  return self::SPECIFIC_QUESTION_TABLE_NAME;
37  }
38 
39  protected function buildAnswerOptionLabel(int $index, $answer): string
40  {
41  $label = array();
42 
43  if (strlen($answer->getImage())) {
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 (strlen($answer->getAnswertext())) {
54  $label[] = $answer->getAnswertext();
55  }
56 
57  return implode('<br />', $label);
58  }
59 }
$index
Definition: metadata.php:145
const SPECIFIC_QUESTION_TABLE_NAME
table name for specific feedback