Examples of Teacher


Examples of org.fenixedu.academic.domain.Teacher

public class TeacherIdStringInputRenderer extends StringInputRenderer {

    @Override
    protected HtmlComponent createTextField(Object object, Class type) {

        Teacher teacher = (Teacher) object;
        String number = teacher.getPerson().getUsername();

        HtmlFormComponent formComponent = (HtmlFormComponent) super.createTextField(number, type);
        formComponent.setConverter(new TeacherNumberConverter());

        return formComponent;
View Full Code Here

Examples of org.fenixedu.academic.domain.Teacher

        Iterator iter = teachers.iterator();

        List professorships = new ArrayList();
        List responsibleFors = new ArrayList();
        while (iter.hasNext()) {
            Teacher teacher = (Teacher) iter.next();
            Collection teacherProfessorships = null;
            if (executionYear == null) {
                teacherProfessorships = teacher.getProfessorships();
            } else {
                if (semester.intValue() == 0) {
                    teacherProfessorships = teacher.getProfessorships(executionYear);
                } else {
                    teacherProfessorships = teacher.getProfessorships(executionSemester);
                }
            }
            if (teacherProfessorships != null) {
                professorships.addAll(teacherProfessorships);
            }

            List teacherResponsibleFors;
            List<Professorship> teacherResponsibleForsAux = null;

            if (executionYear == null) {
                teacherResponsibleFors = teacher.responsibleFors();
            } else {
                teacherResponsibleForsAux = teacher.responsibleFors();
                teacherResponsibleFors = new ArrayList<Professorship>();
                for (Professorship professorship : teacherResponsibleForsAux) {
                    if (professorship.getExecutionCourse().getExecutionPeriod().getExecutionYear().equals(executionYear)) {
                        teacherResponsibleFors.add(professorship);
                    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Teacher

    }

    private PhdParticipantBean getInternalPhdParticipantBean(final PhdIndividualProgramProcess individualProcess) {
        final PhdParticipantBean participantBean = new PhdParticipantBean();
        participantBean.setIndividualProgramProcess(individualProcess);
        final Teacher teacher = User.findByUsername(getGuidingBean().getTeacherId()).getPerson().getTeacher();

        if (teacher == null) {
            throw new PhdMigrationGuidingNotFoundException("The guiding is not present in the system as a teacher");
        }

        for (PhdParticipant existingParticipant : individualProcess.getParticipantsSet()) {
            if (!existingParticipant.isInternal()) {
                continue;
            }

            final InternalPhdParticipant existingInternalParticipant = (InternalPhdParticipant) existingParticipant;
            final Person existingInternalPerson = existingInternalParticipant.getPerson();

            if (teacher.getPerson() == existingInternalPerson) {
                // The guider is already associated with the process
                participantBean.setInternalParticipant(teacher.getPerson());
                participantBean.setParticipant(existingParticipant);
                participantBean.setParticipantSelectType(PhdParticipantSelectType.EXISTING);

                return participantBean;
            }
        }

        // The guiding is in the system as teacher, but not yet associated with
        // the process
        participantBean.setParticipantSelectType(PhdParticipantSelectType.NEW);
        participantBean.setInternalParticipant(teacher.getPerson());
        participantBean.setInstitution(getInstitution());
        participantBean.setWorkLocation(getInstitution());
        return participantBean;
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Teacher

        return getPerson(getProcessBean().getAssistantGuiderId());
    }

    public Person getPerson(String identification) {
        Teacher teacher = User.findByUsername(identification).getPerson().getTeacher();

        if (teacher == null) {
            throw new PersonNotFoundException();
        }

        return teacher.getPerson();
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Teacher

            addCellValue(row, onNullEmptyString(null), 6);
            addCellValue(row, onNullEmptyString(null), 7);
            addCellValue(row, onNullEmptyString(null), 8);
        } else {
            InternalPhdParticipant internalPhdParticipant = (InternalPhdParticipant) phdParticipant;
            Teacher teacher = internalPhdParticipant.getTeacher();

            addCellValue(row, onNullEmptyString(teacher.getTeacherId()), 6);
            Department department = internalPhdParticipant.getDepartment();

            addCellValue(row, onNullEmptyString(department != null ? department.getCode() : ""), 7);
            addCellValue(row, onNullEmptyString(department != null ? department.getName() : ""), 8);
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.Teacher

                }
                final Department department = searchParameters.getDepartment();
                if (department != null) {
                    for (final Iterator<Person> peopleIterator = persons.iterator(); peopleIterator.hasNext();) {
                        final Person person = peopleIterator.next();
                        final Teacher teacher = person.getTeacher();
                        if (teacher == null || teacher.getDepartment() != department) {
                            peopleIterator.remove();
                        }
                    }
                }
            }
View Full Code Here

Examples of org.fenixedu.academic.domain.Teacher

                    }
                    final Department department = searchParameters.getDepartment();
                    if (department != null) {
                        for (final Iterator<Person> peopleIterator = persons.iterator(); peopleIterator.hasNext();) {
                            final Person person = peopleIterator.next();
                            final Teacher teacher = person.getTeacher();
                            if (teacher == null || teacher.getDepartment() != department) {
                                peopleIterator.remove();
                            }
                        }
                    }
                }
View Full Code Here

Examples of org.fenixedu.academic.domain.Teacher

            return false;
        }

        boolean result = false;
        final BibliographicReference bibliographicReference = FenixFramework.getDomainObject(bibliographicReferenceID);
        final Teacher teacher = Teacher.readTeacherByUsername(id.getUsername());

        if (bibliographicReference != null && teacher != null) {
            final ExecutionCourse executionCourse = bibliographicReference.getExecutionCourse();
            final Iterator associatedProfessorships = teacher.getProfessorshipsIterator();
            // Check if Teacher has a professorship to ExecutionCourse
            // BibliographicReference
            while (associatedProfessorships.hasNext()) {
                Professorship professorship = (Professorship) associatedProfessorships.next();
                if (professorship.getExecutionCourse().equals(executionCourse)) {
View Full Code Here

Examples of org.fenixedu.academic.domain.Teacher

    private boolean lecturesExecutionCourse(User id, String executionCourseID) {
        if (executionCourseID == null) {
            return false;
        }
        try {
            Teacher teacher = Teacher.readTeacherByUsername(id.getUsername());
            Professorship professorship = null;
            if (teacher != null) {
                ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseID);
                professorship = teacher.getProfessorshipByExecutionCourse(executionCourse);
            }
            return professorship != null;

        } catch (Exception e) {
            return false;
View Full Code Here

Examples of org.fenixedu.academic.domain.Teacher

        if (executionCourseID == null) {
            return false;
        }
        try {

            Teacher teacher = Teacher.readTeacherByUsername(id.getUsername());
            Professorship professorship = null;
            if (teacher != null) {
                ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseID);
                teacher.getProfessorshipByExecutionCourse(executionCourse);
            }
            return professorship != null;

        } catch (Exception e) {
            return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.