ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAssLacCompositeEvaluator Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilAssLacCompositeEvaluator:

Public Member Functions

 __construct ($object_loader, $activeId, $pass)
 
 evaluate (ilAssLacAbstractComposite $composite)
 

Protected Attributes

 $object_loader
 
 $activeId
 
 $pass
 

Private Member Functions

 isInstanceOfAnswerIndexProvidingExpression (ilAssLacAbstractComposite $composite)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class CompositeEvaluator

Date: 07.01.14 Time: 13:27

Author
Thomas Joußen tjous.nosp@m.sen@.nosp@m.datab.nosp@m.ay.d.nosp@m.e

Definition at line 25 of file ilAssLacCompositeEvaluator.php.

Constructor & Destructor Documentation

◆ __construct()

ilAssLacCompositeEvaluator::__construct (   $object_loader,
  $activeId,
  $pass 
)
Parameters
ilAssLacQuestionProvider$object_loader
$activeId
$pass

Definition at line 47 of file ilAssLacCompositeEvaluator.php.

References $activeId, $object_loader, and $pass.

Member Function Documentation

◆ evaluate()

ilAssLacCompositeEvaluator::evaluate ( ilAssLacAbstractComposite  $composite)
Parameters
ilAssLacAbstractComposite$composite
Returns
bool

Definition at line 59 of file ilAssLacCompositeEvaluator.php.

References $index, ILIAS\LTI\ToolProvider\$key, CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, ILIAS\Repository\int(), and isInstanceOfAnswerIndexProvidingExpression().

60  {
61  if (count($composite->nodes) > 0) {
62  $composite->nodes[0] = $this->evaluate($composite->nodes[0]);
63  $composite->nodes[1] = $this->evaluate($composite->nodes[1]);
64  $composite = $this->evaluateSubTree($composite);
65  }
66  return $composite;
67  }
evaluate(ilAssLacAbstractComposite $composite)
+ Here is the call graph for this function:

◆ isInstanceOfAnswerIndexProvidingExpression()

ilAssLacCompositeEvaluator::isInstanceOfAnswerIndexProvidingExpression ( ilAssLacAbstractComposite  $composite)
private
Parameters
ilAssLacAbstractComposite$composite
Returns
bool

Definition at line 213 of file ilAssLacCompositeEvaluator.php.

Referenced by evaluate().

213  : bool
214  {
215  if ($composite->nodes[0] instanceof ilAssLacResultOfAnswerOfQuestionExpression) {
216  return true;
217  }
218 
219  if ($composite->nodes[0] instanceof ilAssLacResultOfAnswerOfCurrentQuestionExpression) {
220  return true;
221  }
222 
223  return false;
224  }
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...
+ Here is the caller graph for this function:

Field Documentation

◆ $activeId

ilAssLacCompositeEvaluator::$activeId
protected

Definition at line 35 of file ilAssLacCompositeEvaluator.php.

Referenced by __construct().

◆ $object_loader

ilAssLacCompositeEvaluator::$object_loader
protected

Definition at line 30 of file ilAssLacCompositeEvaluator.php.

Referenced by __construct().

◆ $pass

ilAssLacCompositeEvaluator::$pass
protected

Definition at line 40 of file ilAssLacCompositeEvaluator.php.

Referenced by __construct().


The documentation for this class was generated from the following file: