def is_person_linked_to_entity_in_charge_of_lu(learning_unit_year, person, raise_exception=False): result = False if person: result = is_person_linked_to_entity_in_charge_of_learning_unit( learning_unit_year, person, raise_exception) can_raise_exception(raise_exception, result, MSG_ONLY_IF_YOUR_ARE_LINK_TO_ENTITY) return result
def is_person_linked_to_entity_in_charge_of_lu(learning_unit_year, person, raise_exception=False): result = False if person: result = is_person_linked_to_entity_in_charge_of_learning_unit(learning_unit_year, person, raise_exception) can_raise_exception( raise_exception, result, MSG_ONLY_IF_YOUR_ARE_LINK_TO_ENTITY ) return result
def is_eligible_to_create_modification_proposal(learning_unit_year, person, raise_exception=False): result = \ _any_existing_proposal_in_epc(learning_unit_year, person, raise_exception) and \ not(is_learning_unit_year_in_past(learning_unit_year, person, raise_exception))and \ not(is_learning_unit_year_a_partim(learning_unit_year, person, raise_exception))and \ _is_container_type_course_dissertation_or_internship(learning_unit_year, person, raise_exception)and \ not(is_learning_unit_year_in_proposal(learning_unit_year, person, raise_exception))and \ is_person_linked_to_entity_in_charge_of_learning_unit(learning_unit_year, person, raise_exception) and \ is_external_learning_unit_cograduation(learning_unit_year, person, raise_exception) # TODO detail why button is disabled can_raise_exception( raise_exception, result, MSG_NOT_ELIGIBLE_TO_CREATE_MODIFY_PROPOSAL ) return result
def is_eligible_to_create_modification_proposal(learning_unit_year, person, raise_exception=False): result = \ _any_existing_proposal_in_epc(learning_unit_year, person, raise_exception) and \ not(is_learning_unit_year_in_past(learning_unit_year, person, raise_exception))and \ not(is_learning_unit_year_a_partim(learning_unit_year, person, raise_exception))and \ _is_container_type_course_dissertation_or_internship(learning_unit_year, person, raise_exception)and \ not(is_learning_unit_year_in_proposal(learning_unit_year, person, raise_exception))and \ is_person_linked_to_entity_in_charge_of_learning_unit(learning_unit_year, person, raise_exception) and \ is_external_learning_unit_cograduation(learning_unit_year, person, raise_exception) # TODO detail why button is disabled can_raise_exception(raise_exception, result, MSG_NOT_ELIGIBLE_TO_CREATE_MODIFY_PROPOSAL) return result