ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilAssMultipleChoiceFeedback.php
Go to the documentation of this file.
1 <?php
2 
28 {
32  public const SPECIFIC_QUESTION_TABLE_NAME = 'qpl_qst_mc';
33 
39  protected function getSpecificQuestionTableName(): string
40  {
41  return self::SPECIFIC_QUESTION_TABLE_NAME;
42  }
43 
44  protected function buildAnswerOptionLabel(int $index, $answer): string
45  {
46  $label = array();
47 
48  if (strlen($answer->getImage())) {
49  if ($this->questionOBJ->getThumbSize()) {
50  $src = $this->questionOBJ->getImagePathWeb() . $this->questionOBJ->getThumbPrefix() . $answer->getImage();
51  } else {
52  $src = $this->questionOBJ->getImagePathWeb() . $answer->getImage();
53  }
54 
55  $label[] = "<img src='{$src}' />";
56  }
57 
58  if (strlen($answer->getAnswertext())) {
59  $label[] = $answer->getAnswertext();
60  }
61 
62  return implode('<br />', $label);
63  }
64 }
const SPECIFIC_QUESTION_TABLE_NAME
table name for specific feedback
$index
Definition: metadata.php:145
getSpecificQuestionTableName()
returns the table name for specific question itself