ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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  {
75  return $this->question_index;
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 }
getValue()
Get the value of this Expression.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setMatches($matches)
Sets the result of the parsed value by a specific expression pattern.
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.
getDescription()
Get a human readable description of the Composite element.