diff --git a/components/ILIAS/DataCollection/classes/Table/class.ilDclTable.php b/components/ILIAS/DataCollection/classes/Table/class.ilDclTable.php index fff19ffa5b83..96ef87d16265 100755 --- a/components/ILIAS/DataCollection/classes/Table/class.ilDclTable.php +++ b/components/ILIAS/DataCollection/classes/Table/class.ilDclTable.php @@ -18,7 +18,9 @@ declare(strict_types=1); -use ILIAS\Modules\DataCollection\Fields\Formula\FormulaParser\Token\Tokenizer; + +use ILIAS\Modules\DataCollection\Fields\Formula\FormulaParser\Math\Functions; +use ILIAS\Modules\DataCollection\Fields\Formula\FormulaParser\Math\Operators; class ilDclTable { @@ -530,7 +532,11 @@ public function getFirstTableViewId(int $ref_id, int $user_id = 0, bool $with_de */ public function getFieldsForFormula(): array { - $syntax_chars = array_merge(Tokenizer::$operators, Tokenizer::$functions, ['(', ')', ',']); + $syntax_chars = array_merge( + array_map(static fn(Operators $function): string => $function->value, Operators::cases()), + array_map(static fn(Functions $function): string => $function->value, Functions::cases()), + ['(', ')', ','] + ); foreach ($this->getFields() as $field) { if (in_array($field->getDatatypeId(), ilDclFormulaFieldModel::SUPPORTED_FIELDS)) { foreach ($syntax_chars as $element) {