IDegreeModuleToEvaluate sourceDegreeModuleToEvaluate, EnrolmentContext enrolmentContext) {
final SeniorStatuteSpecialSeasonEnrolmentScope seniorStatuteSpecialSeasonEnrolmentScope =
(SeniorStatuteSpecialSeasonEnrolmentScope) curricularRule;
final Enrolment enrolment = seniorStatuteSpecialSeasonEnrolmentScope.getEnrolment();
final Registration registration = seniorStatuteSpecialSeasonEnrolmentScope.getRegistration();
final DegreeModule degreeModule = enrolment.getDegreeModule();
if (enrolment.getDegreeCurricularPlanOfDegreeModule() != enrolment.getDegreeCurricularPlanOfStudent()
&& enrolment.getRegistration() == registration) {
if (enrolmentContext.isResponsiblePersonStudent()) {
return RuleResult.createFalse(sourceDegreeModuleToEvaluate.getDegreeModule(),
"curricularRules.ruleExecutors.SeniorStatuteSpecialSeasonEnrolmentScope.enrolment.out.of.senior.scope",
degreeModule.getName());
} else {
return RuleResult.createWarning(sourceDegreeModuleToEvaluate.getDegreeModule(),
"curricularRules.ruleExecutors.SeniorStatuteSpecialSeasonEnrolmentScope.enrolment.out.of.senior.scope",
degreeModule.getName());
}
}
return RuleResult.createTrue(sourceDegreeModuleToEvaluate.getDegreeModule());