Skip to content

Commit

Permalink
SAK-40851 Assignments: Allow Students to use Rubrics for the Peer
Browse files Browse the repository at this point in the history
  • Loading branch information
MRutea committed Nov 19, 2020
1 parent 3a01681 commit b88bdac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<PeerAssessmentItem> 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;
}
}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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<PeerAssessmentAttachment> attachments = assignmentPeerAssessmentService.getPeerAssessmentAttachments(peerAssessmentItem.getId().getSubmissionId(), peerAssessmentItem.getId().getAssessorUserId());
List<Reference> attachmentRefList = new ArrayList<>();
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down

0 comments on commit b88bdac

Please sign in to comment.