Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.StudentGroup$StudentGroupAttendListener


        if (bindingResult.hasErrors()) {
            return new RedirectView("/teacher/" + executionCourse.getExternalId() + "/student-groups/view/"
                    + grouping.getExternalId(), true);
        }

        StudentGroup studentgroup = studentGroupService.createStudentGroup(grouping, shift);
        return new RedirectView("/teacher/" + executionCourse.getExternalId() + "/student-groups/" + grouping.getExternalId()
                + "/viewStudentGroup/" + studentgroup.getExternalId(), true);
    }
View Full Code Here


            fileContents +=
                    BundleUtil.getString(Bundle.ENUMERATION, attends.getAttendsStateType().getQualifiedName()) + SEPARATOR;
            fileContents += attends.getStudentCurricularPlanFromAttends().getDegreeCurricularPlan().getName() + SEPARATOR;
            fileContents += attends.getRegistration().getStudent().getPerson().getName() + SEPARATOR;
            for (final Grouping grouping : groupings) {
                final StudentGroup studentGroup = attends.getStudentGroupByGrouping(grouping);
                if (studentGroup == null) {
                    fileContents += NOT_AVAILABLE + SEPARATOR;
                } else {
                    fileContents += studentGroup.getGroupNumber() + SEPARATOR;
                }
            }

            final String email = attends.getRegistration().getStudent().getPerson().getEmail();
            fileContents += (email != null ? email : "") + SEPARATOR;
View Full Code Here

    public ActionForward viewProjectSubmissions(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixActionException, FenixServiceException {

        final Attends attends = getAttends(request);
        final Project project = getProject(request);
        final StudentGroup studentGroup = project.getGrouping().getStudentGroupByAttends(attends);

        request.setAttribute("project", project);

        if (studentGroup != null) {
            final List<ProjectSubmission> projectSubmissionsSortedByMostRecent =
View Full Code Here

        ProjectSubmission submission = getProjectSubmission(request);

        if (submission != null && submission.getStudentGroup().isPersonInStudentGroup(getLoggedPerson(request))) {
            Attends attends = getAttends(request);
            Project project = getProject(request);
            StudentGroup studentGroup = project.getGrouping().getStudentGroupByAttends(attends);
            String rowClasses = "";
            for (ProjectSubmission oneSubmission : getProjectSubmissionsForStudentGroupSortedByMostRecent(project, studentGroup)) {
                if (oneSubmission.equals(submission)) {
                    rowClasses += "selected,";
                } else {
View Full Code Here

    public ActionForward prepareProjectSubmission(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixActionException, FenixServiceException {

        Attends attends = getAttends(request);
        Project project = getProject(request);
        StudentGroup studentGroup = project.getGrouping().getStudentGroupByAttends(attends);

        request.setAttribute("attends", attends);
        request.setAttribute("project", getProject(request));
        request.setAttribute("studentGroup", studentGroup);
        request.setAttribute("person", getUserView(request).getPerson());
View Full Code Here

        Archive archive = new DiskZipArchive(response, project.getName());
        Fetcher fetcher = new Fetcher(archive, request, response);

        for (ProjectSubmission submission : projectSubmissions) {
            StudentGroup group = submission.getStudentGroup();

            fetcher.queue(new Resource(group.getGroupNumber() + getStudentsISTID(group) + "/"
                    + submission.getProjectSubmissionFile().getFilename(), submission.getProjectSubmissionFile().getDownloadUrl()));
        }

        fetcher.process();
        archive.finish();
View Full Code Here

        Archive archive = new DiskZipArchive(response, project.getName() + "-" + (startIndex + 1) + "-" + finishIndex);
        Fetcher fetcher = new Fetcher(archive, request, response);

        for (ProjectSubmission submission : subList) {
            StudentGroup group = submission.getStudentGroup();

            fetcher.queue(new Resource(group.getGroupNumber() + getStudentsISTID(group) + "/"
                    + submission.getProjectSubmissionFile().getFilename(), submission.getProjectSubmissionFile().getDownloadUrl()));
        }

        fetcher.process();
        archive.finish();
View Full Code Here

    public ActionForward sendEmail(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        String executionCourseCode = request.getParameter("executionCourseID");
        String studentGroupCode = request.getParameter("studentGroupCode");
        ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseCode);
        StudentGroup studentGroup = FenixFramework.getDomainObject(studentGroupCode);
        Group groupToSend = StudentGroupGroup.get(studentGroup);
        Sender sender = ExecutionCourseSender.newInstance(executionCourse);
        final String label =
                getResources(request, "APPLICATION_RESOURCES").getMessage("label.students.group.send.email",
                        studentGroup.getGroupNumber(), studentGroup.getGrouping().getName());
        Recipient recipient = Recipient.newInstance(label, groupToSend);
        return EmailsDA.sendEmail(request, sender, recipient);
    }
View Full Code Here

public class TeacherAdministrationSiteComponentBuilder {

    public InfoSiteStudentGroup getInfoSiteStudentGroup(InfoSiteStudentGroup component, String studentGroupID)
            throws FenixServiceException {

        final StudentGroup studentGroup = FenixFramework.getDomainObject(studentGroupID);
        if (studentGroup == null) {
            return null;
        }

        final List<InfoSiteStudentInformation> infoSiteStudentInformations = new ArrayList<InfoSiteStudentInformation>();
        for (final Attends attend : studentGroup.getAttendsSet()) {
            infoSiteStudentInformations.add(new InfoSiteStudentInformation(attend.getRegistration().getPerson().getName(), attend
                    .getRegistration().getPerson().getEmail(), attend.getRegistration().getPerson().getUsername(), attend
                    .getRegistration().getNumber()));
        }
        Collections.sort(infoSiteStudentInformations, InfoSiteStudentInformation.COMPARATOR_BY_NUMBER);
        component.setInfoSiteStudentInformationList(infoSiteStudentInformations);
        component.setInfoStudentGroup(InfoStudentGroupWithAttendsAndGroupingAndShift.newInfoFromDomain(studentGroup));

        if (studentGroup.getGrouping().getMaximumCapacity() != null) {
            int freeGroups = studentGroup.getGrouping().getMaximumCapacity() - studentGroup.getAttendsSet().size();
            component.setNrOfElements(Integer.valueOf(freeGroups));
        } else {
            component.setNrOfElements("Sem limite");
        }
        return component;
View Full Code Here

        List<StudentGroup> aux = new ArrayList<StudentGroup>();
        List studentGroupsWithShift = groupProperties.getStudentGroupsWithShift();
        Iterator iterStudentGroupsWithShift = studentGroupsWithShift.iterator();
        while (iterStudentGroupsWithShift.hasNext()) {
            StudentGroup studentGroup = (StudentGroup) iterStudentGroupsWithShift.next();
            if (studentGroup.getShift().equals(shift)) {
                aux.add(studentGroup);
            }
        }
        List<StudentGroup> allStudentGroups = new ArrayList<StudentGroup>();
        allStudentGroups.addAll(groupProperties.getStudentGroupsSet());

        Iterator iterAux = aux.iterator();
        while (iterAux.hasNext()) {
            StudentGroup studentGroup = (StudentGroup) iterAux.next();
            allStudentGroups.remove(studentGroup);
        }

        Iterator iterAllStudentGroups = allStudentGroups.iterator();
        InfoSiteStudentsAndShiftByStudentGroup infoSiteStudentsAndShiftByStudentGroup = null;
        while (iterAllStudentGroups.hasNext()) {
            infoSiteStudentsAndShiftByStudentGroup = new InfoSiteStudentsAndShiftByStudentGroup();

            StudentGroup studentGroup = (StudentGroup) iterAllStudentGroups.next();
            Shift turno = studentGroup.getShift();
            infoSiteStudentsAndShiftByStudentGroup.setInfoStudentGroup(InfoStudentGroup.newInfoFromDomain(studentGroup));
            infoSiteStudentsAndShiftByStudentGroup.setInfoShift(InfoShift.newInfoFromDomain(turno));

            Collection attendsList = studentGroup.getAttendsSet();

            List<InfoSiteStudentInformation> studentGroupAttendInformationList = new ArrayList<InfoSiteStudentInformation>();
            Iterator iterAttendsList = attendsList.iterator();
            InfoSiteStudentInformation infoSiteStudentInformation = null;
            Attends attend = null;
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.StudentGroup$StudentGroupAttendListener

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.