ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilAssLacResultOfAnswerOfQuestionExpression.php
Go to the documentation of this file.
1 <?php
2 
27 {
40  public static $pattern = "/Q[0-9]+\\[[0-9]+\\]/";
41 
45  public static $identifier = "Qn[m]";
46 
52  protected $question_index;
53 
59  protected $answer_index;
60 
65  public function getPattern(): string
66  {
67  return '/(\d+)\[(\d+)\]/';
68  }
69 
77  protected function setMatches($matches): void
78  {
79  $this->question_index = $matches[1][0];
80  $this->answer_index = $matches[2][0];
81  }
82 
86  public function getQuestionIndex(): int
87  {
88  return $this->question_index;
89  }
90 
94  public function getAnswerIndex(): int
95  {
96  return $this->answer_index;
97  }
98 
103  public function getValue(): string
104  {
105  return "Q" . $this->question_index . '[' . $this->answer_index . ']';
106  }
107 
112  public function getDescription(): string
113  {
114  return "Frage " . $this->question_index . " mit Anwort " . $this->answer_index . " beantwortet ";
115  }
116 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPattern()
Get the Pattern to match relevant informations for an Expression.
getDescription()
Get a human readable description of the Composite element.
setMatches($matches)
Sets the result of the parsed value by a specific expression pattern.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...