Skip to content

Commit

Permalink
PLAG-209 Sakai Report Links can cause error because of unknown user
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Holladay authored and Bryan Holladay committed Sep 18, 2014
1 parent 8b7ad1c commit adf5881
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 1,375 deletions.
46 changes: 23 additions & 23 deletions assignment-10x.patch
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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;
Expand All @@ -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;
}

Expand Down Expand Up @@ -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);
Expand All @@ -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());
Expand All @@ -358,7 +358,7 @@ Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssign
}

}
@@ -12060,15 +12190,34 @@
@@ -12064,15 +12194,34 @@



Expand Down Expand Up @@ -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
Expand All @@ -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()) {
Expand All @@ -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())
Expand All @@ -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)
<tr>
<th>
Expand All @@ -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)
Expand Down Expand Up @@ -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
</label>
</div>
Expand Down Expand Up @@ -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
</div>
<br/>
Expand All @@ -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")
<br/>
@@ -769,6 +775,7 @@
@@ -770,6 +776,7 @@
#end
</div>
</div>
Expand All @@ -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)
Expand All @@ -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)
Expand Down
30 changes: 15 additions & 15 deletions assignment-28x.patch
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 @@

Expand Down Expand Up @@ -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 @@
<dependency>
Expand All @@ -57,7 +57,7 @@ Index: assignment-impl/impl/pom.xml
<groupId>org.sakaiproject.entitybroker</groupId>
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;
Expand Down Expand Up @@ -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);
Expand All @@ -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());
Expand Down Expand Up @@ -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 @@
<dependency>
Expand All @@ -387,7 +387,7 @@ Index: assignment-tool/tool/pom.xml
<groupId>org.sakaiproject</groupId>
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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -474,7 +474,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor
+<!-- end: chef_assignments_instructor_list_submissions.vm -->
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 @@
</label>
Expand All @@ -495,7 +495,7 @@ Index: assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor
+<!-- end: chef_assignments_instructor_new_edit_assignment.vm -->
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)
Expand All @@ -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)
Expand Down
Loading

0 comments on commit adf5881

Please sign in to comment.