Package org.fenixedu.academic.domain.student

Examples of org.fenixedu.academic.domain.student.Student


        return mapping.findForward("chooseStudent");
    }

    public ActionForward viewStudent(final ActionMapping mapping, final ActionForm actionForm, final HttpServletRequest request,
            final HttpServletResponse response) {
        Student student = getDomainObject(request, "studentId");

        request.setAttribute("student", student);

        return mapping.findForward("viewStudent");
    }
View Full Code Here


    public Set<Student> findStudents() {
        Set<Student> result = new HashSet<Student>();

        if (getNumber() != null) {
            Student studentByNumber = Student.readStudentByNumber(getNumber());
            List<Registration> registrations = Registration.readByNumber(getNumber());

            if (studentByNumber != null) {
                result.add(studentByNumber);
            }
View Full Code Here

        final Object renderedObject = getRenderedObject("student-number-bean");
        if (renderedObject == null) {
            request.setAttribute("studentNumberBean", new StudentNumberBean());
        } else {
            final StudentNumberBean numberBean = (StudentNumberBean) renderedObject;
            final Student student = getStudent(numberBean);
            if (student != null) {
                RenderUtils.invalidateViewState();
                request.setAttribute("registrations", getAllRegistrations(student));
                request.setAttribute("studentNumberBean", numberBean);
            }
View Full Code Here

    public ActionForward showAllStudentCurricularPlans(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final StudentNumberBean studentNumberBean = new StudentNumberBean();
        final Student student = getStudent(request);
        studentNumberBean.setNumber(student.getNumber());

        request.setAttribute("studentNumberBean", studentNumberBean);
        request.setAttribute("registrations", getAllRegistrations(student));

        return mapping.findForward("chooseStudentInformation");
View Full Code Here

        return mapping.findForward("chooseStudent");
    }

    public ActionForward showStudentCurriculum(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        final Student student = getStudent(actionForm);

        if (student == null) {
            addActionMessage(request, "label.coordinator.viewStudentCurriculum.noStudent");
            return mapping.findForward("chooseStudent");
        }

        if (!getDegreeCurricularPlan(actionForm).isBolonhaDegree()) {

            if (!student.hasTransitionRegistrations()) {
                return getOldCurriculumRedirect(actionForm, student);
            }

            request.setAttribute("student", student);
View Full Code Here

    public ActionForward viewCurriculumLineLogs(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final SearchCurriculumLineLog searchCurriculumLineLog = getRenderedObject();
        request.setAttribute("bean", searchCurriculumLineLog);
        Student student = Student.readStudentByNumber(searchCurriculumLineLog.getStudentNumber());

        if (student == null) {
            addActionMessage(request, "exception.student.does.not.exist");
            return mapping.findForward("searchCurriculumLineLogs");
        }

        request.setAttribute("curriculumLineLogs", student.getCurriculumLineLogs(searchCurriculumLineLog.getExecutionPeriod()));
        return mapping.findForward("searchCurriculumLineLogs");
    }
View Full Code Here

        return mapping.findForward("prepare");
    }

    private StudentCandidacy findCandidacy(Integer studentNumber) {
        final Student student = Student.readStudentByNumber(studentNumber);
        final Collection<Registration> registrations = student.getRegistrationsSet();
        if (registrations != null && registrations.size() > 0) {
            return registrations.iterator().next().getStudentCandidacy();
        }
        return null;
    }
View Full Code Here

        @Override
        protected MobilityIndividualApplicationProcess executeActivity(MobilityIndividualApplicationProcess process,
                User userView, Object object) {
            if (process.getPersonalDetails().getPerson().getStudent() == null) {
                new Student(process.getPersonalDetails().getPerson(), null);
                RoleType.grant(RoleType.PERSON, process.getPersonalDetails().getPerson().getUser());
                RoleType.grant(RoleType.CANDIDATE, process.getPersonalDetails().getPerson().getUser());

                if (StringUtils.isEmpty(process.getPersonalDetails().getPerson().getUsername())) {
                    throw new DomainException("error.erasmus.create.user", new String[] { null, "User not created" });
View Full Code Here

    private static Attends findAttend(final ExecutionCourse executionCourse, final String studentNumber,
            final List<DomainException> exceptionList) {

        final List<Attends> activeAttends = new ArrayList<Attends>(2);
        for (final Attends attend : executionCourse.getAttendsSet()) {
            final Student student = attend.getRegistration().getStudent();
            if ((student.getPerson().getUsername().equals(studentNumber) || student.getNumber().toString().equals(studentNumber))
                    && (isActive(attend) || belongsToActiveExternalCycle(attend))) {
                activeAttends.add(attend);
            }
        }
View Full Code Here

    private static boolean belongsToActiveExternalCycle(final Attends attend) {
        if (attend.getEnrolment() != null) {
            final CycleCurriculumGroup cycle = attend.getEnrolment().getParentCycleCurriculumGroup();
            if (cycle != null && cycle.isExternal()) {
                final Student student = attend.getRegistration().getStudent();
                return student.getActiveRegistrationFor(cycle.getDegreeCurricularPlanOfDegreeModule()) != null;
            }
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.student.Student

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.