Search in sources :

Example 11 with SchoolDataSource

use of fi.otavanopisto.muikku.model.base.SchoolDataSource in project muikku by otavanopisto.

the class GradingSchoolDataController method findLatestAssessmentRequestByStudent.

public WorkspaceAssessmentRequest findLatestAssessmentRequestByStudent(String schoolDataSource, String studentIdentifier) {
    SchoolDataSource dataSource = schoolDataSourceDAO.findByIdentifier(schoolDataSource);
    GradingSchoolDataBridge schoolDataBridge = getGradingBridge(dataSource);
    if (schoolDataBridge != null) {
        return schoolDataBridge.findLatestAssessmentRequestByStudent(studentIdentifier);
    } else {
        logger.log(Level.SEVERE, "School Data Bridge could not be found for data source: " + dataSource.getIdentifier());
    }
    return null;
}
Also used : SchoolDataSource(fi.otavanopisto.muikku.model.base.SchoolDataSource)

Example 12 with SchoolDataSource

use of fi.otavanopisto.muikku.model.base.SchoolDataSource in project muikku by otavanopisto.

the class GradingSchoolDataController method listAssessmentsByStudent.

public List<WorkspaceAssessment> listAssessmentsByStudent(String schoolDataSource, String studentIdentifier) {
    SchoolDataSource dataSource = schoolDataSourceDAO.findByIdentifier(schoolDataSource);
    GradingSchoolDataBridge schoolDataBridge = getGradingBridge(dataSource);
    if (schoolDataBridge != null) {
        return schoolDataBridge.listAssessmentsByStudent(studentIdentifier);
    } else {
        logger.log(Level.SEVERE, "School Data Bridge could not be found for data source: " + dataSource.getIdentifier());
    }
    return null;
}
Also used : SchoolDataSource(fi.otavanopisto.muikku.model.base.SchoolDataSource)

Example 13 with SchoolDataSource

use of fi.otavanopisto.muikku.model.base.SchoolDataSource in project muikku by otavanopisto.

the class GradingSchoolDataController method listCompositeAssessmentRequestsByWorkspace.

public List<CompositeAssessmentRequest> listCompositeAssessmentRequestsByWorkspace(String schoolDataSource, String workspaceIdentifier, List<String> workspaceStudentIdentifiers) {
    SchoolDataSource dataSource = schoolDataSourceDAO.findByIdentifier(schoolDataSource);
    GradingSchoolDataBridge schoolDataBridge = getGradingBridge(dataSource);
    if (schoolDataBridge != null) {
        return schoolDataBridge.listCompositeAssessmentRequestsByWorkspace(workspaceIdentifier, workspaceStudentIdentifiers);
    } else {
        logger.log(Level.SEVERE, "School Data Bridge could not be found for data source: " + dataSource.getIdentifier());
    }
    return null;
}
Also used : SchoolDataSource(fi.otavanopisto.muikku.model.base.SchoolDataSource)

Example 14 with SchoolDataSource

use of fi.otavanopisto.muikku.model.base.SchoolDataSource in project muikku by otavanopisto.

the class GradingSchoolDataController method listCompositeAssessmentRequestsByStaffMember.

public List<CompositeAssessmentRequest> listCompositeAssessmentRequestsByStaffMember(String schoolDataSource, String staffMemberIdentifier) {
    SchoolDataSource dataSource = schoolDataSourceDAO.findByIdentifier(schoolDataSource);
    GradingSchoolDataBridge schoolDataBridge = getGradingBridge(dataSource);
    if (schoolDataBridge != null) {
        return schoolDataBridge.listCompositeAssessmentRequestsByStaffMember(staffMemberIdentifier);
    } else {
        logger.log(Level.SEVERE, "School Data Bridge could not be found for data source: " + dataSource.getIdentifier());
    }
    return null;
}
Also used : SchoolDataSource(fi.otavanopisto.muikku.model.base.SchoolDataSource)

Example 15 with SchoolDataSource

use of fi.otavanopisto.muikku.model.base.SchoolDataSource in project muikku by otavanopisto.

the class GradingSchoolDataController method updateWorkspaceAssessment.

public WorkspaceAssessment updateWorkspaceAssessment(String schoolDataSource, String identifier, String workspaceUserIdentifier, String workspaceUserSchoolDataSource, String workspaceIdentifier, String studentIdentifier, String assessingUserIdentifier, String assessingUserSchoolDataSource, String gradeIdentifier, String gradeSchoolDataSource, String gradingScaleIdentifier, String gradingScaleSchoolDataSource, String verbalAssessment, Date date) {
    SchoolDataSource dataSource = schoolDataSourceDAO.findByIdentifier(schoolDataSource);
    GradingSchoolDataBridge schoolDataBridge = getGradingBridge(dataSource);
    if (schoolDataBridge != null) {
        return schoolDataBridge.updateWorkspaceAssessment(identifier, workspaceUserIdentifier, workspaceUserSchoolDataSource, workspaceIdentifier, studentIdentifier, assessingUserIdentifier, assessingUserSchoolDataSource, gradeIdentifier, gradeSchoolDataSource, gradingScaleIdentifier, gradingScaleSchoolDataSource, verbalAssessment, date);
    } else {
        logger.log(Level.SEVERE, "School Data Bridge could not be found for data source: " + dataSource.getIdentifier());
    }
    return null;
}
Also used : SchoolDataSource(fi.otavanopisto.muikku.model.base.SchoolDataSource)

Aggregations

SchoolDataSource (fi.otavanopisto.muikku.model.base.SchoolDataSource)35 RoleSchoolDataIdentifier (fi.otavanopisto.muikku.model.users.RoleSchoolDataIdentifier)4 RoleEntity (fi.otavanopisto.muikku.model.users.RoleEntity)3 WorkspaceRoleEntity (fi.otavanopisto.muikku.model.workspace.WorkspaceRoleEntity)3 EnvironmentRoleEntity (fi.otavanopisto.muikku.model.users.EnvironmentRoleEntity)2 UserEntity (fi.otavanopisto.muikku.model.users.UserEntity)2 WorkspaceEntity (fi.otavanopisto.muikku.model.workspace.WorkspaceEntity)2 LoginEvent (fi.otavanopisto.muikku.events.LoginEvent)1 CourseIdentifierEntity (fi.otavanopisto.muikku.model.coursemeta.CourseIdentifierEntity)1 CourseIdentifierSchoolDataIdentifier (fi.otavanopisto.muikku.model.coursemeta.CourseIdentifierSchoolDataIdentifier)1 UserSchoolDataIdentifier (fi.otavanopisto.muikku.model.users.UserSchoolDataIdentifier)1 UserPendingPasswordChange (fi.otavanopisto.muikku.plugins.user.UserPendingPasswordChange)1 RESTPermitUnimplemented (fi.otavanopisto.muikku.rest.RESTPermitUnimplemented)1 SchoolDataBridgeUnauthorizedException (fi.otavanopisto.muikku.schooldata.SchoolDataBridgeUnauthorizedException)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Locale (java.util.Locale)1 Set (java.util.Set)1 EntityManager (javax.persistence.EntityManager)1 CriteriaBuilder (javax.persistence.criteria.CriteriaBuilder)1