1 <?php declare(strict_types=1);
40 $this->log->debug(sprintf(
41 'Evaluating criteria for document "%s" (id: %s) and user "%s" (id: %s)',
44 $this->
user->getLogin(),
48 foreach ($document->
criteria() as $criterionAssignment) {
51 $criterionType = $this->criterionTypeFactory->findByTypeIdent($criterionAssignment->getCriterionId(),
true);
53 $result = $criterionType->evaluate($this->
user, $criterionAssignment->getCriterionValue());
55 $this->log->debug(sprintf(
56 'Criterion of type "%s", configured with %s evaluated: %s',
57 $criterionType->getTypeIdent(),
58 var_export($criterionAssignment->getCriterionValue()->toJson(),
true),
Interface ilTermsOfServiceLogicalAndDocumentCriteriaEvaluation.
evaluate(ilTermsOfServiceSignableDocument $document)
Interface ilTermsOfServiceDocumentCriteriaEvaluation.
__construct(ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory, ilObjUser $user, ilLogger $log)
ilTermsOfServiceDocumentLogicalAndCriteriaEvaluation constructor.
Interface ilTermsOfServiceSignableDocument.
Component logger with individual log levels by component id.
Interface ilTermsOfServiceCriterionTypeFactoryInterface.