Package org.fenixedu.academic.domain.student

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


public class BolonhaStudentEnrollmentDispatchAction extends AbstractBolonhaStudentEnrollmentDA {

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

        final Registration registration = (Registration) request.getAttribute("registration");
        request.setAttribute("registration", registration);
        return findForwardForRegistration(mapping, registration);
    }
View Full Code Here


    }

    @Override
    public ActionForward prepare(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {

        final Registration registration = getDomainObject(request, "registrationOid");
        request.setAttribute("registration", registration);
        return prepareShowDegreeModulesToEnrol(mapping, form, request, response, registration.getLastStudentCurricularPlan(),
                ExecutionSemester.readActualExecutionSemester());
    }
View Full Code Here

            final YearMonthDay conclusionDate, BigDecimal average, boolean graduation) {

        final Row row = sheet.addRow();
        final Person graduate = registration.getPerson();
        //List<Registration> registrationPath = getFullRegistrationPath(registration);
        Registration sourceRegistration = registrationPath.iterator().next();
        final PersonalInformationBean personalInformationBean = registration.getPersonalInformationBean(executionYear);
        StudentCurricularPlan lastStudentCurricularPlan = registration.getLastStudentCurricularPlan();

        // Ciclo
        row.setCell(cycleType.getDescription());

        // Concluído
        row.setCell(String.valueOf(concluded));

        // Média do Ciclo
        if (graduation) {
            row.setCell(concluded ? printBigDecimal(average.setScale(0, BigDecimal.ROUND_HALF_EVEN)) : printBigDecimal(average));
        } else {
            row.setCell(concluded ? lastStudentCurricularPlan.getCycle(cycleType).getCurriculum().getAverage().toPlainString() : "n/a");
        }

        // Data de Conclusão
        row.setCell(conclusionDate != null ? conclusionDate.toString("dd-MM-yyyy") : "");

        // Data de Início
        row.setCell(registration.getStartDate() != null ? registration.getStartDate().toString("dd-MM-yyyy") : "");

        // Nº de aluno
        row.setCell(registration.getNumber());

        // Tipo Identificação
        row.setCell(graduate.getIdDocumentType().getLocalizedName());

        // Nº de Identificação
        row.setCell(graduate.getDocumentIdNumber());

        // Dígitos de Controlo
        row.setCell(graduate.getIdentificationDocumentExtraDigitValue());

        // Versão Doc. Identificação
        row.setCell(graduate.getIdentificationDocumentSeriesNumberValue());

        // Nome
        row.setCell(registration.getName());

        // Sexo
        row.setCell(graduate.getGender().toString());

        // Data de Nascimento
        row.setCell(graduate.getDateOfBirthYearMonthDay() != null ? graduate.getDateOfBirthYearMonthDay().toString("dd-MM-yyyy") : "n/a");

        // País de Nascimento
        row.setCell(graduate.getCountryOfBirth() != null ? graduate.getCountryOfBirth().getName() : "n/a");

        // País de Nacionalidade
        row.setCell(graduate.getCountry() != null ? graduate.getCountry().getName() : "n/a");

        // Tipo Curso
        row.setCell(registration.getDegreeType().getLocalizedName());

        // Nome Curso
        row.setCell(registration.getDegree().getNameI18N().getContent());

        // Sigla Curso
        row.setCell(registration.getDegree().getSigla());

        // Ramos do currículo do aluno
        final StringBuilder majorBranches = new StringBuilder();
        final StringBuilder minorBranches = new StringBuilder();
        for (final BranchCurriculumGroup group : lastStudentCurricularPlan.getBranchCurriculumGroups()) {
            if (group.isMajor()) {
                majorBranches.append(group.getName().toString()).append(",");
            } else if (group.isMinor()) {
                minorBranches.append(group.getName().toString()).append(",");
            }
        }

        // Ramo Principal
        if (majorBranches.length() > 0) {
            row.setCell(majorBranches.deleteCharAt(majorBranches.length() - 1).toString());
        } else {
            row.setCell("");
        }

        // Ramo Secundáro
        if (minorBranches.length() > 0) {
            row.setCell(minorBranches.deleteCharAt(minorBranches.length() - 1).toString());
        } else {
            row.setCell("");
        }

        // Ano Curricular
        row.setCell(registration.getCurricularYear(executionYear));

        // Ano de Ingresso no Curso Actual
        row.setCell(sourceRegistration.getStartExecutionYear().getName());

        // Nº de anos lectivos de inscrição no Curso actual
        int numberOfEnrolmentYears = 0;
        for (Registration current : registrationPath) {
            numberOfEnrolmentYears += current.getNumberOfYearsEnrolledUntil(executionYear);
        }
        row.setCell(numberOfEnrolmentYears);

        // Último ano em que esteve inscrito
        row.setCell(registration.getLastEnrolmentExecutionYear() != null ? registration.getLastEnrolmentExecutionYear().getName() : "");

        // Regime de frequência curso: Tempo integral/Tempo Parcial
        row.setCell(registration.getRegimeType(executionYear) != null ? registration.getRegimeType(executionYear).getName() : "");

        // Tipo de Aluno (AFA, AM, ERASMUS, etc)
        row.setCell(registration.getRegistrationProtocol() != null ? registration.getRegistrationProtocol().getCode() : "");

        // Regime de Ingresso no Curso Actual (código)
        Ingression ingression = sourceRegistration.getIngression();
        if (ingression == null && sourceRegistration.getStudentCandidacy() != null) {
            ingression = sourceRegistration.getStudentCandidacy().getIngression();
        }
        row.setCell(ingression != null ? ingression.getName() : "");

        // Regime de Ingresso no Curso Actual (designação)
        row.setCell(ingression != null ? ingression.getFullDescription() : "");
View Full Code Here

        new SeparationCyclesManagement().separateSecondCycle(studentCurricularPlan);
    }

    @Atomic(mode = TxMode.WRITE)
    private void separateByStudentNumberProcedure(Student student, DegreeCurricularPlan dcp) {
        final Registration registration = student.getMostRecentRegistration(dcp);
        new SeparateByStudentNumber().separateSecondCycle(registration.getLastStudentCurricularPlan());
    }
View Full Code Here

        int fixed = 0;
        for (final IndividualCandidacy candidacy : Bennu.getInstance().getIndividualCandidaciesSet()) {
            for (final IndividualCandidacyDocumentFile file : candidacy.getDocumentsSet()) {
                final IndividualCandidacyDocumentFileType type = file.getCandidacyFileType();
                if (type == IndividualCandidacyDocumentFileType.PHOTO) {
                    final Registration registration = candidacy.getRegistration();
                    if (registration != null) {
                        final Person person = registration.getPerson();
                        final Photograph personalPhotoEvenIfPending = person.getPersonalPhotoEvenIfPending();
                        if (personalPhotoEvenIfPending == null) {
                            missing++;
                            final byte[] content = file.getContent();
                            if (content != null && content.length > 0) {
View Full Code Here

        logger.info("BEGIN report for " + getDegreeType().name());
        int count = 0;

        for (final StudentCurricularPlan studentCurricularPlan : getStudentCurricularPlansToProcess(executionYear)) {
            final Registration registration = studentCurricularPlan.getRegistration();

            if (registration != null && !registration.isTransition()) {
                for (final CycleType cycleType : registration.getDegreeType().getCycleTypes()) {
                    final CycleCurriculumGroup cycleCGroup = studentCurricularPlan.getRoot().getCycleCurriculumGroup(cycleType);
                    if (cycleCGroup != null && !cycleCGroup.isExternal()) {
                        final RegistrationConclusionBean registrationConclusionBean =
                                new RegistrationConclusionBean(registration, cycleCGroup);
                        ExecutionYear conclusionYear = null;
                        if (cycleCGroup.isConcluded()) {
                            conclusionYear = registrationConclusionBean.getConclusionYear();

                            if (conclusionYear != executionYear && conclusionYear != executionYear.getPreviousExecutionYear()) {
                                continue;
                            }
                        }

                        if ((registration.isActive() || registration.isConcluded()) && conclusionYear != null) {
                            reportRaides(spreadsheet, registration, getFullRegistrationPath(registration), executionYear,
                                    cycleType, true, registrationConclusionBean.getConclusionDate());
                        } else if (registration.isActive()) {
                            reportRaides(spreadsheet, registration, getFullRegistrationPath(registration), executionYear,
                                    cycleType, false, null);
                        }
                    }
                }
View Full Code Here

    public ActionForward prepareRegistrationConclusionProcess(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {
        RenderUtils.invalidateViewState();

        final Registration registration = readRegistration(request);

        request.setAttribute("registrationConclusionBean", buildRegistrationConclusionBean(registration));
        return mapping.findForward("registrationConclusion");
    }
View Full Code Here

        for (final Evaluation evaluation : evaluations) {
            spreadsheet.setHeader(evaluation.getPresentationName());
        }

        for (final Attends attends : executionCourse.getOrderedAttends()) {
            final Registration registration = attends.getRegistration();
            final Row row = spreadsheet.addRow();
            row.setCell(registration.getPerson().getUsername());
            row.setCell(registration.getNumber());
            row.setCell(registration.getName());
            row.setCell(registration.getDegree().getSigla());
            if (attends.getEnrolment() != null) {
                final EnrolmentEvaluationType enrolmentEvaluationType = attends.getEnrolmentEvaluationType();
                row.setCell(enrolmentEvaluationType.getDescription());
            } else {
                row.setCell(BundleUtil.getString(Bundle.APPLICATION, "label.attends.enrollmentState.notEnrolled"));
View Full Code Here

public class UTLScholarshipReportDA extends FenixDispatchAction {

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

        Registration registration = getDomainObject(request, "registrationId");

        UTLScholarshipReportBeanFromRegistration bean = new UTLScholarshipReportBeanFromRegistration(registration);

        request.setAttribute("utlScholarshipBean", bean);
        request.setAttribute("registration", registration);
View Full Code Here

        return mapping.findForward("viewUTLScholarshipFromRegistration");
    }

    public ActionForward downloadRegistrationResultsSpreadsheet(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) throws Exception {
        Registration registration = getDomainObject(request, "registrationId");

        UTLScholarshipReportBeanFromRegistration bean = new UTLScholarshipReportBeanFromRegistration(registration);

        Spreadsheet spreadsheet = bean.buildSpreadsheet();

        response.setContentType("application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment; filename=bolsa_accao_social_utl_" + registration.getNumber()
                + ".xls");
        spreadsheet.exportToXLSSheet(response.getOutputStream());

        return null;
    }
View Full Code Here

TOP

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

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.