ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
26 public static $pattern = "/Q[0-9]+\\[[0-9]+\\]/";
27
31 public static $identifier = "Qn[m]";
32
38 protected $question_index;
39
45 protected $answer_index;
46
51 public function getPattern()
52 {
53 return '/(\d+)\[(\d+)\]/';
54 }
55
63 protected function setMatches($matches)
64 {
65 $this->question_index = $matches[1][0];
66 $this->answer_index = $matches[2][0];
67 }
68
72 public function getQuestionIndex()
73 {
75 }
76
80 public function getAnswerIndex()
81 {
83 }
84
89 public function getValue()
90 {
91 return "Q" . $this->question_index . '[' . $this->answer_index . ']';
92 }
93
98 public function getDescription()
99 {
100 return "Frage " . $this->question_index . " mit Anwort " . $this->answer_index . " beantwortet ";
101 }
102}
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.