コード例 #1
0
  public static void editDepartmentOfficeCreditsPeriod(
      ExecutionSemester executionSemester, DateTime begin, DateTime end) {
    TeacherCreditsFillingForDepartmentAdmOfficeCE creditsFillingCE =
        TeacherCreditsFillingForDepartmentAdmOfficeCE
            .getTeacherCreditsFillingForDepartmentAdmOffice(
                executionSemester.getAcademicInterval());

    if (creditsFillingCE == null) {

      AcademicCalendarEntry parentEntry =
          executionSemester.getAcademicInterval().getAcademicCalendarEntry();
      AcademicCalendarRootEntry rootEntry =
          executionSemester.getAcademicInterval().getAcademicCalendar();

      new TeacherCreditsFillingForDepartmentAdmOfficeCE(
          parentEntry,
          new MultiLanguageString(
              BundleUtil.getString(
                  Bundle.APPLICATION, "label.TeacherCreditsFillingCE.entry.title")),
          null,
          begin,
          end,
          rootEntry);

    } else {
      creditsFillingCE.edit(begin, end);
    }
  }
コード例 #2
0
 public static TeacherCreditsFillingCE getValidCreditsPeriod(
     ExecutionSemester executionSemester, User user) {
   if (org.fenixedu.bennu.core.groups.Group.parse("creditsManager").isMember(user)) {
     return TeacherCreditsFillingForDepartmentAdmOfficeCE
         .getTeacherCreditsFillingForDepartmentAdmOffice(executionSemester.getAcademicInterval());
   }
   if (RoleType.TEACHER.isMember(user)) {
     return TeacherCreditsFillingForTeacherCE.getTeacherCreditsFillingForTeacher(
         executionSemester.getAcademicInterval());
   }
   throw new DomainException("invalid.role.type");
 }
  @Override
  public ExecutionDegree getExecutionDegree() {
    if (semester != null && degreeCurricularPlan != null) {
      ExecutionDegree degree =
          degreeCurricularPlan.getExecutionDegreeByAcademicInterval(semester.getAcademicInterval());

      return degree;
    }

    return null;
  }
コード例 #4
0
 public static boolean isInValidTeacherCreditsPeriod(ExecutionSemester executionSemester) {
   TeacherCreditsFillingCE validCreditsPerid =
       TeacherCreditsFillingForTeacherCE.getTeacherCreditsFillingForTeacher(
           executionSemester.getAcademicInterval());
   return validCreditsPerid != null && validCreditsPerid.containsNow();
 }