def is_eligible_to_create_modification_proposal(learning_unit_year, person): return conjunction(_any_existing_proposal_in_epc, negation(is_learning_unit_year_in_past), negation(is_learning_unit_year_a_partim), _is_container_type_course_dissertation_or_internship, negation(is_learning_unit_year_in_proposal), is_person_linked_to_entity_in_charge_of_learning_unit)( learning_unit_year, person)
def is_eligible_for_modification_end_date(learning_unit_year, person): return conjunction( _any_existing_proposal_in_epc, negation(is_learning_unit_year_in_past), is_eligible_for_modification, _is_person_eligible_to_modify_end_date_based_on_container_type )(learning_unit_year, person)
def is_not_container_type_course_dissertation_or_internship(learning_unit_year, person, raise_exception): result = negation(_is_container_type_course_dissertation_or_internship(learning_unit_year, person, raise_exception)) can_raise_exception( raise_exception, result, _("This learning unit is not eligible for proposal creation/modification") ) return result
def is_not_container_type_course_dissertation_or_internship( learning_unit_year, person, raise_exception): result = negation( _is_container_type_course_dissertation_or_internship( learning_unit_year, person, raise_exception)) can_raise_exception( raise_exception, result, _("This learning unit is not eligible for proposal creation/modification" )) return result
def _is_person_eligible_to_modify_end_date_based_on_container_type(learning_unit_year, person, raise_exception=False): result = disjunction( _is_person_central_manager, _is_learning_unit_year_a_partim, negation(_is_container_type_course_dissertation_or_internship2), )(learning_unit_year, person, raise_exception) can_raise_exception( raise_exception, result, MSG_NO_ELIGIBLE_TO_MODIFY_END_DATE, ) return result
def _is_person_eligible_to_modify_end_date_based_on_container_type( learning_unit_year, person, raise_exception=False): result = disjunction( _is_person_central_manager, _is_learning_unit_year_a_partim, negation(_is_container_type_course_dissertation_or_internship2), )(learning_unit_year, person, raise_exception) can_raise_exception( raise_exception, result, MSG_NO_ELIGIBLE_TO_MODIFY_END_DATE, ) return result
def _is_person_eligible_to_modify_end_date_based_on_container_type(learning_unit_year, person): return disjunction( _is_person_central_manager, _is_learning_unit_year_a_partim, negation(_is_container_type_course_dissertation_or_internship) )(learning_unit_year, person)