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(), 1),
Interface ilTermsOfServiceLogicalAndDocumentCriteriaEvaluation.
__construct(\ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory, \ilObjUser $user, \ilLogger $log)
ilTermsOfServiceDocumentLogicalAndCriteriaEvaluation constructor.
Interface ilTermsOfServiceDocumentCriteriaEvaluation.
Interface ilTermsOfServiceSignableDocument.
Component logger with individual log levels by component id.
evaluate(\ilTermsOfServiceSignableDocument $document)
Interface ilTermsOfServiceCriterionTypeFactoryInterface.