Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Teacher


        @Override
        public Object provide(Object source, Object currentValue) {
            ChooseDegreeBean bean = (ChooseDegreeBean) source;

            Teacher teacher = Authenticate.getUser().getPerson().getTeacher();
            return ((MobilityApplicationProcess) bean.getCandidacyProcess()).getDegreesAssociatedToTeacherAsCoordinator(teacher);
        }
View Full Code Here


    private String getTeacherName(final Summary summary) {
        final Professorship professorship = summary.getProfessorship();
        if (professorship != null) {
            return professorship.getPerson().getName();
        }
        final Teacher teacher = summary.getTeacher();
        if (teacher != null) {
            return teacher.getPerson().getName();
        }
        return summary.getTeacherName();
    }
View Full Code Here

    private String getTeacherId(Summary summary) {
        final Professorship professorship = summary.getProfessorship();
        if (professorship != null) {
            return professorship.getPerson().getUsername();
        }
        final Teacher teacher = summary.getTeacher();
        if (teacher != null) {
            return teacher.getPerson().getUsername();
        }
        return null;
    }
View Full Code Here

public class ReadDetailedTeacherProfessorshipsByExecutionYear extends ReadDetailedTeacherProfessorshipsAbstractService {

    protected List run(String teacherID, String executionYearID) throws FenixServiceException {

        final Teacher teacher = FenixFramework.getDomainObject(teacherID);
        if (teacher == null) {
            throw new DomainException("error.noTeacher");
        }

        final ExecutionYear executionYear;
        if (Strings.isNullOrEmpty(executionYearID)) {
            executionYear = ExecutionYear.readCurrentExecutionYear();
        } else {
            executionYear = FenixFramework.getDomainObject(executionYearID);
        }

        final List<Professorship> responsibleFors = new ArrayList();
        for (final Professorship professorship : teacher.responsibleFors()) {
            if (professorship.getExecutionCourse().getExecutionPeriod().getExecutionYear() == executionYear) {
                responsibleFors.add(professorship);
            }
        }
        return getDetailedProfessorships(teacher.getProfessorships(executionYear), responsibleFors);
    }
View Full Code Here

        return detailedProfessorshipList;
    }

    protected Teacher readTeacher(String teacherId) throws NotFoundTeacher {
        final Teacher teacher = FenixFramework.getDomainObject(teacherId);
        if (teacher == null) {
            throw new NotFoundTeacher();
        }
        return teacher;
    }
View Full Code Here

public class ReadLecturedExecutionCoursesByTeacherIDAndExecutionYearIDAndDegreeType {

    public List<ExecutionCourse> run(String teacherID, String executionYearID, DegreeType degreeType)
            throws FenixServiceException {

        Teacher teacher = FenixFramework.getDomainObject(teacherID);

        List<ExecutionCourse> lecturedExecutionCourses;

        if (executionYearID == null) {
            lecturedExecutionCourses = teacher.getAllLecturedExecutionCourses();

        } else {
            ExecutionYear executionYear = FenixFramework.getDomainObject(executionYearID);
            lecturedExecutionCourses = teacher.getLecturedExecutionCoursesByExecutionYear(executionYear);
        }

        List<ExecutionCourse> result;

        if (degreeType == DegreeType.DEGREE) {
View Full Code Here

                            if (checkExecutionYear(getExecutionYear(), curricularCourse)) {
                                for (final ExecutionCourse executionCourse : curricularCourse.getAssociatedExecutionCoursesSet()) {
                                    if (checkExecutionYear(getExecutionYear(), executionCourse)) {
                                        for (final Professorship professorship : executionCourse.getProfessorshipsSet()) {
                                            if (professorship.hasTeacher()) {
                                                final Teacher teacher = professorship.getTeacher();
                                                final Row row = spreadsheet.addRow();
                                                setDegreeCells(row, degree);
                                                row.setCell(curricularCourse.getName());
                                                row.setCell(executionCourse.getExternalId());
                                                row.setCell(teacher.getPerson().getUsername());
                                                row.setCell(String.valueOf(executionCourse.getOid()));
                                            }
                                        }
                                    }
                                }
View Full Code Here

    public ActionForward prepareEditProgram(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        final ExecutionCourse executionCourse = (ExecutionCourse) request.getAttribute("executionCourse");

        final Teacher teacher = getUserView(request).getPerson().getTeacher();
        if (teacher.isResponsibleFor(executionCourse) == null) {
            ActionMessages messages = new ActionMessages();
            messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.teacherNotResponsibleOrNotCoordinator"));
            saveErrors(request, messages);
            return forward(request, "/teacher/executionCourse/program.jsp");
        }
View Full Code Here

    public ActionForward prepareEditObjectives(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        final ExecutionCourse executionCourse = (ExecutionCourse) request.getAttribute("executionCourse");

        final Teacher teacher = getUserView(request).getPerson().getTeacher();
        if (teacher.isResponsibleFor(executionCourse) == null) {
            ActionMessages messages = new ActionMessages();
            messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.teacherNotResponsibleOrNotCoordinator"));
            saveErrors(request, messages);
            return forward(request, "/teacher/executionCourse/objectives.jsp");
        }
View Full Code Here

                throw new FenixActionException("label.invalid.username");
            }
            final Person person = user.getPerson();

            if (person.getTeacher() == null) {
                new Teacher(person);
            }
            return TeacherAuthorization.createOrUpdate(person.getTeacher(), getDepartment(), getExecutionSemester(),
                    getTeacherCategory(), false, getLessonHours());
        }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.Teacher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.