ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAssLacResultOfAnswerOfQuestionExpression.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{
27 public static $pattern = "/Q[0-9]+\\[[0-9]+\\]/";
28
32 public static $identifier = "Qn[m]";
33
39 protected $question_index;
40
46 protected $answer_index;
47
52 public function getPattern()
53 {
54 return '/(\d+)\[(\d+)\]/';
55 }
56
64 protected function setMatches($matches)
65 {
66 $this->question_index = $matches[1][0];
67 $this->answer_index = $matches[2][0];
68 }
69
73 public function getQuestionIndex()
74 {
76 }
77
81 public function getAnswerIndex()
82 {
84 }
85
90 public function getValue()
91 {
92 return "Q" . $this->question_index . '[' . $this->answer_index . ']';
93 }
94
99 public function getDescription()
100 {
101 return "Frage " . $this->question_index . " mit Anwort " . $this->answer_index . " beantwortet ";
102 }
103}
An exception for terminatinating execution or to throw for unit testing.
Class ResultOfAnswerOfQuestion for the expression Qn[m].
getDescription()
Get a human readable description of the Composite element.
setMatches($matches)
Sets the result of the parsed value by a specific expression pattern.
getPattern()
Get the Pattern to match relevant informations for an Expression.