diff --git a/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java b/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java index 3d0d317bb1e1..63ca6627bd13 100644 --- a/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java +++ b/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java @@ -3602,13 +3602,13 @@ protected String build_instructor_grade_submission_context(VelocityPortlet portl } // Check if the assignment has a rubric associated or not - context.put("hasAssociatedRubric", rubricsService.hasAssociatedRubric(RubricsConstants.RBCS_TOOL_ASSIGNMENT, a.getId())); + context.put(RubricsConstants.HAS_ASSOCIATED_RUBRIC, rubricsService.hasAssociatedRubric(RubricsConstants.RBCS_TOOL_ASSIGNMENT, a.getId())); assignmentToolUtils.hasRubricSelfReport(context, a.getId()); if (a.getAllowPeerAssessment()) { List reviews = assignmentPeerAssessmentService.getPeerAssessmentItems(s.getId(), a.getScaleFactor()); if(reviews.size() > 1) { log.warn("More than one peer review were found for Rubric assignment"); } for(PeerAssessmentItem pai : reviews) { - context.put("assessorId", pai.getId().getAssessorUserId()); + context.put(RubricsConstants.ASSESSOR_ID, pai.getId().getAssessorUserId()); break; } } @@ -4838,7 +4838,7 @@ private String build_student_review_edit_context(VelocityPortlet portlet, Contex } } - context.put("hasAssociatedRubric", rubricsService.hasAssociatedRubric(RubricsConstants.RBCS_TOOL_ASSIGNMENT, assignment.getId())); + context.put(RubricsConstants.HAS_ASSOCIATED_RUBRIC, rubricsService.hasAssociatedRubric(RubricsConstants.RBCS_TOOL_ASSIGNMENT, assignment.getId())); if (s != null) { submissionId = s.getId(); @@ -4900,7 +4900,7 @@ private String build_student_review_edit_context(VelocityPortlet portlet, Contex } else { context.put("view_only", false); } - context.put("assessorId", peerAssessmentItem.getId().getAssessorUserId()); + context.put(RubricsConstants.ASSESSOR_ID, peerAssessmentItem.getId().getAssessorUserId()); // get attachments for peer review item List attachments = assignmentPeerAssessmentService.getPeerAssessmentAttachments(peerAssessmentItem.getId().getSubmissionId(), peerAssessmentItem.getId().getAssessorUserId()); List attachmentRefList = new ArrayList<>(); @@ -9254,7 +9254,7 @@ public void doView_assignment_as_student(RunData data) { public void doView_submissionReviews(RunData data) { String submissionId = data.getParameters().getString("submissionId"); SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); - String assessorId = data.getParameters().getString("assessorId"); + String assessorId = data.getParameters().getString(RubricsConstants.ASSESSOR_ID); String assignmentId = StringUtils.trimToNull(data.getParameters().getString("assignmentId")); Assignment a = getAssignment(assignmentId, "doEdit_assignment", state); if (submissionId != null && !"".equals(submissionId) && a != null) { diff --git a/rubrics/api/src/main/java/org/sakaiproject/rubrics/logic/RubricsConstants.java b/rubrics/api/src/main/java/org/sakaiproject/rubrics/logic/RubricsConstants.java index 4e0b7e3494ee..7f6fdf0a07b0 100644 --- a/rubrics/api/src/main/java/org/sakaiproject/rubrics/logic/RubricsConstants.java +++ b/rubrics/api/src/main/java/org/sakaiproject/rubrics/logic/RubricsConstants.java @@ -40,6 +40,8 @@ public interface RubricsConstants { public static final String RBCS_LIST = RBCS_PREFIX + RBCS_LIST_SUFFIX; public static final String RBCS_SOFT_DELETED = RBCS_PREFIX + "soft-deleted"; public static final String STUDENT_SELF_REPORT = "studentSelfReport"; + public static final String HAS_ASSOCIATED_RUBRIC = "hasAssociatedRubric"; + public static final String ASSESSOR_ID = "assessorId"; //samigo custom props public static final String RBCS_PUBLISHED_ASSESSMENT_ENTITY_PREFIX = "pub.";