diff --git a/assignment-10x.patch b/assignment-10x.patch index 7d8eae3..271c2a3 100644 --- a/assignment-10x.patch +++ b/assignment-10x.patch @@ -1,6 +1,6 @@ Index: assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java =================================================================== ---- assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (revision 309635) +--- assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (revision 313694) +++ assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (working copy) @@ -264,5 +264,5 @@ * Post attachments to the content review service @@ -11,9 +11,9 @@ Index: assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSub } Index: assignment-bundles/resources/assignment.properties =================================================================== ---- assignment-bundles/resources/assignment.properties (revision 309635) +--- assignment-bundles/resources/assignment.properties (revision 313694) +++ assignment-bundles/resources/assignment.properties (working copy) -@@ -666,7 +666,7 @@ +@@ -667,7 +667,7 @@ review.use = Use {0} review.allow = Allow students to view report @@ -22,7 +22,7 @@ Index: assignment-bundles/resources/assignment.properties review.submit.papers.repository=Submit papers to the following repository: review.submit.papers.repository.none=None review.submit.papers.repository.standard=Standard Paper Repository -@@ -687,12 +687,14 @@ +@@ -688,12 +688,14 @@ review.exclude.matches.percentage=Percentage: review.exclude.matches.value_error=A value from 0-100 is required when excluding small matches for Turnitin. review.exclude.matches.header=Exclusion options: @@ -40,7 +40,7 @@ Index: assignment-bundles/resources/assignment.properties Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java =================================================================== ---- assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (revision 309635) +--- assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (revision 313694) +++ assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (working copy) @@ -22,6 +22,7 @@ package org.sakaiproject.assignment.impl; @@ -58,7 +58,7 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign import java.io.*; import java.text.Normalizer; import java.text.NumberFormat; -@@ -9940,104 +9942,232 @@ +@@ -9944,104 +9946,232 @@ return -2; } @@ -318,9 +318,9 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign + if(contentId != null){ + try{ + if (allowGradeSubmission(getReference())){ -+ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); + }else{ -+ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); + } + } catch (QueueException e) { + M_log.debug(e.getMessage(), e); @@ -345,9 +345,9 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign + String contentId = cr.getId(); + + if (allowGradeSubmission(getReference())) -+ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); + else -+ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); + + } catch (Exception e) { + M_log.warn(":getReviewReport() " + e.getMessage()); @@ -358,7 +358,7 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign } } -@@ -12060,15 +12190,34 @@ +@@ -12064,15 +12194,34 @@ @@ -400,7 +400,7 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign { Index: assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java =================================================================== ---- assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (revision 309635) +--- assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (revision 313694) +++ assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (working copy) @@ -927,7 +927,12 @@ // Check whether content review service is enabled, present and enabled for this site @@ -416,7 +416,7 @@ Index: assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/Assignment if (allowReviewService && contentReviewService != null && contentReviewService.isSiteAcceptable(s)) { //put the review service stings in context String reviewServiceName = contentReviewService.getServiceName(); -@@ -5646,8 +5651,8 @@ +@@ -5660,8 +5665,8 @@ //Post the attachments before clearing so that we don't sumbit duplicate attachments //Check if we need to post the attachments if (a.getContent().getAllowReviewService()) { @@ -427,7 +427,7 @@ Index: assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/Assignment } } -@@ -5706,7 +5711,7 @@ +@@ -5720,7 +5725,7 @@ { // add each attachment if ((!attachments.isEmpty()) && a.getContent().getAllowReviewService()) @@ -438,9 +438,9 @@ Index: assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/Assignment Iterator it = attachments.iterator(); Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (revision 313694) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (working copy) -@@ -197,7 +197,7 @@ +@@ -201,7 +201,7 @@ #if($allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) @@ -451,7 +451,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor #if (!$submission) Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (revision 313694) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (working copy) @@ -554,7 +554,7 @@ #if ($allowReviewService && $assignment.getContent().AllowReviewService) @@ -483,9 +483,9 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (revision 313694) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (working copy) -@@ -603,12 +603,29 @@ +@@ -604,12 +604,29 @@ $reviewServiceUse @@ -516,7 +516,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor $tlang.getString("content_review.note") $tlang.getString("review.submit.papers.repository") -@@ -636,17 +653,6 @@ +@@ -637,17 +654,6 @@ #end
@@ -534,7 +534,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor #if($show_NEW_ASSIGNMENT_REVIEW_SERVICE_EXCLUDE_BIBLIOGRAPHIC || $show_NEW_ASSIGNMENT_REVIEW_SERVICE_EXCLUDE_QUOTED || $show_NEW_ASSIGNMENT_REVIEW_SERVICE_EXCLUDE_SMALL_MATCHES) $tlang.getString("review.exclude.matches.header")
-@@ -769,6 +775,7 @@ +@@ -770,6 +776,7 @@ #end @@ -544,7 +544,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor #if ($!withGrade && $!withGradebook) Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (revision 313694) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (working copy) @@ -136,7 +136,7 @@ #if($allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) @@ -557,7 +557,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_vi #if (!$submission) Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (revision 313694) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (working copy) @@ -297,7 +297,7 @@ #if($!submitted && $!timeSubmitted && $allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) diff --git a/assignment-28x.patch b/assignment-28x.patch index 2a3b13c..4b317e5 100644 --- a/assignment-28x.patch +++ b/assignment-28x.patch @@ -1,6 +1,6 @@ Index: assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java =================================================================== ---- assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (revision 309635) +--- assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (revision 313698) +++ assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (working copy) @@ -233,5 +233,5 @@ * Post attachments to the content review service @@ -11,7 +11,7 @@ Index: assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSub } Index: assignment-bundles/assignment.properties =================================================================== ---- assignment-bundles/assignment.properties (revision 309635) +--- assignment-bundles/assignment.properties (revision 313698) +++ assignment-bundles/assignment.properties (working copy) @@ -608,12 +608,15 @@ @@ -40,7 +40,7 @@ Index: assignment-bundles/assignment.properties +send.submission.releasereturn.email=Send notification email to student when the grade is released and resubmission is available Index: assignment-impl/impl/pom.xml =================================================================== ---- assignment-impl/impl/pom.xml (revision 309635) +--- assignment-impl/impl/pom.xml (revision 313698) +++ assignment-impl/impl/pom.xml (working copy) @@ -93,10 +93,12 @@ @@ -57,7 +57,7 @@ Index: assignment-impl/impl/pom.xml org.sakaiproject.entitybroker Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java =================================================================== ---- assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (revision 309635) +--- assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (revision 313698) +++ assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (working copy) @@ -8763,63 +8763,171 @@ return -2; @@ -297,9 +297,9 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign + if(contentId != null){ + try{ + if (allowGradeSubmission(getReference())){ -+ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); + }else{ -+ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); + } + } catch (QueueException e) { + M_log.debug(e.getMessage(), e); @@ -321,10 +321,10 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign if (allowGradeSubmission(getReference())) - return contentReviewService.getReviewReportInstructor(contentId); -+ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); else - return contentReviewService.getReviewReportStudent(contentId); -+ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); } catch (Exception e) { M_log.warn(":getReviewReport() " + e.getMessage()); @@ -375,7 +375,7 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign { Index: assignment-tool/tool/pom.xml =================================================================== ---- assignment-tool/tool/pom.xml (revision 309635) +--- assignment-tool/tool/pom.xml (revision 313698) +++ assignment-tool/tool/pom.xml (working copy) @@ -36,6 +36,7 @@ @@ -387,7 +387,7 @@ Index: assignment-tool/tool/pom.xml org.sakaiproject Index: assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java =================================================================== ---- assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (revision 309635) +--- assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (revision 313698) +++ assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (working copy) @@ -823,7 +823,12 @@ // Check whether content review service is enabled, present and enabled for this site @@ -425,7 +425,7 @@ Index: assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/Assignment Iterator it = attachments.iterator(); Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (revision 313698) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (working copy) @@ -188,7 +188,7 @@ #if($allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) @@ -438,7 +438,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor #if (!$submission || $submission.getReviewReport().equalsIgnoreCase("Error")) Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (revision 313698) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (working copy) @@ -488,7 +488,7 @@ #if ($allowReviewService && $assignment.getContent().AllowReviewService) @@ -474,7 +474,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor + Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (revision 313698) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (working copy) @@ -483,6 +483,9 @@ @@ -495,7 +495,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor + Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (revision 313698) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (working copy) @@ -115,7 +115,7 @@ #if($allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) @@ -508,7 +508,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_vi #if (!$submission || $submission.getReviewReport().equalsIgnoreCase("Error")) Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (revision 313698) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (working copy) @@ -286,7 +286,7 @@ #if($!submitted && $!timeSubmitted && $allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) diff --git a/assignment-29x.patch b/assignment-29x.patch index 1da5e41..1147d85 100644 --- a/assignment-29x.patch +++ b/assignment-29x.patch @@ -1,6 +1,6 @@ Index: assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java =================================================================== ---- assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (revision 309635) +--- assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (revision 313698) +++ assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (working copy) @@ -241,5 +241,5 @@ * Post attachments to the content review service @@ -11,7 +11,7 @@ Index: assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSub } Index: assignment-bundles/resources/assignment.properties =================================================================== ---- assignment-bundles/resources/assignment.properties (revision 309635) +--- assignment-bundles/resources/assignment.properties (revision 313698) +++ assignment-bundles/resources/assignment.properties (working copy) @@ -618,7 +618,7 @@ @@ -36,7 +36,7 @@ Index: assignment-bundles/resources/assignment.properties ## notification email content Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java =================================================================== ---- assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (revision 309635) +--- assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (revision 313698) +++ assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (working copy) @@ -9283,71 +9283,174 @@ return -2; @@ -283,9 +283,9 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign + if(contentId != null){ + try{ + if (allowGradeSubmission(getReference())){ -+ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); + }else{ -+ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); + } + } catch (QueueException e) { + M_log.debug(e.getMessage(), e); @@ -307,10 +307,10 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign if (allowGradeSubmission(getReference())) - return contentReviewService.getReviewReportInstructor(contentId); -+ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); else - return contentReviewService.getReviewReportStudent(contentId); -+ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference()); ++ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference(), UserDirectoryService.getCurrentUser().getId()); } catch (Exception e) { M_log.warn(":getReviewReport() " + e.getMessage()); @@ -361,7 +361,7 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign { Index: assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java =================================================================== ---- assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (revision 309635) +--- assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (revision 313698) +++ assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (working copy) @@ -837,7 +837,12 @@ // Check whether content review service is enabled, present and enabled for this site @@ -399,7 +399,7 @@ Index: assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/Assignment Iterator it = attachments.iterator(); Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (revision 313698) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (working copy) @@ -188,7 +188,7 @@ #if($allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) @@ -412,7 +412,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor #if (!$submission) Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (revision 313698) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (working copy) @@ -505,7 +505,7 @@ #if ($allowReviewService && $assignment.getContent().AllowReviewService) @@ -444,7 +444,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (revision 313698) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (working copy) @@ -509,12 +509,29 @@ $reviewServiceUse @@ -505,7 +505,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor #if ($!withGrade && $!withGradebook) Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (revision 313698) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (working copy) @@ -115,7 +115,7 @@ #if($allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) @@ -518,7 +518,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_vi #if (!$submission) Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm =================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (revision 309635) +--- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (revision 313698) +++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (working copy) @@ -286,7 +286,7 @@ #if($!submitted && $!timeSubmitted && $allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) diff --git a/assignment.patch b/assignment.patch deleted file mode 100644 index 77d07f5..0000000 --- a/assignment.patch +++ /dev/null @@ -1,570 +0,0 @@ -Index: assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java -=================================================================== ---- assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (revision 309635) -+++ assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java (working copy) -@@ -264,5 +264,5 @@ - * Post attachments to the content review service - * @param attachments - */ -- public void postAttachment(List attachments); -+ public void postAssignmentToContentReviewService(String inlineText, List attachments); - } -Index: assignment-bundles/resources/assignment.properties -=================================================================== ---- assignment-bundles/resources/assignment.properties (revision 309635) -+++ assignment-bundles/resources/assignment.properties (working copy) -@@ -669,7 +669,7 @@ - - review.use = Use {0} - review.allow = Allow students to view report --review.report = Turnitin Report -+review.report = Report - review.submit.papers.repository=Submit papers to the following repository: - review.submit.papers.repository.none=None - review.submit.papers.repository.standard=Standard Paper Repository -@@ -690,12 +690,14 @@ - review.exclude.matches.percentage=Percentage: - review.exclude.matches.value_error=A value from 0-100 is required when excluding small matches for Turnitin. - review.exclude.matches.header=Exclusion options: -+review.acceptInlineAndAllAttachments=Inline text and all attachments will be submitted -+review.not.acceptInlineAndAllAttachments=Only the first attachment will be submitted - - gen.sorbyreview = Sort by review - gen.rev = TurnItIn - review.notavail = Not available yet - review.viewreport = View Report --review.title = {0} Service -+review.title = {0} - review.noreport = no report - review.contentReviewIndicator=Originality of attachments will be verified by {0}. - -Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java -=================================================================== ---- assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (revision 309635) -+++ assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (working copy) -@@ -22,6 +22,7 @@ - package org.sakaiproject.assignment.impl; - - import au.com.bytecode.opencsv.CSVWriter; -+ - import org.apache.commons.codec.binary.Base64; - import org.apache.commons.lang.StringUtils; - import org.apache.commons.lang.math.NumberUtils; -@@ -90,6 +91,7 @@ - - import javax.servlet.http.HttpServletRequest; - import javax.servlet.http.HttpServletResponse; -+ - import java.io.*; - import java.text.Normalizer; - import java.text.NumberFormat; -@@ -9966,104 +9968,232 @@ - return -2; - } - -- if (m_submittedAttachments.isEmpty()) { -+ if (m_submittedAttachments.isEmpty() -+ && (!contentReviewService.acceptInlineAndMultipleAttachments() || (contentReviewService.acceptInlineAndMultipleAttachments() && (this.getSubmittedText() == null || "".equals(this.getSubmittedText().trim()))))) { - M_log.debug(this + " getReviewScore No attachments submitted."); - return -2; - } - else - { -- //we may have already retrived this one -- if (m_reviewScore != null && m_reviewScore > -1) { -- M_log.debug("returning stored value of " + m_reviewScore); -- return m_reviewScore.intValue(); -- } -+ Set requeueContentIds = new HashSet(); -+ String requeueInlineText = null; -+ if(contentReviewService.acceptInlineAndMultipleAttachments()){ -+ //check inline text first: -+ boolean oneAccepted = false; -+ //check inline if there is any data: -+ if(this.getSubmittedText() != null && !"".equals(this.getSubmittedText().trim())){ -+ try{ -+ Long status = contentReviewService.getReviewStatus(contentReviewService.getInlineTextId(getAssignment().getReference(), getSubmitterId(), this.getTimeSubmitted().getTime())); -+ if (status != null && (status.equals(ContentReviewItem.NOT_SUBMITTED_CODE) || status.equals(ContentReviewItem.SUBMITTED_AWAITING_REPORT_CODE))) { -+ M_log.debug(this + " getReviewStatus returned a status of: " + status); -+ }else{ -+ oneAccepted = true; -+ } -+ }catch (QueueException cie) { -+ //inline text can't be found, try to resubmit it: -+ requeueInlineText = this.getSubmittedText(); -+ } -+ } - -- ContentResource cr = getFirstAcceptableAttachement(); -- if (cr == null ) -- { -- M_log.debug(this + " getReviewScore No suitable attachments found in list"); -- return -2; -- } -+ for( int i =0; i < m_submittedAttachments.size();i++ ) { -+ if(oneAccepted){ -+ break; -+ } -+ Reference ref = (Reference)m_submittedAttachments.get(i); -+ ContentResource contentResource = (ContentResource)ref.getEntity(); -+ try{ -+ if(contentReviewService.isAcceptableContent(contentResource)){ -+ Long status = contentReviewService.getReviewStatus(contentResource.getId()); -+ if (status != null && (status.equals(ContentReviewItem.NOT_SUBMITTED_CODE) || status.equals(ContentReviewItem.SUBMITTED_AWAITING_REPORT_CODE))) { -+ M_log.debug(this + " getReviewStatus returned a status of: " + status); -+ }else{ -+ oneAccepted = true; -+ } -+ } -+ }catch (QueueException cie) { -+ //try to resubmit attachment -+ requeueContentIds.add(contentResource.getId()); -+ } -+ } -+ if(!oneAccepted){ -+ M_log.debug("Couldn't find any accepted materials"); -+ return -2; -+ } - -+ //next get the scores of each content and show the highest score: -+ int highestScore = 0; -+ boolean oneScored = false; -+ if(this.getSubmittedText() != null && !"".equals(this.getSubmittedText().trim())){ -+ //inline text: -+ try{ -+ int score = contentReviewService.getReviewScore(contentReviewService.getInlineTextId(getAssignment().getReference(), getSubmitterId(), getTimeSubmitted().getTime()), getAssignment().getReference(), getSubmitterId()); -+ oneScored = true; -+ if(score > highestScore){ -+ highestScore = score; -+ } -+ }catch (QueueException cie) { -+ //inline text can't be found, try to resubmit it: -+ requeueInlineText = this.getSubmittedText(); -+ } catch (ReportException e) { -+ M_log.error(e.getMessage(), e); -+ } catch (Exception e) { -+ M_log.error(e.getMessage(), e); -+ } -+ } -+ //now get the attachments: -+ for( int i =0; i < m_submittedAttachments.size();i++ ) { -+ Reference ref = (Reference)m_submittedAttachments.get(i); -+ ContentResource contentResource = (ContentResource)ref.getEntity(); -+ if(contentReviewService.isAcceptableContent(contentResource)){ -+ try{ -+ int score = contentReviewService.getReviewScore(contentResource.getId(), getAssignment().getReference(), getSubmitterId()); -+ oneScored = true; -+ if(score > highestScore){ -+ highestScore = score; -+ } -+ }catch (QueueException cie) { -+ //try to resubmit attachment -+ requeueContentIds.add(contentResource.getId()); -+ } catch (ReportException e) { -+ M_log.error(e.getMessage(), e); -+ } catch (Exception e) { -+ M_log.error(e.getMessage(), e); -+ } -+ } -+ } -+ if(!oneScored && requeueContentIds.size() == 0 && requeueInlineText == null){ -+ //more likely service is down -+ return -2; -+ } -+ if(requeueContentIds.size() > 0 || requeueInlineText != null){ -+ try { -+ contentReviewService.queueContent(getSubmitterId(), this.getContext(), getAssignment().getReference(), new ArrayList(requeueContentIds), requeueInlineText, getTimeSubmitted().getTime()); -+ } catch (QueueException e) { -+ M_log.warn(" getReviewScore multiple queue: Unable to queue content with content review Service: " + e.getMessage()); -+ } -+ } -+ -+ return highestScore; -+ }else{ -+ //single file upload -+ //we may have already retrived this one -+ if (m_reviewScore != null && m_reviewScore > -1) { -+ M_log.debug("returning stored value of " + m_reviewScore); -+ return m_reviewScore.intValue(); -+ } -+ -+ ContentResource cr = getFirstAcceptableAttachement(); -+ if (cr == null ) -+ { -+ M_log.debug(this + " getReviewScore No suitable attachments found in list"); -+ return -2; -+ } - -+ try { -+ //we need to find the first attachment the CR will accept -+ String contentId = cr.getId(); -+ M_log.debug(this + " getReviewScore checking for score for content: " + contentId); - -- try { -- //we need to find the first attachment the CR will accept -- String contentId = cr.getId(); -- M_log.debug(this + " getReviewScore checking for score for content: " + contentId); -+ Long status = contentReviewService.getReviewStatus(contentId); -+ if (status != null && (status.equals(ContentReviewItem.NOT_SUBMITTED_CODE) || status.equals(ContentReviewItem.SUBMITTED_AWAITING_REPORT_CODE))) { -+ M_log.debug(this + " getReviewStatus returned a status of: " + status); -+ return -2; -+ } - -- Long status = contentReviewService.getReviewStatus(contentId); -- if (status != null && (status.equals(ContentReviewItem.NOT_SUBMITTED_CODE) || status.equals(ContentReviewItem.SUBMITTED_AWAITING_REPORT_CODE))) { -- M_log.debug(this + " getReviewStatus returned a status of: " + status); -- return -2; -- } -+ int score = contentReviewService.getReviewScore(contentId, getAssignment().getReference(), getSubmitterId()); -+ m_reviewScore = score; -+ M_log.debug(this + " getReviewScore CR returned a score of: " + score); -+ return score; - -- int score = contentReviewService.getReviewScore(contentId); -- m_reviewScore = score; -- M_log.debug(this + " getReviewScore CR returned a score of: " + score); -- return score; -- -- } -- catch (QueueException cie) { -- //should we add the item -- try { -- -+ }catch (QueueException cie) { -+ //should we add the item -+ try { -+ - M_log.debug(this + " getReviewScore Item is not in queue we will try add it"); - String contentId = cr.getId(); - String userId = this.getSubmitterId(); -- try { -- contentReviewService.queueContent(userId, null, getAssignment().getReference(), contentId); -+ try { -+ contentReviewService.queueContent(userId, null, getAssignment().getReference(), Arrays.asList(contentId), null, getTimeSubmitted().getTime()); - } - catch (QueueException qe) { - M_log.warn(" getReviewScore Unable to queue content with content review Service: " + qe.getMessage()); - } -- -- -- -- } catch (Exception e) { -- e.printStackTrace(); -+ -+ -+ -+ } catch (Exception e) { -+ e.printStackTrace(); -+ } -+ return -1; -+ - } -- return -1; -- -- } -- catch (Exception e) { -- M_log.warn(this + " getReviewScore " + e.getMessage()); -- return -1; -- } -- -- } -- -- -+ -+ catch (Exception e) { -+ M_log.warn(this + " getReviewScore " + e.getMessage()); -+ return -1; -+ } -+ } -+ } - } - - public String getReviewReport() { - // Code to get updated report if default -- if (m_submittedAttachments.isEmpty()) { -+ if (m_submittedAttachments.isEmpty() -+ && (!contentReviewService.acceptInlineAndMultipleAttachments() || (contentReviewService.acceptInlineAndMultipleAttachments() && (this.getSubmittedText() == null || "".equals(this.getSubmittedText().trim()))))) { - M_log.debug(this.getId() + " getReviewReport No attachments submitted."); - return "Error"; - } - else - { -- try { -+ if(contentReviewService.acceptInlineAndMultipleAttachments()){ -+ //sent it the first acceptable attachment (or inline text id) so that the -+ //service can look up information based on that -+ String contentId = null; - ContentResource cr = getFirstAcceptableAttachement(); -- if (cr == null ) -- { -- M_log.debug(this + " getReviewReport No suitable attachments found in list"); -- return "error"; -+ if(cr == null && getSubmittedText() != null && !"".equals(getSubmittedText())){ -+ contentId = contentReviewService.getInlineTextId(getAssignment().getReference(), getSubmitterId(), this.getTimeSubmitted().getTime()); -+ }else if(cr != null){ -+ contentId = cr.getId(); - } -- -- String contentId = cr.getId(); -- -- if (allowGradeSubmission(getReference())) -- return contentReviewService.getReviewReportInstructor(contentId); -- else -- return contentReviewService.getReviewReportStudent(contentId); -- -- } catch (Exception e) { -- M_log.warn(":getReviewReport() " + e.getMessage()); -- return "Error"; -+ if(contentId != null){ -+ try{ -+ if (allowGradeSubmission(getReference())){ -+ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference()); -+ }else{ -+ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference()); -+ } -+ } catch (QueueException e) { -+ M_log.debug(e.getMessage(), e); -+ return "Error"; -+ } catch (ReportException e) { -+ M_log.debug(e.getMessage(), e); -+ return "Error"; -+ } -+ }else{ -+ M_log.debug("couldn't find an acceptable content id for getReviewReport"); -+ return "Error"; -+ } -+ }else{ -+ try { -+ ContentResource cr = getFirstAcceptableAttachement(); -+ if (cr == null ) -+ { -+ M_log.debug(this + " getReviewReport No suitable attachments found in list"); -+ return "error"; -+ } -+ -+ String contentId = cr.getId(); -+ -+ if (allowGradeSubmission(getReference())) -+ return contentReviewService.getReviewReportInstructor(contentId, getAssignment().getReference()); -+ else -+ return contentReviewService.getReviewReportStudent(contentId, getAssignment().getReference()); -+ -+ } catch (Exception e) { -+ M_log.warn(":getReviewReport() " + e.getMessage()); -+ return "Error"; -+ } - } -- - } - - } -@@ -12086,15 +12216,34 @@ - - - -- public void postAttachment(List attachments){ -+ public void postAssignmentToContentReviewService(String inlineText, List attachments){ - //Send the attachment to the review service -- - try { -- ContentResource cr = getFirstAcceptableAttachement(attachments); - Assignment ass = this.getAssignment(); -- if (ass != null && cr != null) -+ if (ass != null) - { -- contentReviewService.queueContent(null, null, ass.getReference(), cr.getId()); -+ String userId = this.getSubmitterId(); -+ List contentIds = new ArrayList(); -+ if(contentReviewService.acceptInlineAndMultipleAttachments()){ -+ for( int i =0; i < attachments.size();i++ ) { -+ Reference attachment = (Reference)attachments.get(i); -+ try { -+ ContentResource res = m_contentHostingService.getResource(attachment.getId()); -+ if(contentReviewService.isAcceptableContent(res)){ -+ contentIds.add(res.getId()); -+ } -+ }catch(Exception e){ -+ M_log.warn(e.getMessage(), e); -+ } -+ } -+ }else{ -+ //single file upload -+ ContentResource cr = getFirstAcceptableAttachement(attachments); -+ if(cr != null){ -+ contentIds.add(cr.getId()); -+ } -+ } -+ contentReviewService.queueContent(userId, this.getContext(), ass.getReference(), contentIds, inlineText, this.getTimeSubmitted().getTime()); - } - else - { -Index: assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java -=================================================================== ---- assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (revision 309635) -+++ assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (working copy) -@@ -921,7 +921,12 @@ - // Check whether content review service is enabled, present and enabled for this site - getContentReviewService(); - context.put("allowReviewService", allowReviewService && contentReviewService != null && contentReviewService.isSiteAcceptable(s)); -- -+ if(contentReviewService != null && contentReviewService.acceptInlineAndMultipleAttachments()){ -+ context.put("acceptInlineAndMultipleAttachments", true); -+ }else{ -+ context.put("acceptInlineAndMultipleAttachments", false); -+ } -+ - if (allowReviewService && contentReviewService != null && contentReviewService.isSiteAcceptable(s)) { - //put the review service stings in context - String reviewServiceName = contentReviewService.getServiceName(); -@@ -5634,8 +5639,8 @@ - //Post the attachments before clearing so that we don't sumbit duplicate attachments - //Check if we need to post the attachments - if (a.getContent().getAllowReviewService()) { -- if (!attachments.isEmpty()) { -- sEdit.postAttachment(attachments); -+ if (!attachments.isEmpty() || (contentReviewService.acceptInlineAndMultipleAttachments() && sEdit.getSubmittedText() != null && !"".equals(sEdit.getSubmittedText().trim()))) { -+ sEdit.postAssignmentToContentReviewService(sEdit.getSubmittedText(), attachments); - } - } - -@@ -5694,7 +5699,7 @@ - { - // add each attachment - if ((!attachments.isEmpty()) && a.getContent().getAllowReviewService()) -- edit.postAttachment(attachments); -+ edit.postAssignmentToContentReviewService(edit.getSubmittedText(), attachments); - - // add each attachment - Iterator it = attachments.iterator(); -Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm -=================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (revision 309635) -+++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_grading_submission.vm (working copy) -@@ -197,7 +197,7 @@ - #if($allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) - - -- $tlang.getString("review.report") -+ $reviewServiceName $tlang.getString("review.report") - - - #if (!$submission) -Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm -=================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (revision 309635) -+++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm (working copy) -@@ -554,7 +554,7 @@ - #if ($allowReviewService && $assignment.getContent().AllowReviewService) - - -- $tlang.getString("gen.rev") -+ $reviewServiceName - #if ($sortedBy.equals($!sort_submitReview)) - #if ($sortedAsc.equals("true")) - $tlang.getString( -@@ -750,13 +750,14 @@ - #end - #if ($allowReviewService && $assignment.getContent().AllowReviewService) - -- #if ($submission.getReviewScore() == -1) -+ #set ($reviewScore = $submission.getReviewScore()) -+ #if ($reviewScore == -1) -
$!submission.getReviewError()
-- #elseif ($submission.getReviewScore() == -2) -+ #elseif ($reviewScore == -2) - $tlang.getString("review.noreport") - #else --
-- $submission.getReviewScore() -+ -+ $reviewScore - - #end - -Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm -=================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (revision 309635) -+++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm (working copy) -@@ -603,12 +603,29 @@ - $reviewServiceUse - - -+ - #if ($!value_UseReviewService.equals("true")) -
- #else - -
--
-- #if ($!value_AllowStudentView.equals("true")) -- -- #else -- -- #end -- --
--
- #if($show_NEW_ASSIGNMENT_REVIEW_SERVICE_EXCLUDE_BIBLIOGRAPHIC || $show_NEW_ASSIGNMENT_REVIEW_SERVICE_EXCLUDE_QUOTED || $show_NEW_ASSIGNMENT_REVIEW_SERVICE_EXCLUDE_SMALL_MATCHES) - $tlang.getString("review.exclude.matches.header") -
-@@ -769,6 +775,7 @@ - #end -
- -+ #end - - #end - #if ($!withGrade && $!withGradebook) -Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm -=================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (revision 309635) -+++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_grade.vm (working copy) -@@ -136,7 +136,7 @@ - #if($allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) - - -- $tlang.getString("review.report") -+ $reviewServiceName $tlang.getString("review.report") - - - #if (!$submission) -Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm -=================================================================== ---- assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (revision 309635) -+++ assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_student_view_submission.vm (working copy) -@@ -297,7 +297,7 @@ - #if($!submitted && $!timeSubmitted && $allowReviewService && $assignment.getContent().AllowReviewService && $assignment.getContent().AllowStudentViewReport) - - -- $tlang.getString("review.report") -+ $reviewServiceName $tlang.getString("review.report") - - - #if ($submission.getReviewReport().equalsIgnoreCase("Error")) diff --git a/assignment2_trunk.patch b/assignment2_trunk.patch deleted file mode 100644 index 38d12b3..0000000 --- a/assignment2_trunk.patch +++ /dev/null @@ -1,744 +0,0 @@ -Index: api/src/java/org/sakaiproject/assignment2/hbm/Assignment2.hbm.xml -=================================================================== ---- api/src/java/org/sakaiproject/assignment2/hbm/Assignment2.hbm.xml (revision 86659) -+++ api/src/java/org/sakaiproject/assignment2/hbm/Assignment2.hbm.xml (working copy) -@@ -95,6 +95,10 @@ - - - -+ -+ -+ -+ - - -Index: api/src/java/org/sakaiproject/assignment2/logic/ExternalContentReviewLogic.java -=================================================================== ---- api/src/java/org/sakaiproject/assignment2/logic/ExternalContentReviewLogic.java (revision 86659) -+++ api/src/java/org/sakaiproject/assignment2/logic/ExternalContentReviewLogic.java (working copy) -@@ -23,6 +23,7 @@ - - import java.util.Collection; - import java.util.List; -+import java.util.Set; - - import org.sakaiproject.assignment2.model.Assignment2; - import org.sakaiproject.assignment2.model.SubmissionAttachment; -@@ -62,9 +63,9 @@ - * calling this method - * @param userId if null, assumes current user - * @param assign the assignment that this attachment is associated with -- * @param attachmentReference the reference for the attachment in content hosting -+ * @param attachments the reference for the attachments in content hosting - */ -- public void reviewAttachment(String userId, Assignment2 assign, String attachmentReference); -+ public void reviewAttachment(String userId, Assignment2 assign, Set attachments); - - /** - * -@@ -92,17 +93,18 @@ - * pass instructorView = false and the assignment is set up with the option - * prohibiting students from viewing the reports, the properties will not be populated - */ -- public void populateReviewProperties(Assignment2 assignment, Collection attachments, boolean instructorView); -+ public void populateReviewProperties(Assignment2 assignment, Collection attachments, boolean instructorView, String userId); - - /** - * - * @param attachmentReference - * @param instructorView true if you want the report for an instructor. false if - * you want the report for the student -+ * @param assign - * @return the url of the review report for the given attachmentReference. Returns - * null if url cannot be retrieved - */ -- public String getReportUrl(String attachmentReference, boolean instructorView); -+ public String getReportUrl(String attachmentReference, Assignment2 assign, boolean instructorView); - - /** - * -@@ -122,4 +124,10 @@ - public void createAssignment(Assignment2 assing); - - public void populateAssignmentPropertiesFromAssignment(Assignment2 assign); -+ -+ /** -+ * returns content review service name -+ * @return -+ */ -+ public String getServiceName(); - } -Index: api/src/java/org/sakaiproject/assignment2/model/Assignment2.java -=================================================================== ---- api/src/java/org/sakaiproject/assignment2/model/Assignment2.java (revision 86659) -+++ api/src/java/org/sakaiproject/assignment2/model/Assignment2.java (working copy) -@@ -60,6 +60,7 @@ - private String eventId; - private int numSubmissionsAllowed; - private boolean contentReviewEnabled; -+ private Boolean contentReviewStudentViewReport; - private String contentReviewRef; - private boolean modelAnswerEnabled; - private String modelAnswerText; -@@ -873,4 +874,17 @@ - - return points; - } -+ -+ public Boolean isContentReviewStudentViewReport() { -+ if(contentReviewStudentViewReport == null){ -+ return false; -+ }else{ -+ return contentReviewStudentViewReport; -+ } -+ } -+ -+ public void setContentReviewStudentViewReport( -+ Boolean contentReviewStudentViewReport) { -+ this.contentReviewStudentViewReport = contentReviewStudentViewReport; -+ } - } -Index: api/src/java/org/sakaiproject/assignment2/model/constants/AssignmentConstants.java -=================================================================== ---- api/src/java/org/sakaiproject/assignment2/model/constants/AssignmentConstants.java (revision 86659) -+++ api/src/java/org/sakaiproject/assignment2/model/constants/AssignmentConstants.java (working copy) -@@ -248,6 +248,7 @@ - * Set this property to true if you want to turn on the Turnitin option for assignment2 - */ - public static final String TII_ENABLED = "turnitin.enable.assignment2"; -+ public static final String CONTENT_REVIEW_ENABLED = "assignment2.useContentReview"; - - /** - * This property is specific to Turnitin implementation of ContentReview. -Index: api/src/java/org/sakaiproject/assignment2/service/model/AssignmentDefinition.java -=================================================================== ---- api/src/java/org/sakaiproject/assignment2/service/model/AssignmentDefinition.java (revision 86659) -+++ api/src/java/org/sakaiproject/assignment2/service/model/AssignmentDefinition.java (working copy) -@@ -52,6 +52,7 @@ - private int submissionType; - private boolean requiresSubmission; - private boolean contentReviewEnabled; -+ private boolean contentReviewStudentViewReport; - - private List groupRestrictionGroupTitles; - private List attachmentReferences; -@@ -309,4 +310,13 @@ - this.properties = properties; - } - -+ public boolean isContentReviewStudentViewReport() { -+ return contentReviewStudentViewReport; -+ } -+ -+ public void setContentReviewStudentViewReport( -+ boolean contentReviewStudentViewReport) { -+ this.contentReviewStudentViewReport = contentReviewStudentViewReport; -+ } -+ - } -Index: bundle/messages.properties -=================================================================== ---- bundle/messages.properties (revision 86659) -+++ bundle/messages.properties (working copy) -@@ -896,8 +896,8 @@ - - To upload your changes to the Assignments tool, use a ZIP utility to compress and save the {0} folder in .zip format. Then go to the Grade page for this assignment, click the Upload Feedback link, browse to the file you just created, and select it. Then follow the on-screen instructions. - - assignment2.turnitin.asnnedit.title = Turnitin --assignment2.turnitin.asnnedit.use_turnitin = Use Turnitin --assignment2.turnitin.asnnedit.attachment.warning = Turnitin supports attachments only. Reports will not be generated for text-only submissions. -+assignment2.turnitin.asnnedit.use_turnitin = Use {0} -+assignment2.turnitin.asnnedit.attachment.warning = Reports will not be generated for text-only submissions. - assignment2.turnitin.asnnedit.supported_formats = Supported Formats - assignment2.turnitin.asnnedit.submit_papers_to = Submit papers to the following repository: - # These map to the AssignmentConstants.TII_VALUE_NO_REPO, TII_VALUE_INSTITUTION_REPO, and TII_VALUE_STANDARD_REPO values -@@ -928,8 +928,8 @@ - assignment2.turnitin.asnnedit.error.check_against2 = Please select at least one source. - - # Student view --assignment2.turnitin.submit.warning.inst_and_student=Originality of attachments will be verified by Turnitin. Both you and your instructor will receive the results. --assignment2.turnitin.submit.warning.inst_only=Originality of attachments will be verified by Turnitin, and your instructor will receive the results. -+assignment2.turnitin.submit.warning.inst_and_student=Originality of attachments will be verified by {0}. Both you and your instructor will receive the results. -+assignment2.turnitin.submit.warning.inst_only=Originality of attachments will be verified by {0}, and your instructor will receive the results. - assignment2.turnitin.file_requirements = Requirements for files submitted to Turnitin - - # Error messages returned by content review service -@@ -998,4 +998,4 @@ - assignment2.event.retractAllFeedback = Feedback retracted for all students. - assignment2.event.releaseAllGrades = Grades released for all students. - assignment2.event.retractAllGrades = Grades retracted for all students. --assignment2.event.uploadFeedbackAndGrades = Grades and feedback uploaded as csv or zip file. -\ No newline at end of file -+assignment2.event.uploadFeedbackAndGrades = Grades and feedback uploaded as csv or zip file. -Index: impl/src/java/org/sakaiproject/assignment2/logic/impl/AssignmentLogicImpl.java -=================================================================== ---- impl/src/java/org/sakaiproject/assignment2/logic/impl/AssignmentLogicImpl.java (revision 86659) -+++ impl/src/java/org/sakaiproject/assignment2/logic/impl/AssignmentLogicImpl.java (working copy) -@@ -283,6 +283,7 @@ - if (!externalContentReviewLogic.isContentReviewAvailable(assignment.getContextId())) { - if (log.isDebugEnabled()) log.debug("Content review turned off b/c not available in this site"); - assignment.setContentReviewEnabled(false); -+ assignment.setContentReviewStudentViewReport(false); - } - } - -@@ -457,6 +458,7 @@ - // we don't want TII enabled to be left as true - if (newIntegration) { - assignment.setContentReviewEnabled(false); -+ assignment.setContentReviewStudentViewReport(false); - assignment.setContentReviewRef(null); - dao.update(assignment); - } -@@ -1091,6 +1093,7 @@ - assignDef.setGraded(assignment.isGraded()); - assignDef.setRequiresSubmission(assignment.isRequiresSubmission()); - assignDef.setContentReviewEnabled(assignment.isContentReviewEnabled()); -+ assignDef.setContentReviewStudentViewReport(assignment.isContentReviewStudentViewReport()); - - // if it is graded, we need to retrieve the name of the associated gb item - if (assignment.isGraded() && assignment.getGradebookItemId() != null && -Index: impl/src/java/org/sakaiproject/assignment2/logic/impl/AssignmentSubmissionLogicImpl.java -=================================================================== ---- impl/src/java/org/sakaiproject/assignment2/logic/impl/AssignmentSubmissionLogicImpl.java (revision 86659) -+++ impl/src/java/org/sakaiproject/assignment2/logic/impl/AssignmentSubmissionLogicImpl.java (working copy) -@@ -395,12 +395,16 @@ - // ASNN-516 now let's run these attachments through the content review service, if appropriate - if (!version.isDraft() && assignment.isContentReviewEnabled() && subAttachSet != null) { - if (contentReviewLogic.isContentReviewAvailable(assignment.getContextId())) { -+ Set attachments = new HashSet(); - for (SubmissionAttachment att : subAttachSet) { - if (contentReviewLogic.isAttachmentAcceptableForReview(att.getAttachmentReference())) { - if (log.isDebugEnabled()) log.debug("Adding attachment " + att.getAttachmentReference() + " to review queue for student " + userId); -- contentReviewLogic.reviewAttachment(userId, assignment, att.getAttachmentReference()); -+ attachments.add(att); - } - } -+ if(attachments.size() > 0){ -+ contentReviewLogic.reviewAttachment(userId, assignment, attachments); -+ } - } - } - } -Index: impl/src/java/org/sakaiproject/assignment2/logic/impl/ExternalContentReviewLogicImpl.java -=================================================================== ---- impl/src/java/org/sakaiproject/assignment2/logic/impl/ExternalContentReviewLogicImpl.java (revision 86659) -+++ impl/src/java/org/sakaiproject/assignment2/logic/impl/ExternalContentReviewLogicImpl.java (working copy) -@@ -26,10 +26,12 @@ - import java.text.DateFormat; - import java.text.SimpleDateFormat; - import java.util.ArrayList; -+import java.util.Arrays; - import java.util.Collection; - import java.util.HashMap; - import java.util.List; - import java.util.Map; -+import java.util.Set; - - import org.apache.commons.logging.Log; - import org.apache.commons.logging.LogFactory; -@@ -88,7 +90,8 @@ - if (contentReview != null) { - // check and see if Turnitin was enabled - String turnitinEnabled = serverConfigurationService.getString(AssignmentConstants.TII_ENABLED, "false"); -- if ("true".equals(turnitinEnabled)) { -+ String contentReviewEnabled = serverConfigurationService.getString(AssignmentConstants.CONTENT_REVIEW_ENABLED, "false"); -+ if ("true".equals(turnitinEnabled) || "true".equals(contentReviewEnabled)) { - // we need to see if it was enabled at the site level - Site site = externalLogic.getSite(siteId); - if (site != null && contentReview.isSiteAcceptable(site)) { -@@ -107,20 +110,32 @@ - return isContentReviewAvailable(siteId); - } - -- public void reviewAttachment(String userId, Assignment2 assign, String attachmentReference) { -- if (assign == null || attachmentReference == null) { -+ public void reviewAttachment(String userId, Assignment2 assign, Set attachments) { -+ if (assign == null || attachments == null) { - throw new IllegalArgumentException("Null assignment or contentId passed to " + -- "reviewAttachments. assign: " + " contentId: " + attachmentReference); -+ "reviewAttachments. assign: " + " contentId: "); - } - - try - { -- contentReview.queueContent(userId, assign.getContextId(), getTaskId(assign), attachmentReference); -+ List resources = new ArrayList(); -+ for(SubmissionAttachment attach : attachments){ -+ ContentResource resource = contentLogic.getContentResource(attach.getAttachmentReference()); -+ if(resource != null){ -+ resources.add(resource); -+ } -+ } -+ -+ if (resources.size() > 0) { -+ contentReview.queueContent(userId, assign.getContextId(), getTaskId(assign), resources); -+ }else{ -+ throw new IllegalArgumentException("contentId passed to reviewAttachments is invalid and can't be found; contentId: "); -+ } - } - catch (QueueException e) - { - // this is thrown if this attachment has already been queued -- log.warn("Attempt to queue content via the ContentReviewService that has already been queued. Content id:" + attachmentReference); -+ log.warn("Attempt to queue content via the ContentReviewService that has already been queued. Content id:"); - } - } - -@@ -186,7 +201,7 @@ - } - } - -- public void populateReviewProperties(Assignment2 assignment, Collection attachments, boolean instructorView) { -+ public void populateReviewProperties(Assignment2 assignment, Collection attachments, boolean instructorView, String userId) { - if (assignment == null) { - throw new IllegalArgumentException("Null assignment passed to populateReviewProperties"); - } -@@ -203,8 +218,7 @@ - populateAssignmentPropertiesFromAssignment(assignment); - } - -- if (assignment.getProperties() != null && assignment.getProperties().containsKey("s_view_report") && -- (Boolean)assignment.getProperties().get("s_view_report")) { -+ if (assignment.isContentReviewStudentViewReport()) { - populateReports = true; - } else { - populateReports = false; -@@ -237,12 +251,33 @@ - { - Long status = contentReview.getReviewStatus(attach.getAttachmentReference()); - reviewItem.setStatus(status); -+ if(!"TurnItIn".equalsIgnoreCase(contentReview.getServiceName())){ -+ //look up score if it exist -+ int reviewScore = contentReview.getReviewScore(attach.getAttachmentReference(), getTaskId(assignment), userId); -+ reviewItem.setReviewScore(reviewScore); -+ if(reviewItem.getStatus() == null && reviewScore >= 0){ -+ //found the score, set status to 3l -+ reviewItem.setStatus(3l); -+ } -+ } - } - catch (QueueException e) - { - if (log.isDebugEnabled()) log.debug("Attempt to retrieve status for attachment that has not been queued"); - // this attachment has not been submitted so leave ContentReviewItem empty -- } -+ ContentResource resource = contentLogic.getContentResource(attach.getAttachmentReference()); -+ if(resource != null){ -+ try { -+ contentReview.queueContent(userId, assignment.getContextId(), getTaskId(assignment), Arrays.asList(resource)); -+ } catch (QueueException e1) { -+ if (log.isDebugEnabled()) log.debug("Attempt to re-queue but failed", e); -+ } -+ } -+ } catch (ReportException e) { -+ if (log.isDebugEnabled()) log.debug("Report exception, requeueing", e); -+ } catch (Exception e) { -+ if (log.isDebugEnabled()) log.debug("Attempt to retrieve status for attachment that has not been queued", e); -+ } - } - - populateProperties(assignment, reviewItem, attach, instructorView); -@@ -274,7 +309,7 @@ - } - - // now retrieve the report url if status shows it exists -- String reportUrl = getReportUrl(attach.getAttachmentReference(), instructorView); -+ String reportUrl = getReportUrl(attach.getAttachmentReference(), assign, instructorView); - if (reportUrl != null) { - reviewInfo.setReviewUrl(reportUrl); - } -@@ -286,7 +321,7 @@ - } - } - -- public String getReportUrl(String attachmentReference, boolean instructorView) { -+ public String getReportUrl(String attachmentReference, Assignment2 assign, boolean instructorView) { - if (attachmentReference == null) { - throw new IllegalArgumentException("Null attachmentReference passed to getReportUrl"); - } -@@ -296,7 +331,7 @@ - if (instructorView) { - try - { -- reportUrl = contentReview.getReviewReportInstructor(attachmentReference); -+ reportUrl = contentReview.getReviewReportInstructor(attachmentReference, getTaskId(assign)); - } - catch (QueueException e) - { -@@ -313,7 +348,7 @@ - } else { - try - { -- reportUrl = contentReview.getReviewReportStudent(attachmentReference); -+ reportUrl = contentReview.getReviewReportStudent(attachmentReference, getTaskId(assign)); - } - catch (QueueException e) - { -@@ -379,14 +414,16 @@ - // never ever stops us from loading an assignment. - log.error(e); - } -- -+ if(asnnmap == null){ -+ asnnmap = new HashMap(); -+ } - boolean useGradeMark = serverConfigurationService.getBoolean(AssignmentConstants.TII_PROP_GRADEMARK_ENABLED, false); - //Check Grade - if(useGradeMark){ - try { - contentReview.getReviewScore(assign.getContextId()+ - "#"+assign.getContentReviewRef()+ -- "#"+assign.getTitle()); -+ "#"+assign.getTitle(), getTaskId(assign), null); - - }catch(Exception e){ - log.error(e); -@@ -457,6 +494,10 @@ - private void setTurnitinBooleanOption(Map asnnobj, String mapname, Assignment2 assign, String propname) { - if (asnnobj.containsKey(mapname) && asnnobj.get(mapname).equals("1")) { - assign.getProperties().put(propname, new Boolean(true)); -+ if(AssignmentConstants.TII_API_PARAM_S_VIEW_REPORT.equals(propname)){ -+ //this handles old assignments that relied on TII for this setting (instead of sakai's db) -+ assign.setContentReviewStudentViewReport(true); -+ } - } - else { - assign.getProperties().put(propname, new Boolean(false)); -@@ -503,6 +544,7 @@ - } - - try { -+ opts.put("title", assign.getTitle()); - contentReview.createAssignment(assign.getContextId(), - this.getTaskId(assign), opts); - } catch (Exception e) { -@@ -530,5 +572,9 @@ - public void setExternalLogic(ExternalLogic externalLogic) { - this.externalLogic = externalLogic; - } -+ -+ public String getServiceName(){ -+ return contentReview.getServiceName(); -+ } - - } -\ No newline at end of file -Index: impl/src/java/org/sakaiproject/assignment2/logic/impl/ImportExportLogicImpl.java -=================================================================== ---- impl/src/java/org/sakaiproject/assignment2/logic/impl/ImportExportLogicImpl.java (revision 86659) -+++ impl/src/java/org/sakaiproject/assignment2/logic/impl/ImportExportLogicImpl.java (working copy) -@@ -211,9 +211,11 @@ - // content review settings - if (contentReviewAvailable) { - newAssignment.setContentReviewEnabled(assignDef.isContentReviewEnabled()); -+ newAssignment.setContentReviewStudentViewReport(assignDef.isContentReviewStudentViewReport()); - newAssignment.setProperties(assignDef.getProperties()); - } else { - newAssignment.setContentReviewEnabled(false); -+ newAssignment.setContentReviewStudentViewReport(false); - } - - // if this item is graded, we need to link it up to a -Index: tool/src/java/org/sakaiproject/assignment2/tool/beans/Assignment2Creator.java -=================================================================== ---- tool/src/java/org/sakaiproject/assignment2/tool/beans/Assignment2Creator.java (revision 86659) -+++ tool/src/java/org/sakaiproject/assignment2/tool/beans/Assignment2Creator.java (working copy) -@@ -94,6 +94,7 @@ - dup.setRequiresSubmission(assignment.isRequiresSubmission()); - dup.setProperties(assignment.getProperties()); - dup.setContentReviewEnabled(assignment.isContentReviewEnabled()); -+ dup.setContentReviewStudentViewReport(assignment.isContentReviewStudentViewReport()); - - // let's duplicate the attachments and group restrictions - Set assignGroupSet = new HashSet(); -Index: tool/src/java/org/sakaiproject/assignment2/tool/beans/Assignment2Validator.java -=================================================================== ---- tool/src/java/org/sakaiproject/assignment2/tool/beans/Assignment2Validator.java (revision 86659) -+++ tool/src/java/org/sakaiproject/assignment2/tool/beans/Assignment2Validator.java (working copy) -@@ -21,11 +21,11 @@ - - package org.sakaiproject.assignment2.tool.beans; - -+import org.sakaiproject.assignment2.logic.ExternalContentReviewLogic; - import org.sakaiproject.assignment2.logic.ExternalGradebookLogic; - import org.sakaiproject.service.gradebook.shared.Assignment; - import org.sakaiproject.assignment2.model.Assignment2; - import org.sakaiproject.assignment2.model.constants.AssignmentConstants; -- - import org.sakaiproject.service.gradebook.shared.GradebookService.PointsPossibleValidation; - import org.sakaiproject.assignment2.logic.GradebookItem; - -@@ -52,6 +52,11 @@ - public void setExternalGradebookLogic(ExternalGradebookLogic externalGradebookLogic) { - this.externalGradebookLogic = externalGradebookLogic; - } -+ -+ private ExternalContentReviewLogic externalContentReviewLogic; -+ public void setExternalContentReviewLogic(ExternalContentReviewLogic externalContentReviewLogic){ -+ this.externalContentReviewLogic = externalContentReviewLogic; -+ } - - /** - * Validates the Assignment2 object. Currently checks to make sure there -@@ -159,7 +164,7 @@ - } - - // Validate the turnitin options ASNN-516 -- if (assignment.isContentReviewEnabled()) { -+ if (assignment.isContentReviewEnabled() && "TurnItIn".equals(externalContentReviewLogic.getServiceName())) { - // check to see if the user wants to generate reports related to due date - // but there is no due date - if (assignment.getProperties().containsKey("report_gen_speed") && -Index: tool/src/java/org/sakaiproject/assignment2/tool/beans/AssignmentAuthoringBean.java -=================================================================== ---- tool/src/java/org/sakaiproject/assignment2/tool/beans/AssignmentAuthoringBean.java (revision 86659) -+++ tool/src/java/org/sakaiproject/assignment2/tool/beans/AssignmentAuthoringBean.java (working copy) -@@ -234,10 +234,12 @@ - // we need to turn off turnitin since assignment doesn't accept submissions. the - // turnitin section was hidden via javascript - assignment.setContentReviewEnabled(false); -+ assignment.setContentReviewStudentViewReport(false); - } else if (!assignment.acceptsAttachments()) { - // double check that this assignment is set up to accept attachments. if not, turn TII off - // (this is done via javascript in the UI) - assignment.setContentReviewEnabled(false); -+ assignment.setContentReviewStudentViewReport(false); - } - } - -Index: tool/src/java/org/sakaiproject/assignment2/tool/entity/Assignment2SubmissionEntityProvider.java -=================================================================== ---- tool/src/java/org/sakaiproject/assignment2/tool/entity/Assignment2SubmissionEntityProvider.java (revision 86659) -+++ tool/src/java/org/sakaiproject/assignment2/tool/entity/Assignment2SubmissionEntityProvider.java (working copy) -@@ -524,16 +524,13 @@ - - if (submissions != null && !submissions.isEmpty()) { - // collect all of the attachments for review -- List attachToReview = new ArrayList(); - for (AssignmentSubmission submission : submissions) { - AssignmentSubmissionVersion currVersion = submission.getCurrentSubmissionVersion(); - if (currVersion != null && currVersion.getSubmissionAttachSet() != null) { -- attachToReview.addAll(currVersion.getSubmissionAttachSet()); -+ // populate the review properties on the attachments -+ contentReviewLogic.populateReviewProperties(assign, currVersion.getSubmissionAttachSet(), true, submission.getUserId()); - } - } -- -- // populate the review properties on the attachments -- contentReviewLogic.populateReviewProperties(assign, attachToReview, true); - } - } - -Index: tool/src/java/org/sakaiproject/assignment2/tool/producers/AssignmentProducer.java -=================================================================== ---- tool/src/java/org/sakaiproject/assignment2/tool/producers/AssignmentProducer.java (revision 86659) -+++ tool/src/java/org/sakaiproject/assignment2/tool/producers/AssignmentProducer.java (working copy) -@@ -723,10 +723,21 @@ - */ - private void renderTurnitinArea(UIContainer tofill, String assignment2OTP, - Assignment2 assignment, UIForm form) { -- Map props = assignment.getProperties(); -+ Map props = assignment.getProperties(); - -- UIOutput.make(tofill, "tii_content_review_area"); -+ UIOutput.make(tofill, "tii_content_review_area"); - -+ String contentReviewServiceName = externalContentReviewLogic.getServiceName(); -+ boolean isTII = "TurnItIn".equals(contentReviewServiceName); -+ UIOutput.make(tofill, "assignment2.contentreview.asnnedit.title", contentReviewServiceName); -+ -+ UIBoundBoolean.make(form, "use_tii", assignment2OTP + ".contentReviewEnabled"); -+ UIBoundBoolean.make(form, "allow_students_to_see_originality_checkbox", -+ assignment2OTP + ".contentReviewStudentViewReport"); -+ UIOutput.make(tofill, "tii_enabled_area"); -+ UIOutput.make(tofill, "contentReview_properties"); -+ UIMessage.make(tofill, "assignment2.turnitin.asnnedit.use_turnitin", "assignment2.turnitin.asnnedit.use_turnitin", new Object[] {contentReviewServiceName}); -+ if(isTII){ - // If a Turnitin assignment has already been created for this assignment, - // then we except there to be some sort of return code from the call - // that would have been made to populate the properties. -@@ -745,7 +756,7 @@ - } - } - -- UIOutput.make(tofill, "tii_enabled_area"); -+ - UIOutput.make(tofill, "tii_properties"); - - // add the supported formats link, if specified in sakai.properties -@@ -754,7 +765,6 @@ - UILink.make(tofill, "tii_supported_formats", messageLocator.getMessage("assignment2.turnitin.asnnedit.supported_formats"), supportedFormatsUrl); - } - -- UIBoundBoolean.make(form, "use_tii", assignment2OTP + ".contentReviewEnabled"); - - // Submit papers to repository - List repoOptions = localTurnitinLogic.getSubmissionRepositoryOptions(); -@@ -845,10 +855,9 @@ - UISelectChoice.make(form, "gen_report_on_due_date", gen_reports_select_id, 1); - UISelectLabel.make(form, "gen_report_on_due_date_label", gen_reports_select_id, 1); - -- UIBoundBoolean.make(form, "allow_students_to_see_originality_checkbox", -- assignment2OTP + ".properties.s_view_report"); - - -+ - // set the checkboxes to default to true - boolean checkPaperRepo = assignment.getProperties().containsKey("s_paper_check") ? - (Boolean)assignment.getProperties().get("s_paper_check") : true; -@@ -944,6 +953,7 @@ - UIBoundBoolean.make(form, "ets_usage_checkbox",assignment2OTP + ".properties.ets_usage", ets_usage); - - } -+ } - } - - public ViewParameters getViewParameters() { -Index: tool/src/java/org/sakaiproject/assignment2/tool/producers/GradeProducer.java -=================================================================== ---- tool/src/java/org/sakaiproject/assignment2/tool/producers/GradeProducer.java (revision 86659) -+++ tool/src/java/org/sakaiproject/assignment2/tool/producers/GradeProducer.java (working copy) -@@ -583,7 +583,7 @@ - UIOutput.make(versionContainer, "submitted_attachments_fieldset"); - - if (contentReviewEnabled && version.getSubmissionAttachSet() != null && !version.getSubmissionAttachSet().isEmpty()) { -- contentReviewLogic.populateReviewProperties(assignment, version.getSubmissionAttachSet(), true); -+ contentReviewLogic.populateReviewProperties(assignment, version.getSubmissionAttachSet(), true, version.getAssignmentSubmission().getUserId()); - } - - attachmentListRenderer.makeAttachmentFromSubmissionAttachmentSet(versionContainer, "submitted_attachment_list:", params.viewID, -Index: tool/src/java/org/sakaiproject/assignment2/tool/producers/renderers/AsnnSubmissionVersionRenderer.java -=================================================================== ---- tool/src/java/org/sakaiproject/assignment2/tool/producers/renderers/AsnnSubmissionVersionRenderer.java (revision 86659) -+++ tool/src/java/org/sakaiproject/assignment2/tool/producers/renderers/AsnnSubmissionVersionRenderer.java (working copy) -@@ -123,7 +123,7 @@ - if (submissionType == AssignmentConstants.SUBMIT_ATTACH_ONLY || submissionType == AssignmentConstants.SUBMIT_INLINE_AND_ATTACH) { - if (asnnSubVersion.getSubmissionAttachSet() != null && !asnnSubVersion.getSubmissionAttachSet().isEmpty()){ - if (assignment.isContentReviewEnabled() && contentReviewLogic.isContentReviewAvailable(assignment.getContextId())) { -- contentReviewLogic.populateReviewProperties(assignment, asnnSubVersion.getSubmissionAttachSet(), false); -+ contentReviewLogic.populateReviewProperties(assignment, asnnSubVersion.getSubmissionAttachSet(), false, asnnSubVersion.getAssignmentSubmission().getUserId()); - } - UIMessage.make(joint, "submission-attachments-header", "assignment2.student-submit.submitted_attachments"); - attachmentListRenderer.makeAttachmentFromSubmissionAttachmentSet(joint, "submission-attachment-list:", viewParameters.viewID, -Index: tool/src/java/org/sakaiproject/assignment2/tool/producers/renderers/AsnnSubmitEditorRenderer.java -=================================================================== ---- tool/src/java/org/sakaiproject/assignment2/tool/producers/renderers/AsnnSubmitEditorRenderer.java (revision 86659) -+++ tool/src/java/org/sakaiproject/assignment2/tool/producers/renderers/AsnnSubmitEditorRenderer.java (working copy) -@@ -341,10 +341,10 @@ - attachSection.decorate(new UIFreeAttributeDecorator("class", "messageConfirmation")); - } - -- if (assignment.getProperties().containsKey("s_view_report") && (Boolean)assignment.getProperties().get("s_view_report")) { -- UIMessage.make(joint, "plagiarism_check", "assignment2.turnitin.submit.warning.inst_and_student"); -+ if (assignment.isContentReviewStudentViewReport()) { -+ UIMessage.make(joint, "plagiarism_check", "assignment2.turnitin.submit.warning.inst_and_student", new Object[]{contentReviewLogic.getServiceName()}); - } else { -- UIMessage.make(joint, "plagiarism_check", "assignment2.turnitin.submit.warning.inst_only"); -+ UIMessage.make(joint, "plagiarism_check", "assignment2.turnitin.submit.warning.inst_only", new Object[]{contentReviewLogic.getServiceName()}); - } - - String fileRequirementsUrl = localTurnitinLogic.getSupportedFormatsUrl(); -Index: tool/src/webapp/WEB-INF/requestContext.xml -=================================================================== ---- tool/src/webapp/WEB-INF/requestContext.xml (revision 86659) -+++ tool/src/webapp/WEB-INF/requestContext.xml (working copy) -@@ -505,6 +505,7 @@ - - - -+ - - - -Index: tool/src/webapp/content/js/assignment.js -=================================================================== ---- tool/src/webapp/content/js/assignment.js (revision 86659) -+++ tool/src/webapp/content/js/assignment.js (working copy) -@@ -1310,7 +1310,8 @@ - - // validate the turnitin options ASNN-516 - var useTiiOption = jQuery("input[name='page-replace\:\:use_tii']").get(0); -- if (useTiiOption && useTiiOption.checked) { -+ var contentReviewName = jQuery(".contentReviewName").html(); -+ if (useTiiOption && useTiiOption.checked && "TurnItIn" === contentReviewName) { - // see if at least one checkbox was checked for the "check against" option - if (jQuery("input[name='page-replace\:\:check_against_student_repo_checkbox']").is(':checked') || - jQuery("input[name='page-replace\:\:check_against_internet_repo_checkbox']").is(':checked') || -Index: tool/src/webapp/content/templates/assignment.html -=================================================================== ---- tool/src/webapp/content/templates/assignment.html (revision 86659) -+++ tool/src/webapp/content/templates/assignment.html (working copy) -@@ -293,7 +293,7 @@ - - -
-- Turnitin -+ Turnitin - -
-
-@@ -306,15 +306,30 @@ -
-
- -- -+ - Supported Formats! - -
- -
-+ -