ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAssLacResultOfAnswerOfCurrentQuestionExpression.php
Go to the documentation of this file.
1 <?php
2 
27 {
39  public static $pattern = "/R\\[[0-9]+\\]/";
40 
44  public static $identifier = "R[m]";
45 
51  protected $answer_index;
52 
57  public function getPattern(): string
58  {
59  return '/\[(\d+)\]/';
60  }
61 
69  protected function setMatches($matches): void
70  {
71  $this->answer_index = $matches[1][0];
72  }
73 
77  public function getQuestionIndex(): ?int
78  {
79  return null;
80  }
81 
85  public function getAnswerIndex(): int
86  {
87  return $this->answer_index;
88  }
89 
94  public function getValue(): string
95  {
96  return 'R[' . $this->answer_index . ']';
97  }
98 
103  public function getDescription(): string
104  {
105  return "Aktuelle Frage mit Anwort " . $this->answer_index . " beantwortet ";
106  }
107 }
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...
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...
getDescription()
Get a human readable description of the Composite element.
getPattern()
Get the Pattern to match relevant informations for an Expression.