@Override
protected RuleResult executeEnrolmentVerificationWithRules(final ICurricularRule curricularRule,
final IDegreeModuleToEvaluate sourceDegreeModuleToEvaluate, final EnrolmentContext enrolmentContext) {
final MaximumNumberOfEctsInStandaloneCurriculumGroup rule =
(MaximumNumberOfEctsInStandaloneCurriculumGroup) curricularRule;
final double total = calculateTotalEctsCredits(enrolmentContext) + calculateApprovedEcts(enrolmentContext);
if (!rule.allowEcts(total)) {
return RuleResult.createFalse(sourceDegreeModuleToEvaluate.getDegreeModule(),
"curricularRules.ruleExecutors.MaximumNumberOfEctsInStandaloneCurriculumGroupExecutor",
String.valueOf(rule.getMaximumEcts()), String.valueOf(total));
}
return RuleResult.createTrue(sourceDegreeModuleToEvaluate.getDegreeModule());
}