Beispiel #1
0
  public boolean isTeachingInquiriesToAnswer() {
    final ExecutionCourse executionCourse = this.getExecutionCourse();
    final InquiryResponsePeriod responsePeriod =
        executionCourse
            .getExecutionPeriod()
            .getInquiryResponsePeriod(InquiryResponsePeriodType.TEACHING);
    if (responsePeriod == null
        || !responsePeriod.isOpen()
        || !executionCourse.isAvailableForInquiry()
        || executionCourse.getStudentInquiriesCourseResults().isEmpty()
        || (!isResponsibleFor() && !hasAssociatedLessonsInTeachingServices())) {
      return false;
    }

    return true;
  }
Beispiel #2
0
 public Set<Shift> findAvailableShifts(
     final CurricularYear curricularYear, final ExecutionSemester executionSemester) {
   final DegreeCurricularPlan degreeCurricularPlan = getDegreeCurricularPlan();
   final Set<Shift> shifts = new HashSet<Shift>();
   for (final CurricularCourse curricularCourse : degreeCurricularPlan.getCurricularCoursesSet()) {
     if (curricularCourse.hasScopeInGivenSemesterAndCurricularYearInDCP(
         curricularYear, degreeCurricularPlan, executionSemester)) {
       for (final ExecutionCourse executionCourse :
           curricularCourse.getAssociatedExecutionCoursesSet()) {
         if (executionCourse.getExecutionPeriod() == executionSemester) {
           shifts.addAll(executionCourse.getAssociatedShifts());
         }
       }
     }
   }
   return shifts;
 }