Package org.fenixedu.academic.domain.student

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


                checkConditions ? verifyConditionsToCreateInsuranceEvent(studentCurricularPlan, executionYear) : InvocationResult
                        .createSuccess();

        if (result.isSuccess()) {

            final Student student = studentCurricularPlan.getRegistration().getStudent();

            if (student.getPerson().hasInsuranceEventOrAdministrativeOfficeFeeInsuranceEventFor(executionYear)) {
                result.addMessage(LabelFormatter.APPLICATION_RESOURCES,
                        "error.accounting.events.AccountingEventsManager.student.already.has.insurance.event.for.year", student
                                .getNumber().toString(), executionYear.getYear());

                result.setSuccess(false);

                return result;
View Full Code Here


    public boolean hasAnyActiveRegistrationWithFirstCycleAffinity() {
        final CycleCurriculumGroup firstCycle = getFirstCycle();
        if (firstCycle == null) {
            return false;
        }
        final Student student = getRegistration().getStudent();
        for (final CycleCourseGroup affinity : getCycleCourseGroup(firstCycle.getCycleType()).getDestinationAffinitiesSet()) {
            if (student.hasActiveRegistrationFor(affinity.getParentDegreeCurricularPlan())) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

                    }
                }
            }
        } else {
            if (studentNumber != null) {
                Student student = Student.readStudentByNumber(studentNumber);
                if (student != null && matchDocumentIdNumber(student.getPerson(), documentIdNumber)) {
                    for (Registration registration : student.getRegistrationsSet()) {
                        if (registration.isConcluded()) {
                            resultRegistrations.add(registration);
                        }
                    }
                }
View Full Code Here

    }

    @Override
    public Object provide(Object source, Object current) {
        ChooseRegistrationOrPhd chooseRegistrationOrPhd = (ChooseRegistrationOrPhd) source;
        Student student = chooseRegistrationOrPhd.getStudent();
        Set<PhdRegistrationWrapper> phdRegistrationWrapperResult = new HashSet<PhdRegistrationWrapper>();
        ExecutionYear currentExecutionYear = ExecutionYear.readCurrentExecutionYear();

        for (final PhdIndividualProgramProcess phdProcess : student.getPerson().getPhdIndividualProgramProcessesSet()) {
            if (!phdProcess.isAllowedToManageProcess(Authenticate.getUser())) {
                continue;
            }
            if ((phdProcess.isProcessActive() && student.hasValidInsuranceEvent())) {
                phdRegistrationWrapperResult.add(new PhdRegistrationWrapper(phdProcess));
            } else if (phdProcess.isConcluded()) {
                ExecutionYear conclusionYear = phdProcess.getConclusionYear();
                if (matchesRecentExecutionYear(currentExecutionYear, conclusionYear)) {
                    phdRegistrationWrapperResult.add(new PhdRegistrationWrapper(phdProcess));
                }
            }
        }
        for (Registration registration : student.getActiveRegistrations()) {
            if (!registration.getDegreeType().isEmpty() && registration.isAllowedToManageRegistration()) {
                phdRegistrationWrapperResult.add(new PhdRegistrationWrapper(registration));
            }
        }

        for (Registration registration : student.getConcludedRegistrations()) {
            if (!registration.getDegreeType().isEmpty() && registration.isBolonha()
                    && registration.isAllowedToManageRegistration()) {
                RegistrationConclusionBean conclusionBean = null;
                CycleType cycleType = registration.getDegreeType().getLastOrderedCycleType();
                if (cycleType != null) {
View Full Code Here

            }
        }
    }

    public void fillEnrolments(final Person person, List<FenixEnrolment> enrolments, ExecutionSemester executionSemester) {
        final Student foundStudent = person.getStudent();

        for (Registration registration : foundStudent.getAllRegistrations()) {
            for (Enrolment enrolment : registration.getEnrolments(executionSemester)) {
                final ExecutionCourse executionCourse = enrolment.getExecutionCourseFor(executionSemester);
                String grade = enrolment.getGrade().getValue();
                double ects = enrolment.getEctsCredits();
                enrolments.add(new FenixEnrolment(executionCourse, grade, ects));
View Full Code Here

    @Produces(JSON_UTF8)
    public List<FenixCourseEvaluation.WrittenEvaluation> evaluations(@Context HttpServletResponse response,
            @Context HttpServletRequest request, @Context ServletContext context) {

        Person person = getPerson();
        final Student student = person.getStudent();
        if (!person.hasRole(RoleType.STUDENT) || student == null) {
            return new ArrayList<FenixCourseEvaluation.WrittenEvaluation>();
        }

        new JerseyFacesContext(context, request, response);
View Full Code Here

    private byte[] createAcademicAdminProcessSheet(Person person) {
        @SuppressWarnings("rawtypes")
        HashMap map = new HashMap();

        try {
            final Student student = person.getStudent();
            final Registration registration = findRegistration(student);

            map.put("executionYear", ExecutionYear.readCurrentExecutionYear().getYear());
            if (registration != null) {
                map.put("course", registration.getDegree().getNameI18N().toString());
            }
            map.put("studentNumber", student.getNumber().toString());
            map.put("fullName", person.getName());

            try {
                map.put("photo", new ByteArrayInputStream(person.getPersonalPhotoEvenIfPending().getDefaultAvatar()));
            } catch (Exception e) {
View Full Code Here

        } else if (searchParameters.getDocumentIdNumber() != null && searchParameters.getDocumentIdNumber().length() > 0) {
            persons = Person.findPersonByDocumentID(searchParameters.getDocumentIdNumber());

        } else if (searchParameters.getStudentNumber() != null) {

            final Student student = Student.readStudentByNumber(searchParameters.getStudentNumber());
            persons = new ArrayList<Person>();
            if (student != null) {
                persons.add(student.getPerson());
            }

        } else if (searchParameters.getEmail() != null && searchParameters.getEmail().length() > 0) {

            final Person person = Person.readPersonByEmailAddress(searchParameters.getEmail());
View Full Code Here

        }

        person.setSocialSecurityNumber(contributorNumber);

        if (person.getStudent() == null) {
            new Student(person);
        }

        RoleType.grant(RoleType.CANDIDATE, person.getUser());
        RoleType.grant(RoleType.PERSON, person.getUser());
View Full Code Here

            if (searchParameters.getDocumentIdNumber() != null && searchParameters.getDocumentIdNumber().length() > 0) {
                persons.addAll(Person.findPersonByDocumentID(searchParameters.getDocumentIdNumber()));
            }
            if (searchParameters.getStudentNumber() != null) {
                final Student student = Student.readStudentByNumber(searchParameters.getStudentNumber());
                if (student != null) {
                    persons.add(student.getPerson());
                }

            }
            if (searchParameters.getEmail() != null && searchParameters.getEmail().length() > 0) {
                final Person person = Person.readPersonByEmailAddress(searchParameters.getEmail());
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.