25 include_once
'Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Factory/ilAssLacOperationManufacturer.php';
26 include_once
'Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Factory/ilAssLacExpressionManufacturer.php';
36 if($nodes[
'type'] ==
'group')
38 foreach($nodes[
'nodes'] as $key => $child)
40 $nodes[
'nodes'][$key] = $this->
create($child);
43 foreach($this->operators as $next_operator)
47 for($i = 0; $i < count($nodes[
'nodes']); $i++)
49 if(!is_object($nodes[
'nodes'][$i]) && $nodes[
'nodes'][$i][
'type'] ==
'operator' && $nodes[
'nodes'][$i][
'value'] == $next_operator)
58 $operator = $operation_manufacture->manufacture($nodes[
'nodes'][$index][
'value']);
60 $operator->setNegated($nodes[
"negated"]);
64 $new_nodes = array_slice($nodes[
'nodes'], 0, $index - 1);
65 $new_nodes[] = $operator;
66 $nodes[
'nodes'] = array_merge($new_nodes, array_slice($nodes[
'nodes'], $index + 2));
70 return $nodes[
'nodes'][0];
88 $expression = $node[
'nodes'][$index];
91 $expression = $manufacturer->manufacture($node[
'nodes'][$index][
'value']);
__construct()
Construct requirements.
static _getInstance()
Get an Instance of ExpressionManufacturer.
Create styles array
The data for the language used.
static _getInstance()
Get an Instance of OperationManufacturer.
getExpression(array $node, $index)
Manufacure an expression from the delivered node and the index.