Package org.fenixedu.academic.dto

Examples of org.fenixedu.academic.dto.InfoSiteProjects


            actionErrors1.add("errors.notSelected.executionCourse", error1);
            saveErrors(request, actionErrors1);
            return mapping.findForward("insucess");
        }

        InfoSiteProjects viewProjectsComponent =
                ReadExecutionCourseProjects.run(executionCourseCodeString, userView.getUsername());

        InfoExecutionCourse infoExecutionCourse = ReadExecutionCourseByOID.run(executionCourseCodeString);
        request.setAttribute("infoExecutionCourse", infoExecutionCourse);

        InfoSiteProjects infoSiteProjects = viewProjectsComponent;
        List infoGroupPropertiesList = new ArrayList();
        if (infoSiteProjects != null) {
            infoGroupPropertiesList = infoSiteProjects.getInfoGroupPropertiesList();
        } else {
            ActionErrors actionErrors1 = new ActionErrors();
            ActionError error1 = null;
            error1 = new ActionError("errors.noStudentInAttendsSet");
            actionErrors1.add("errors.noStudentInAttendsSet", error1);
View Full Code Here


public class ReadExecutionCourseProjects {

    @Atomic
    public static InfoSiteProjects run(String executionCourseID, String userName) throws FenixServiceException {

        InfoSiteProjects infoSiteProjects = null;

        final ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseID);

        final List<Grouping> executionCourseProjects = executionCourse.getGroupings();

        if (executionCourseProjects.size() != 0) {
            infoSiteProjects = new InfoSiteProjects();
            List infoGroupPropertiesList = new ArrayList();

            for (final Grouping grouping : executionCourseProjects) {
                IGroupEnrolmentStrategyFactory enrolmentGroupPolicyStrategyFactory = GroupEnrolmentStrategyFactory.getInstance();
                IGroupEnrolmentStrategy strategy =
                        enrolmentGroupPolicyStrategyFactory.getGroupEnrolmentStrategyInstance(grouping);
                if (strategy.checkEnrolmentDate(grouping, Calendar.getInstance())
                        && strategy.checkStudentInGrouping(grouping, userName)) {
                    InfoGrouping infoGroupProperties = InfoGroupingWithExportGrouping.newInfoFromDomain(grouping);
                    infoGroupPropertiesList.add(infoGroupProperties);
                }
            }
            infoSiteProjects.setInfoGroupPropertiesList(infoGroupPropertiesList);
        }
        return infoSiteProjects;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.InfoSiteProjects

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.