ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilAssLacAnswerOfQuestionExpression.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{
15
29// public static $pattern = '/Q[0-9]+([^\[|0-9]|$)/';
30 public static $pattern = '/(Q\d+)(?=\=|<|>|\s|$)/';
31
35 public static $identifier = "Qn";
36
42 protected $question_index;
43
51 protected function setMatches($matches)
52 {
53 $this->question_index = $matches[0][0];
54 }
55
61 public function getQuestionIndex()
62 {
64 }
65
70 public function getValue()
71 {
72 return "Q" . $this->question_index;
73 }
74
79 public function getDescription()
80 {
81 return "Frage " . $this->question_index . " ";
82 }
83
88 protected function getPattern()
89 {
90 return '/-?[0-9]+/';
91 }
92}
Class AnswerOfQuestionExpression for the expression Qn.
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.
getDescription()
Get a human readable description of the Composite element.