ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAssLacResultOfAnswerOfCurrentQuestionExpression.php
Go to the documentation of this file.
1<?php
2
3include_once "Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Expressions/ilAssLacAbstractExpression.php";
4require_once "Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Expressions/ilAssLacQuestionExpressionInterface.php";
5
14{
26 public static $pattern = "/R\\[[0-9]+\\]/";
27
31 public static $identifier = "R[m]";
32
38 protected $answer_index;
39
44 public function getPattern()
45 {
46 return '/\[(\d+)\]/';
47 }
48
56 protected function setMatches($matches)
57 {
58 $this->answer_index = $matches[1][0];
59 }
60
64 public function getQuestionIndex()
65 {
66 return null;
67 }
68
72 public function getAnswerIndex()
73 {
75 }
76
81 public function getValue()
82 {
83 return 'R[' . $this->answer_index . ']';
84 }
85
90 public function getDescription()
91 {
92 return "Aktuelle Frage mit Anwort " . $this->answer_index . " beantwortet ";
93 }
94}
An exception for terminatinating execution or to throw for unit testing.
Class ResultOfAnswerOfCurrentQuestion for the expression R[m].
getDescription()
Get a human readable description of the Composite element.
getPattern()
Get the Pattern to match relevant informations for an Expression.
setMatches($matches)
Sets the result of the parsed value by a specific expression pattern.