ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilAssLacCompositeEvaluator Class Reference

Class CompositeEvaluator. 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

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 10 of file ilAssLacCompositeEvaluator.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 32 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 44 of file ilAssLacCompositeEvaluator.php.

References $result, CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, and isInstanceOfAnswerIndexProvidingExpression().

45  {
46  if(count($composite->nodes) > 0)
47  {
48  $composite->nodes[0] = $this->evaluate($composite->nodes[0]);
49  $composite->nodes[1] = $this->evaluate($composite->nodes[1]);
50  $composite = $this->evaluateSubTree($composite);
51  }
52  return $composite;
53  }
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 206 of file ilAssLacCompositeEvaluator.php.

Referenced by evaluate().

207  {
208  if($composite->nodes[0] instanceof ilAssLacResultOfAnswerOfQuestionExpression)
209  {
210  return true;
211  }
212 
213  if($composite->nodes[0] instanceof ilAssLacResultOfAnswerOfCurrentQuestionExpression)
214  {
215  return true;
216  }
217 
218  return false;
219  }
Class ResultOfAnswerOfCurrentQuestion for the expression R[m].
Class ResultOfAnswerOfQuestion for the expression Qn[m].
+ Here is the caller graph for this function:

Field Documentation

◆ $activeId

ilAssLacCompositeEvaluator::$activeId
protected

Definition at line 20 of file ilAssLacCompositeEvaluator.php.

Referenced by __construct().

◆ $object_loader

ilAssLacCompositeEvaluator::$object_loader
protected

Definition at line 15 of file ilAssLacCompositeEvaluator.php.

Referenced by __construct().

◆ $pass

ilAssLacCompositeEvaluator::$pass
protected

Definition at line 25 of file ilAssLacCompositeEvaluator.php.

Referenced by __construct().


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