ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAssLacAnswerOfQuestionExpression.php
Go to the documentation of this file.
1<?php
2
27{
41 // public static $pattern = '/Q[0-9]+([^\[|0-9]|$)/';
42 public static $pattern = '/(Q\d+)(?=\=|<|>|\s|$)/';
43
47 public static $identifier = "Qn";
48
54 protected $question_index;
55
63 protected function setMatches($matches): void
64 {
65 $this->question_index = $matches[0][0];
66 }
67
73 public function getQuestionIndex(): int
74 {
76 }
77
82 public function getValue(): string
83 {
84 return "Q" . $this->question_index;
85 }
86
91 public function getDescription(): string
92 {
93 return "Frage " . $this->question_index . " ";
94 }
95
100 protected function getPattern(): string
101 {
102 return '/-?[0-9]+/';
103 }
104}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...