ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilAssLacResultOfAnswerOfCurrentQuestionExpression.php
Go to the documentation of this file.
1 <?php
2 
3 include_once "Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Expressions/ilAssLacAbstractExpression.php";
4 require_once "Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Expressions/ilAssLacQuestionExpressionInterface.php";
5 
25  public static $pattern = "/R\\[[0-9]+\\]/";
26 
30  public static $identifier = "R[m]";
31 
37  protected $answer_index;
38 
43  public function getPattern()
44  {
45  return '/\[(\d+)\]/';
46  }
47 
55  protected function setMatches($matches)
56  {
57  $this->answer_index = $matches[1][0];
58  }
59 
63  public function getQuestionIndex()
64  {
65  return null;
66  }
67 
71  public function getAnswerIndex()
72  {
73  return $this->answer_index;
74  }
75 
80  public function getValue()
81  {
82  return 'R[' . $this->answer_index . ']';
83  }
84 
89  public function getDescription()
90  {
91  return "Aktuelle Frage mit Anwort " . $this->answer_index . " beantwortet ";
92  }
93 }
Class ResultOfAnswerOfCurrentQuestion for the expression R[m].
setMatches($matches)
Sets the result of the parsed value by a specific expression pattern.
getDescription()
Get a human readable description of the Composite element.
getPattern()
Get the Pattern to match relevant informations for an Expression.