Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Teacher


        return new ArrayList<CompetenceCourse>();
    }

    public Department getPersonDepartment() {
        final Person person = AccessControl.getPerson();
        final Teacher teacher = person == null ? null : person.getTeacher();
        return teacher == null ? null : teacher.getDepartment();
    }
View Full Code Here


    @Override
    public boolean isMember(User user) {
        if (user == null || user.getPerson().getTeacher() == null) {
            return false;
        }
        final Teacher teacher = user.getPerson().getTeacher();
        final Department department = teacher.getDepartment();
        if (department != null) {
            return project.getDeparmentsSet().contains(department);
        }
        return false;
    }
View Full Code Here

    }

    public ActionForward searchTeacherByNumber(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        ErasmusCoordinatorBean bean = getErasmusCoordinatorBean();
        Teacher teacher = Teacher.readByIstId(bean.getTeacherId());

        bean.setTeacher(teacher);
        request.setAttribute("erasmusCoordinatorBean", bean);

        return mapping.findForward("assign-coordinator");
View Full Code Here

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

        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

    }

    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

        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

            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

                }
                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

                    }
                    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

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.