Пример #1
0
  @Atomic
  public static void remove(final ThesisEvaluationParticipant thesisEvaluationParticipant) {
    final Thesis thesis = thesisEvaluationParticipant.getThesis();
    if (!AccessControl.getPerson().hasRole(RoleType.SCIENTIFIC_COUNCIL)) {
      thesis.checkIsScientificCommission();
    }
    final ThesisParticipationType type = thesisEvaluationParticipant.getType();
    thesisEvaluationParticipant.delete();

    if (!thesis.isCreditsDistributionNeeded()) {
      thesis.setCoorientatorCreditsDistribution(null);
    }
  }
Пример #2
0
  @Atomic
  public static void add(
      final Thesis thesis,
      final ThesisParticipationType thesisParticipationType,
      final Person person) {
    if (person != null) {
      if (!AccessControl.getPerson().hasRole(RoleType.SCIENTIFIC_COUNCIL)) {
        thesis.checkIsScientificCommission();
      }

      new ThesisEvaluationParticipant(thesis, person, thesisParticipationType);

      if (!thesis.isCreditsDistributionNeeded()) {
        thesis.setCoorientatorCreditsDistribution(null);
      }
    }
  }