Search in sources :

Example 11 with User

use of fi.otavanopisto.muikku.schooldata.entity.User in project muikku by otavanopisto.

the class Evaluation2RESTService method createWorkspaceMaterialAssessment.

@POST
@Path("/workspace/{WORKSPACEENTITYID}/user/{USERENTITYID}/workspacematerial/{WORKSPACEMATERIALID}/assessment")
@RESTPermit(handling = Handling.INLINE, requireLoggedIn = true)
public Response createWorkspaceMaterialAssessment(@PathParam("WORKSPACEENTITYID") Long workspaceEntityId, @PathParam("USERENTITYID") Long userEntityId, @PathParam("WORKSPACEMATERIALID") Long workspaceMaterialId, RestAssessment payload) {
    if (!sessionController.isLoggedIn()) {
        return Response.status(Status.UNAUTHORIZED).build();
    }
    if (!sessionController.hasEnvironmentPermission(MuikkuPermissions.ACCESS_EVALUATION)) {
        return Response.status(Status.FORBIDDEN).build();
    }
    // User entity
    UserEntity userEntity = userEntityController.findUserEntityById(userEntityId);
    if (userEntity == null) {
        return Response.status(Status.BAD_REQUEST).build();
    }
    // Workspace material
    WorkspaceMaterial workspaceMaterial = workspaceMaterialController.findWorkspaceMaterialById(workspaceMaterialId);
    if (workspaceMaterial == null) {
        return Response.status(Status.BAD_REQUEST).build();
    }
    // Workspace material evaluation
    WorkspaceMaterialEvaluation workspaceMaterialEvaluation = evaluationController.findWorkspaceMaterialEvaluationByWorkspaceMaterialAndStudent(workspaceMaterial, userEntity);
    // Grade
    SchoolDataIdentifier gradingScaleIdentifier = SchoolDataIdentifier.fromId(payload.getGradingScaleIdentifier());
    GradingScale gradingScale = gradingController.findGradingScale(gradingScaleIdentifier);
    SchoolDataIdentifier gradeIdentifier = SchoolDataIdentifier.fromId(payload.getGradeIdentifier());
    GradingScaleItem gradingScaleItem = gradingController.findGradingScaleItem(gradingScale, gradeIdentifier);
    // Assessor
    SchoolDataIdentifier assessorIdentifier = SchoolDataIdentifier.fromId(payload.getAssessorIdentifier());
    User assessingUser = userController.findUserByIdentifier(assessorIdentifier);
    UserEntity assessor = userEntityController.findUserEntityByUser(assessingUser);
    if (workspaceMaterialEvaluation == null) {
        workspaceMaterialEvaluation = evaluationController.createWorkspaceMaterialEvaluation(userEntity, workspaceMaterial, gradingScale, gradingScaleItem, assessor, payload.getAssessmentDate(), payload.getVerbalAssessment());
    } else {
        workspaceMaterialEvaluation = evaluationController.updateWorkspaceMaterialEvaluation(workspaceMaterialEvaluation, gradingScale, gradingScaleItem, assessor, payload.getAssessmentDate(), payload.getVerbalAssessment());
    }
    // Remove possible workspace assignment supplementation request
    SupplementationRequest supplementationRequest = evaluationController.findSupplementationRequestByStudentAndWorkspaceMaterialAndArchived(userEntityId, workspaceMaterialId, Boolean.FALSE);
    if (supplementationRequest != null) {
        evaluationController.deleteSupplementationRequest(supplementationRequest);
    }
    // WorkspaceMaterialEvaluation to RestAssessment
    RestAssessment restAssessment = new RestAssessment(workspaceMaterialEvaluation.getId().toString(), assessorIdentifier.toId(), gradingScaleIdentifier.toId(), gradeIdentifier.toId(), workspaceMaterialEvaluation.getVerbalAssessment(), workspaceMaterialEvaluation.getEvaluated(), gradingScaleItem.isPassingGrade());
    return Response.ok(restAssessment).build();
}
Also used : SchoolDataIdentifier(fi.otavanopisto.muikku.schooldata.SchoolDataIdentifier) CompositeGradingScale(fi.otavanopisto.muikku.schooldata.entity.CompositeGradingScale) GradingScale(fi.otavanopisto.muikku.schooldata.entity.GradingScale) WorkspaceGradingScale(fi.otavanopisto.muikku.plugins.evaluation.rest.model.WorkspaceGradingScale) User(fi.otavanopisto.muikku.schooldata.entity.User) WorkspaceUser(fi.otavanopisto.muikku.schooldata.entity.WorkspaceUser) WorkspaceMaterialEvaluation(fi.otavanopisto.muikku.plugins.evaluation.model.WorkspaceMaterialEvaluation) GradingScaleItem(fi.otavanopisto.muikku.schooldata.entity.GradingScaleItem) RestAssessment(fi.otavanopisto.muikku.plugins.evaluation.rest.model.RestAssessment) SupplementationRequest(fi.otavanopisto.muikku.plugins.evaluation.model.SupplementationRequest) RestSupplementationRequest(fi.otavanopisto.muikku.plugins.evaluation.rest.model.RestSupplementationRequest) UserEntity(fi.otavanopisto.muikku.model.users.UserEntity) WorkspaceUserEntity(fi.otavanopisto.muikku.model.workspace.WorkspaceUserEntity) WorkspaceMaterial(fi.otavanopisto.muikku.plugins.workspace.model.WorkspaceMaterial) Path(javax.ws.rs.Path) RESTPermit(fi.otavanopisto.security.rest.RESTPermit) POST(javax.ws.rs.POST)

Example 12 with User

use of fi.otavanopisto.muikku.schooldata.entity.User in project muikku by otavanopisto.

the class EvaluationRESTService method updateWorkspaceAssessment.

@PUT
@Path("/workspaces/{WORKSPACEENTITYID}/students/{STUDENTID}/assessments/{EVALUATIONID}")
@RESTPermit(handling = Handling.INLINE, requireLoggedIn = true)
public Response updateWorkspaceAssessment(@PathParam("WORKSPACEENTITYID") Long workspaceEntityId, @PathParam("STUDENTID") String studentId, @PathParam("EVALUATIONID") String workspaceAssesmentId, WorkspaceAssessment payload) {
    if (!sessionController.isLoggedIn()) {
        return Response.status(Status.UNAUTHORIZED).build();
    }
    SchoolDataIdentifier studentIdentifier = SchoolDataIdentifier.fromId(studentId);
    if (studentIdentifier == null) {
        return Response.status(Status.BAD_REQUEST).entity(String.format("Malformed student identifier %s", studentId)).build();
    }
    WorkspaceEntity workspaceEntity = workspaceController.findWorkspaceEntityById(workspaceEntityId);
    if (workspaceEntity == null) {
        return Response.status(Status.NOT_FOUND).entity(String.format("Could not find workspace entity %d", workspaceEntityId)).build();
    }
    SchoolDataIdentifier workspaceIdentifier = new SchoolDataIdentifier(workspaceEntity.getIdentifier(), workspaceEntity.getDataSource().getIdentifier());
    WorkspaceUserEntity workspaceStudentEntity = workspaceUserEntityController.findActiveWorkspaceUserByWorkspaceEntityAndUserIdentifier(workspaceEntity, studentIdentifier);
    if (workspaceStudentEntity == null) {
        return Response.status(Status.NOT_FOUND).entity(String.format("Could not find workspace student entity %s from workspace entity %d", studentIdentifier, workspaceEntityId)).build();
    }
    SchoolDataIdentifier workspaceAssesmentIdentifier = SchoolDataIdentifier.fromId(workspaceAssesmentId);
    if (workspaceAssesmentIdentifier == null) {
        return Response.status(Status.BAD_REQUEST).entity(String.format("Malformed workspace assessment identifier %s", workspaceAssesmentIdentifier)).build();
    }
    fi.otavanopisto.muikku.schooldata.entity.WorkspaceAssessment workspaceAssessment = gradingController.findWorkspaceAssessment(workspaceIdentifier, studentIdentifier, workspaceAssesmentIdentifier);
    if (workspaceAssessment == null) {
        return Response.status(Status.NOT_FOUND).entity(String.format("Could not find workspace assessment %s from workspace entity %d, student identifer %s", workspaceAssesmentId, workspaceEntityId, studentIdentifier)).build();
    }
    if (!sessionController.hasWorkspacePermission(MuikkuPermissions.EVALUATE_USER, workspaceEntity)) {
        return Response.status(Status.FORBIDDEN).build();
    }
    if (payload.getEvaluated() == null) {
        return Response.status(Status.BAD_REQUEST).entity("evaluated is missing").build();
    }
    if (payload.getAssessorEntityId() == null) {
        return Response.status(Status.BAD_REQUEST).entity("assessorEntityId is missing").build();
    }
    UserEntity assessor = userEntityController.findUserEntityById(payload.getAssessorEntityId());
    if (assessor == null) {
        return Response.status(Status.BAD_REQUEST).entity("assessor is invalid").build();
    }
    User assessingUser = userController.findUserByUserEntityDefaults(assessor);
    if (assessingUser == null) {
        return Response.status(Status.BAD_REQUEST).entity("Could not find assessor from school data source").build();
    }
    if (payload.getGradeSchoolDataSource() == null) {
        return Response.status(Status.BAD_REQUEST).entity("gradeSchoolDataSource is missing").build();
    }
    GradingScale gradingScale = gradingController.findGradingScale(payload.getGradingScaleSchoolDataSource(), payload.getGradingScaleIdentifier());
    if (gradingScale == null) {
        return Response.status(Status.BAD_REQUEST).entity("gradingScale is invalid").build();
    }
    if (payload.getGradeIdentifier() == null) {
        return Response.status(Status.BAD_REQUEST).entity("gradeIdentifier is missing").build();
    }
    GradingScaleItem grade = gradingController.findGradingScaleItem(gradingScale, payload.getGradeSchoolDataSource(), payload.getGradeIdentifier());
    if (grade == null) {
        return Response.status(Status.BAD_REQUEST).entity("grade is invalid").build();
    }
    fi.otavanopisto.muikku.schooldata.entity.WorkspaceUser workspaceStudent = workspaceController.findWorkspaceUser(workspaceStudentEntity);
    if (workspaceStudent == null) {
        return Response.status(Status.INTERNAL_SERVER_ERROR).entity(String.format("Failed to get workspace student for workspace student entity %d from school data source", workspaceStudentEntity.getId())).build();
    }
    Date evaluated = payload.getEvaluated();
    UserEntity student = userEntityController.findUserEntityByUserIdentifier(workspaceStudent.getUserIdentifier());
    Workspace workspace = workspaceController.findWorkspace(workspaceEntity);
    fi.otavanopisto.muikku.schooldata.entity.WorkspaceAssessment assessment = gradingController.updateWorkspaceAssessment(workspaceAssesmentIdentifier, workspaceStudent, assessingUser, grade, payload.getVerbalAssessment(), evaluated);
    if (student != null && workspace != null && assessment != null) {
        sendAssessmentNotification(workspaceEntity, payload, assessor, student, workspace, grade.getName());
    }
    return Response.ok(createRestModel(workspaceEntity, assessment)).build();
}
Also used : SchoolDataIdentifier(fi.otavanopisto.muikku.schooldata.SchoolDataIdentifier) GradingScale(fi.otavanopisto.muikku.schooldata.entity.GradingScale) WorkspaceGradingScale(fi.otavanopisto.muikku.plugins.evaluation.rest.model.WorkspaceGradingScale) User(fi.otavanopisto.muikku.schooldata.entity.User) GradingScaleItem(fi.otavanopisto.muikku.schooldata.entity.GradingScaleItem) UserEntity(fi.otavanopisto.muikku.model.users.UserEntity) WorkspaceUserEntity(fi.otavanopisto.muikku.model.workspace.WorkspaceUserEntity) Date(java.util.Date) WorkspaceUserEntity(fi.otavanopisto.muikku.model.workspace.WorkspaceUserEntity) WorkspaceEntity(fi.otavanopisto.muikku.model.workspace.WorkspaceEntity) Workspace(fi.otavanopisto.muikku.schooldata.entity.Workspace) Path(javax.ws.rs.Path) RESTPermit(fi.otavanopisto.security.rest.RESTPermit) PUT(javax.ws.rs.PUT)

Example 13 with User

use of fi.otavanopisto.muikku.schooldata.entity.User in project muikku by otavanopisto.

the class Evaluation2RESTService method updateWorkspaceMaterialAssessment.

@PUT
@Path("/workspace/{WORKSPACEENTITYID}/user/{USERENTITYID}/workspacematerial/{WORKSPACEMATERIALID}/assessment")
@RESTPermit(handling = Handling.INLINE, requireLoggedIn = true)
public Response updateWorkspaceMaterialAssessment(@PathParam("WORKSPACEENTITYID") Long workspaceEntityId, @PathParam("USERENTITYID") Long userEntityId, @PathParam("WORKSPACEMATERIALID") Long workspaceMaterialId, RestAssessment payload) {
    if (!sessionController.isLoggedIn()) {
        return Response.status(Status.UNAUTHORIZED).build();
    }
    if (!sessionController.hasEnvironmentPermission(MuikkuPermissions.ACCESS_EVALUATION)) {
        return Response.status(Status.FORBIDDEN).build();
    }
    // User entity
    UserEntity userEntity = userEntityController.findUserEntityById(userEntityId);
    if (userEntity == null) {
        return Response.status(Status.BAD_REQUEST).build();
    }
    // Workspace material
    WorkspaceMaterial workspaceMaterial = workspaceMaterialController.findWorkspaceMaterialById(workspaceMaterialId);
    if (workspaceMaterial == null) {
        return Response.status(Status.BAD_REQUEST).build();
    }
    // Workspace material evaluation
    WorkspaceMaterialEvaluation workspaceMaterialEvaluation = evaluationController.findWorkspaceMaterialEvaluationByWorkspaceMaterialAndStudent(workspaceMaterial, userEntity);
    if (workspaceMaterialEvaluation == null) {
        return Response.status(Status.BAD_REQUEST).build();
    }
    // Grade
    SchoolDataIdentifier gradingScaleIdentifier = SchoolDataIdentifier.fromId(payload.getGradingScaleIdentifier());
    GradingScale gradingScale = gradingController.findGradingScale(gradingScaleIdentifier);
    SchoolDataIdentifier gradeIdentifier = SchoolDataIdentifier.fromId(payload.getGradeIdentifier());
    GradingScaleItem gradingScaleItem = gradingController.findGradingScaleItem(gradingScale, gradeIdentifier);
    // Assessor
    SchoolDataIdentifier assessorIdentifier = SchoolDataIdentifier.fromId(payload.getAssessorIdentifier());
    User assessingUser = userController.findUserByIdentifier(assessorIdentifier);
    UserEntity assessor = userEntityController.findUserEntityByUser(assessingUser);
    workspaceMaterialEvaluation = evaluationController.updateWorkspaceMaterialEvaluation(workspaceMaterialEvaluation, gradingScale, gradingScaleItem, assessor, payload.getAssessmentDate(), payload.getVerbalAssessment());
    // WorkspaceMaterialEvaluation to RestAssessment
    RestAssessment restAssessment = new RestAssessment(workspaceMaterialEvaluation.getId().toString(), assessorIdentifier.toId(), gradingScaleIdentifier.toId(), gradeIdentifier.toId(), workspaceMaterialEvaluation.getVerbalAssessment(), workspaceMaterialEvaluation.getEvaluated(), gradingScaleItem.isPassingGrade());
    return Response.ok(restAssessment).build();
}
Also used : SchoolDataIdentifier(fi.otavanopisto.muikku.schooldata.SchoolDataIdentifier) CompositeGradingScale(fi.otavanopisto.muikku.schooldata.entity.CompositeGradingScale) GradingScale(fi.otavanopisto.muikku.schooldata.entity.GradingScale) WorkspaceGradingScale(fi.otavanopisto.muikku.plugins.evaluation.rest.model.WorkspaceGradingScale) User(fi.otavanopisto.muikku.schooldata.entity.User) WorkspaceUser(fi.otavanopisto.muikku.schooldata.entity.WorkspaceUser) WorkspaceMaterialEvaluation(fi.otavanopisto.muikku.plugins.evaluation.model.WorkspaceMaterialEvaluation) GradingScaleItem(fi.otavanopisto.muikku.schooldata.entity.GradingScaleItem) RestAssessment(fi.otavanopisto.muikku.plugins.evaluation.rest.model.RestAssessment) UserEntity(fi.otavanopisto.muikku.model.users.UserEntity) WorkspaceUserEntity(fi.otavanopisto.muikku.model.workspace.WorkspaceUserEntity) WorkspaceMaterial(fi.otavanopisto.muikku.plugins.workspace.model.WorkspaceMaterial) Path(javax.ws.rs.Path) RESTPermit(fi.otavanopisto.security.rest.RESTPermit) PUT(javax.ws.rs.PUT)

Example 14 with User

use of fi.otavanopisto.muikku.schooldata.entity.User in project muikku by otavanopisto.

the class NotificationController method sendNotification.

public void sendNotification(String category, String subject, String content, UserEntity recipient, SchoolDataIdentifier recipientIdentifier, String notificationType) {
    HashMap<String, Object> map = new HashMap<>();
    map.put("notificationType", notificationType);
    map.put("recipient", recipient.getId());
    map.put("recipientIdentifier", recipientIdentifier.toId());
    map.put("time", String.valueOf(System.currentTimeMillis()));
    UserEntity guidanceCounselor = null;
    SchoolDataIdentifier userIdentifier = new SchoolDataIdentifier(recipient.getDefaultIdentifier(), recipient.getDefaultSchoolDataSource().getIdentifier());
    List<UserGroupEntity> userGroupEntities = userGroupEntityController.listUserGroupsByUserIdentifier(userIdentifier);
    // #3089: An awkward workaround to use the latest guidance group based on its identifier. Assumes a larger
    // identifier means a more recent entity. A more proper fix would be to sync group creation dates from
    // Pyramus and include them in the Elastic index. Then again, user groups would have to be refactored
    // entirely, as Pyramus handles group members as students (one study programme) while Muikku handles
    // them as user entities (all study programmes)...
    userGroupEntities.sort(new Comparator<UserGroupEntity>() {

        public int compare(UserGroupEntity o1, UserGroupEntity o2) {
            long l1 = NumberUtils.toLong(StringUtils.substringAfterLast(o1.getIdentifier(), "-"), -1);
            long l2 = NumberUtils.toLong(StringUtils.substringAfterLast(o2.getIdentifier(), "-"), -1);
            return (int) (l2 - l1);
        }
    });
    userGroupEntities: for (UserGroupEntity userGroupEntity : userGroupEntities) {
        UserGroup userGroup = userGroupController.findUserGroup(userGroupEntity);
        if (userGroup.isGuidanceGroup()) {
            List<GroupUser> groupUsers = userGroupController.listUserGroupStaffMembers(userGroup);
            for (GroupUser groupUser : groupUsers) {
                User user = userGroupController.findUserByGroupUser(groupUser);
                guidanceCounselor = userEntityController.findUserEntityByUser(user);
                break userGroupEntities;
            }
        }
    }
    LogProvider provider = getProvider(LOG_PROVIDER);
    if (provider != null) {
        provider.log(COLLECTION_NAME, map);
    }
    if (isDryRun()) {
        String recipientEmail = getRecipientEmail();
        if (recipientEmail == null) {
            logger.log(Level.INFO, String.format("Sending notification %s - %s to %s", category, subject, recipient.getDefaultIdentifier()));
        } else {
            mailer.sendMail(MailType.HTML, Arrays.asList(recipientEmail), subject, "SENT TO: " + recipient.getDefaultIdentifier() + "<br/><br/><br/>" + content);
        }
    } else {
        ArrayList<UserEntity> recipients = new ArrayList<>();
        recipients.add(recipient);
        if (guidanceCounselor != null) {
            recipients.add(guidanceCounselor);
        }
        String studentEmail = userEmailEntityController.getUserDefaultEmailAddress(recipient, Boolean.FALSE);
        if (studentEmail != null) {
            mailer.sendMail(MailType.HTML, Arrays.asList(studentEmail), subject, content);
        } else {
            logger.log(Level.WARNING, String.format("Cannot send email notification to student %s because no email address was found", recipient.getDefaultIdentifier()));
        }
        communicatorController.postMessage(recipient, category, subject, content, recipients);
    }
}
Also used : SchoolDataIdentifier(fi.otavanopisto.muikku.schooldata.SchoolDataIdentifier) User(fi.otavanopisto.muikku.schooldata.entity.User) GroupUser(fi.otavanopisto.muikku.schooldata.entity.GroupUser) GroupUser(fi.otavanopisto.muikku.schooldata.entity.GroupUser) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) UserGroupEntity(fi.otavanopisto.muikku.model.users.UserGroupEntity) UserEntity(fi.otavanopisto.muikku.model.users.UserEntity) UserGroup(fi.otavanopisto.muikku.schooldata.entity.UserGroup) LogProvider(fi.otavanopisto.muikku.plugins.commonlog.LogProvider) ArrayList(java.util.ArrayList) List(java.util.List)

Example 15 with User

use of fi.otavanopisto.muikku.schooldata.entity.User in project muikku by otavanopisto.

the class ProfileBackingBean method init.

@RequestAction
@LoggedIn
public String init() {
    UserEntity userEntity = sessionController.getLoggedUserEntity();
    User user = userController.findUserByDataSourceAndIdentifier(sessionController.getLoggedUserSchoolDataSource(), sessionController.getLoggedUserIdentifier());
    List<UserAddress> userAddresses = userController.listUserAddresses(user);
    List<UserPhoneNumber> userPhoneNumbers = userController.listUserPhoneNumbers(user);
    displayName = user.getNickName() == null ? user.getDisplayName() : String.format("%s %s (%s)", user.getNickName(), user.getLastName(), user.getStudyProgrammeName());
    studyStartDate = user.getStudyStartDate();
    studyTimeEnd = user.getStudyTimeEnd();
    studyTimeLeftStr = "";
    if (studyTimeEnd != null) {
        OffsetDateTime now = OffsetDateTime.now();
        Locale locale = sessionController.getLocale();
        if (now.isBefore(studyTimeEnd)) {
            long studyTimeLeftYears = now.until(studyTimeEnd, ChronoUnit.YEARS);
            now = now.plusYears(studyTimeLeftYears);
            if (studyTimeLeftYears > 0) {
                studyTimeLeftStr += studyTimeLeftYears + " " + localeController.getText(locale, "plugin.profile.studyTimeEndShort.y");
            }
            long studyTimeLeftMonths = now.until(studyTimeEnd, ChronoUnit.MONTHS);
            now = now.plusMonths(studyTimeLeftMonths);
            if (studyTimeLeftMonths > 0) {
                if (studyTimeLeftStr.length() > 0)
                    studyTimeLeftStr += " ";
                studyTimeLeftStr += studyTimeLeftMonths + " " + localeController.getText(locale, "plugin.profile.studyTimeEndShort.m");
            }
            long studyTimeLeftDays = now.until(studyTimeEnd, ChronoUnit.DAYS);
            now = now.plusDays(studyTimeLeftDays);
            if (studyTimeLeftDays > 0) {
                if (studyTimeLeftStr.length() > 0)
                    studyTimeLeftStr += " ";
                studyTimeLeftStr += studyTimeLeftDays + " " + localeController.getText(locale, "plugin.profile.studyTimeEndShort.d");
            }
        }
    }
    addresses = new ArrayList<>();
    for (UserAddress userAddress : userAddresses) {
        addresses.add(String.format("%s %s %s %s", userAddress.getStreet(), userAddress.getPostalCode(), userAddress.getCity(), userAddress.getCountry()));
    }
    phoneNumbers = new ArrayList<>();
    for (UserPhoneNumber userPhoneNumber : userPhoneNumbers) {
        phoneNumbers.add(userPhoneNumber.getNumber());
    }
    SchoolDataIdentifier identifier = new SchoolDataIdentifier(userEntity.getDefaultIdentifier(), userEntity.getDefaultSchoolDataSource().getIdentifier());
    emails = userEmailEntityController.getUserEmailAddresses(identifier);
    return null;
}
Also used : Locale(java.util.Locale) SchoolDataIdentifier(fi.otavanopisto.muikku.schooldata.SchoolDataIdentifier) User(fi.otavanopisto.muikku.schooldata.entity.User) OffsetDateTime(java.time.OffsetDateTime) UserAddress(fi.otavanopisto.muikku.schooldata.entity.UserAddress) UserPhoneNumber(fi.otavanopisto.muikku.schooldata.entity.UserPhoneNumber) UserEntity(fi.otavanopisto.muikku.model.users.UserEntity) RequestAction(org.ocpsoft.rewrite.annotation.RequestAction) LoggedIn(fi.otavanopisto.security.LoggedIn)

Aggregations

User (fi.otavanopisto.muikku.schooldata.entity.User)48 UserEntity (fi.otavanopisto.muikku.model.users.UserEntity)35 SchoolDataIdentifier (fi.otavanopisto.muikku.schooldata.SchoolDataIdentifier)30 Path (javax.ws.rs.Path)21 WorkspaceUserEntity (fi.otavanopisto.muikku.model.workspace.WorkspaceUserEntity)18 RESTPermit (fi.otavanopisto.security.rest.RESTPermit)17 ArrayList (java.util.ArrayList)16 UserSchoolDataIdentifier (fi.otavanopisto.muikku.model.users.UserSchoolDataIdentifier)14 WorkspaceEntity (fi.otavanopisto.muikku.model.workspace.WorkspaceEntity)14 EnvironmentUser (fi.otavanopisto.muikku.model.users.EnvironmentUser)12 GET (javax.ws.rs.GET)12 HashMap (java.util.HashMap)11 WorkspaceUser (fi.otavanopisto.muikku.schooldata.entity.WorkspaceUser)10 Workspace (fi.otavanopisto.muikku.schooldata.entity.Workspace)9 Date (java.util.Date)8 GradingScale (fi.otavanopisto.muikku.schooldata.entity.GradingScale)7 GradingScaleItem (fi.otavanopisto.muikku.schooldata.entity.GradingScaleItem)7 WorkspaceGradingScale (fi.otavanopisto.muikku.plugins.evaluation.rest.model.WorkspaceGradingScale)6 PUT (javax.ws.rs.PUT)5 RestAssessment (fi.otavanopisto.muikku.plugins.evaluation.rest.model.RestAssessment)4