From ce9740fe0ac95fa36734e711dd178a70b8a2ac35 Mon Sep 17 00:00:00 2001 From: srosse <stephane.rosse@frentix.com> Date: Wed, 4 Dec 2019 08:56:18 +0100 Subject: [PATCH] OO-4399: reviewer can see self evaluation of assignment (self - only) Reviewers with comment permission are allowed to see the self evaluation of the user which gave them the permission. Assignment with "Only self evaluation" doesn't have and doesn't need the option "Invitee can see self evaluation" --- .../portfolio/handler/EvaluationFormHandler.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/olat/modules/portfolio/handler/EvaluationFormHandler.java b/src/main/java/org/olat/modules/portfolio/handler/EvaluationFormHandler.java index 7eb860fa53f..656eb38caba 100644 --- a/src/main/java/org/olat/modules/portfolio/handler/EvaluationFormHandler.java +++ b/src/main/java/org/olat/modules/portfolio/handler/EvaluationFormHandler.java @@ -130,24 +130,19 @@ public class EvaluationFormHandler implements PageElementHandler { boolean readOnly = (pageStatus == PageStatus.published) || (pageStatus == PageStatus.closed) || (pageStatus == PageStatus.deleted); EvaluationFormSession session = portfolioService.loadOrCreateSession(survey, ureq.getIdentity()); ctrl = new EvaluationFormExecutionController(ureq, wControl, session, readOnly, false); - } else if(hasRole(PortfolioRoles.coach, ureq.getIdentity(), accessRights)) { + } else if(hasRole(PortfolioRoles.coach, ureq.getIdentity(), accessRights) + || hasRole(PortfolioRoles.reviewer, ureq.getIdentity(), accessRights) + || hasRole(PortfolioRoles.invitee, ureq.getIdentity(), accessRights)) { Identity owner = getOwner(accessRights); EvaluationFormSession session = portfolioService.loadOrCreateSession(survey, owner); ctrl = new EvaluationFormExecutionController(ureq, wControl, session, true, false); - } else if(hasRole(PortfolioRoles.reviewer, ureq.getIdentity(), accessRights) - || hasRole(PortfolioRoles.invitee, ureq.getIdentity(), accessRights)) { - if(assignment.isReviewerSeeAutoEvaluation()) { - Identity owner = getOwner(accessRights); - EvaluationFormSession session = portfolioService.loadOrCreateSession(survey, owner); - ctrl = new EvaluationFormExecutionController(ureq, wControl, session, true, false); - } } } else { if(hasRole(PortfolioRoles.owner, ureq.getIdentity(), accessRights)) { boolean readOnly = (pageStatus == PageStatus.published) || (pageStatus == PageStatus.closed) || (pageStatus == PageStatus.deleted) || onePage; Identity owner = getOwner(accessRights); List<Identity> coachesAndReviewers = getCoachesAndReviewers(accessRights); - if(coachesAndReviewers.size() > 0) { + if(!coachesAndReviewers.isEmpty()) { ctrl = new MultiEvaluationFormController(ureq, wControl, owner, coachesAndReviewers, survey, false, readOnly, onePage, anonym); } else { EvaluationFormSession session = portfolioService.loadOrCreateSession(survey, ureq.getIdentity()); -- GitLab