ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilAssLacEmptyAnswerExpression.php
Go to the documentation of this file.
1 <?php
2 
27 {
28  public static $pattern = '/(\?)/';
29 
30  public static $identifier = "?";
31 
35  protected $matched;
36 
37  protected function getPattern(): string
38  {
39  return '/(\?)/';
40  }
41 
46  public function getValue(): string
47  {
48  return "?";
49  }
50 
55  public function getDescription(): string
56  {
57  return " nicht beantwortet";
58  }
59 
67  public function checkResult($result, $comperator, $index = null): bool
68  {
69  if ($index == null) {
70  switch ($comperator) {
71  case "=":
72  return !$result->hasSolutions();
73  break;
74  case "<>":
75  return $result->hasSolutions();
76  break;
77  default:
78  return false;
79  }
80  } else {
81  $solution = $result->getSolutionForKey($index);
82  switch ($comperator) {
83  case "=":
84  return $solution == null;
85  break;
86  case "<>":
87  return $solution != null;
88  break;
89  default:
90  return false;
91  }
92  }
93  }
94 
102  protected function setMatches($matches): void
103  {
104  $this->matched = true;
105  }
106 }
checkResult($result, $comperator, $index=null)
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...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDescription()
Get a human readable description of the Composite element.
getValue()
Get the value of this Expression.