Index: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java =================================================================== --- assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (revision 89200) +++ assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java (working copy) @@ -1074,7 +1074,7 @@ } catch (IdUnusedException e) { - M_log.warn(this + " assignments(String, String) " + e.getMessage() + " context=" + context); + M_log.warn(" assignments(String, String) " + e.getMessage() + " context=" + context); } for (int x = 0; x < assignments.size(); x++) @@ -1103,7 +1103,7 @@ } catch (Exception ee) { - M_log.warn(this + " assignments(String, String) " + ee.getMessage() + " groupId = " + groupId); + M_log.warn(" assignments(String, String) " + ee.getMessage() + " groupId = " + groupId); } } @@ -1121,7 +1121,7 @@ } catch (Exception e) { - M_log.warn(this + " assignments(String, String) " + e.getMessage() + " assignment id =" + assignmentId); + M_log.warn(" assignments(String, String) " + e.getMessage() + " assignment id =" + assignmentId); continue; } } @@ -1230,7 +1230,7 @@ } catch (Exception e) { - M_log.warn(this + " commitEdit(): closed AssignmentEdit " + e.getMessage() + " assignment id=" + assignment.getId()); + M_log.warn(" commitEdit(): closed AssignmentEdit " + e.getMessage() + " assignment id=" + assignment.getId()); } return; } @@ -1267,7 +1267,7 @@ } catch (Exception e) { - M_log.warn(this + " cancelEdit(): closed AssignmentEdit " + e.getMessage() + " assignment id=" + assignment.getId()); + M_log.warn(" cancelEdit(): closed AssignmentEdit " + e.getMessage() + " assignment id=" + assignment.getId()); } return; } @@ -1297,7 +1297,7 @@ } catch (Exception e) { - M_log.warn(this + " removeAssignment(): closed AssignmentEdit" + e.getMessage() + " assignment id=" + assignment.getId()); + M_log.warn(" removeAssignment(): closed AssignmentEdit" + e.getMessage() + " assignment id=" + assignment.getId()); } return; } @@ -1321,7 +1321,7 @@ } catch (AuthzPermissionException e) { - M_log.warn(this + " removeAssignment: removing realm for assignment reference=" + assignment.getReference() + " : " + e.getMessage()); + M_log.warn(" removeAssignment: removing realm for assignment reference=" + assignment.getReference() + " : " + e.getMessage()); } } @@ -1344,7 +1344,7 @@ } catch (Exception e) { - M_log.warn(this + " removeAssignmentAndAllReferences(): closed AssignmentEdit" + e.getMessage() + " assignment id=" + assignment.getId()); + M_log.warn(" removeAssignmentAndAllReferences(): closed AssignmentEdit" + e.getMessage() + " assignment id=" + assignment.getId()); } return; } @@ -1382,14 +1382,14 @@ } catch (PermissionException e) { - M_log.warn(this + "removeAssignmentAndAllReference: User does not have permission to remove submission " + sReference + " for assignment: " + assignment.getId() + e.getMessage()); + M_log.warn("removeAssignmentAndAllReference: User does not have permission to remove submission " + sReference + " for assignment: " + assignment.getId() + e.getMessage()); } catch (InUseException e) { - M_log.warn(this + "removeAssignmentAndAllReference: submission " + sReference + " for assignment: " + assignment.getId() + " is in use. " + e.getMessage()); + M_log.warn("removeAssignmentAndAllReference: submission " + sReference + " for assignment: " + assignment.getId() + " is in use. " + e.getMessage()); }catch (IdUnusedException e) { - M_log.warn(this + "removeAssignmentAndAllReference: submission " + sReference + " for assignment: " + assignment.getId() + " does not exist. " + e.getMessage()); + M_log.warn("removeAssignmentAndAllReference: submission " + sReference + " for assignment: " + assignment.getId() + " does not exist. " + e.getMessage()); } } } @@ -1401,19 +1401,19 @@ } catch (AssignmentContentNotEmptyException e) { - M_log.warn(this + " removeAssignmentAndAllReferences(): cannot remove non-empty AssignmentContent object for assignment = " + assignment.getId() + ". " + e.getMessage()); + M_log.warn(" removeAssignmentAndAllReferences(): cannot remove non-empty AssignmentContent object for assignment = " + assignment.getId() + ". " + e.getMessage()); } catch (PermissionException e) { - M_log.warn(this + " removeAssignmentAndAllReferences(): not allowed to remove AssignmentContent object for assignment = " + assignment.getId() + ". " + e.getMessage()); + M_log.warn(" removeAssignmentAndAllReferences(): not allowed to remove AssignmentContent object for assignment = " + assignment.getId() + ". " + e.getMessage()); } catch (InUseException e) { - M_log.warn(this + " removeAssignmentAndAllReferences(): AssignmentContent object for assignment = " + assignment.getId() + " is in used. " + e.getMessage()); + M_log.warn(" removeAssignmentAndAllReferences(): AssignmentContent object for assignment = " + assignment.getId() + " is in used. " + e.getMessage()); } catch (IdUnusedException e) { - M_log.warn(this + " removeAssignmentAndAllReferences(): cannot find AssignmentContent object for assignment = " + assignment.getId() + ". " + e.getMessage()); + M_log.warn(" removeAssignmentAndAllReferences(): cannot find AssignmentContent object for assignment = " + assignment.getId() + ". " + e.getMessage()); } // 7. remove assignment @@ -1429,7 +1429,7 @@ } catch (AuthzPermissionException e) { - M_log.warn(this + " removeAssignment: removing realm for assignment reference=" + assignment.getReference() + " : " + e.getMessage()); + M_log.warn(" removeAssignment: removing realm for assignment reference=" + assignment.getReference() + " : " + e.getMessage()); } // track event @@ -1455,7 +1455,7 @@ } catch (PermissionException pe) { - M_log.warn(this + "removeAssociatedTaggingItem: User does not have permission to remove tags for assignment: " + assignment.getId() + " via transferCopyEntities"); + M_log.warn("removeAssociatedTaggingItem: User does not have permission to remove tags for assignment: " + assignment.getId() + " via transferCopyEntities"); } } @@ -1491,17 +1491,17 @@ } catch (IdUnusedException e) { - M_log.warn(this + "getCalendar: No calendar found for site: " + contextId); + M_log.warn("getCalendar: No calendar found for site: " + contextId); calendar = null; } catch (PermissionException e) { - M_log.warn(this + "getCalendar: The current user does not have permission to access " + + M_log.warn("getCalendar: The current user does not have permission to access " + "the calendar for context: " + contextId, e); } catch (Exception ex) { - M_log.warn(this + "getCalendar: Unknown exception occurred retrieving calendar for site: " + contextId, ex); + M_log.warn("getCalendar: Unknown exception occurred retrieving calendar for site: " + contextId, ex); calendar = null; } } @@ -1537,11 +1537,11 @@ catch (IdUnusedException ee) { // no action needed for this condition - M_log.warn(this + ":removeCalendarEvent " + ee.getMessage()); + M_log.warn(":removeCalendarEvent " + ee.getMessage()); } catch (PermissionException ee) { - M_log.warn(this + ":removeCalendarEvent " + ee.getMessage()); + M_log.warn(":removeCalendarEvent " + ee.getMessage()); } } @@ -1556,15 +1556,15 @@ } catch (PermissionException ee) { - M_log.warn(this + ":removeCalendarEvent not allowed to remove calendar event for assignment = " + aEdit.getTitle() + ". "); + M_log.warn(":removeCalendarEvent not allowed to remove calendar event for assignment = " + aEdit.getTitle() + ". "); } catch (InUseException ee) { - M_log.warn(this + ":removeCalendarEvent someone else is editing calendar event for assignment = " + aEdit.getTitle() + ". "); + M_log.warn(":removeCalendarEvent someone else is editing calendar event for assignment = " + aEdit.getTitle() + ". "); } catch (IdUnusedException ee) { - M_log.warn(this + ":removeCalendarEvent calendar event are in use for assignment = " + aEdit.getTitle() + " and event =" + event.getId()); + M_log.warn(":removeCalendarEvent calendar event are in use for assignment = " + aEdit.getTitle() + " and event =" + event.getId()); } } } @@ -1586,12 +1586,12 @@ } catch (IdUnusedException e) { - M_log.warn(this + "getAnnouncement:No announcement channel found"); + M_log.warn("getAnnouncement:No announcement channel found"); channel = null; } catch (PermissionException e) { - M_log.warn(this + "getAnnouncement:Current user not authorized to deleted annc associated " + + M_log.warn("getAnnouncement:Current user not authorized to deleted annc associated " + "with assignment. " + e.getMessage()); channel = null; } @@ -1621,7 +1621,7 @@ } catch (PermissionException e) { - M_log.warn(this + ":removeAnnouncement " + e.getMessage()); + M_log.warn(":removeAnnouncement " + e.getMessage()); } } } @@ -1786,7 +1786,7 @@ catch (Exception e) { - M_log.warn(this + " LEAVING ADD DUPLICATE CONTENT : " + e.toString()); + M_log.warn(" LEAVING ADD DUPLICATE CONTENT : " + e.toString()); } } } @@ -1995,7 +1995,7 @@ } catch (Exception e) { - M_log.warn(this + " commitEdit(): closed AssignmentContentEdit " + e + " content id=" + content.getId()); + M_log.warn(" commitEdit(): closed AssignmentContentEdit " + e + " content id=" + content.getId()); } return; } @@ -2032,7 +2032,7 @@ } catch (Exception e) { - M_log.warn(this + " cancelEdit(): closed AssignmentContentEdit " + e.getMessage() + " assignment content id=" + content.getId()); + M_log.warn(" cancelEdit(): closed AssignmentContentEdit " + e.getMessage() + " assignment content id=" + content.getId()); } return; } @@ -2068,7 +2068,7 @@ } catch (Exception e) { - M_log.warn(this + " removeAssignmentContent(): closed AssignmentContentEdit " + e.getMessage() + " assignment content id=" + content.getId()); + M_log.warn(" removeAssignmentContent(): closed AssignmentContentEdit " + e.getMessage() + " assignment content id=" + content.getId()); } return; } @@ -2220,7 +2220,7 @@ } catch (Exception e) { - M_log.warn(this + " editSubmission(): cannot get assignment for submission " + submissionReference + e.getMessage()); + M_log.warn(" editSubmission(): cannot get assignment for submission " + submissionReference + e.getMessage()); } } } @@ -2264,7 +2264,7 @@ } catch (Exception e) { - M_log.warn(this + " commitEdit(): closed AssignmentSubmissionEdit assignment submission id=" + submission.getId() + e.getMessage()); + M_log.warn(" commitEdit(): closed AssignmentSubmissionEdit assignment submission id=" + submission.getId() + e.getMessage()); } return; } @@ -2345,11 +2345,11 @@ } catch (IdUnusedException e) { - M_log.warn(this + " commitEdit(), submissionId=" + submissionRef, e); + M_log.warn(" commitEdit(), submissionId=" + submissionRef, e); } catch (PermissionException e) { - M_log.warn(this + " commitEdit(), submissionId=" + submissionRef, e); + M_log.warn(" commitEdit(), submissionId=" + submissionRef, e); } } // commitEdit(Submission) @@ -2566,7 +2566,7 @@ } catch (Exception ee) { - M_log.warn(this + " htmlContent(), site id =" + context + " " + ee.getMessage()); + M_log.warn(" htmlContent(), site id =" + context + " " + ee.getMessage()); } StringBuilder buffer = new StringBuilder(); @@ -2723,7 +2723,7 @@ } catch (Exception ee) { - M_log.warn(this + " htmlContentReleaseGrade(), site id =" + context + " " + ee.getMessage()); + M_log.warn(" htmlContentReleaseGrade(), site id =" + context + " " + ee.getMessage()); } StringBuilder buffer = new StringBuilder(); @@ -2753,7 +2753,7 @@ } catch (Exception e) { - M_log.warn(this + " cancelEdit(): closed AssignmentSubmissionEdit assignment submission id=" + submission.getId() + " " + e.getMessage()); + M_log.warn(" cancelEdit(): closed AssignmentSubmissionEdit assignment submission id=" + submission.getId() + " " + e.getMessage()); } return; } @@ -2786,7 +2786,7 @@ } catch (Exception e) { - M_log.warn(this + " removeSubmission(): closed AssignmentSubmissionEdit id=" + submission.getId() + " " + e.getMessage()); + M_log.warn(" removeSubmission(): closed AssignmentSubmissionEdit id=" + submission.getId() + " " + e.getMessage()); } return; } @@ -2811,11 +2811,11 @@ } catch (AuthzPermissionException e) { - M_log.warn(this + " removeSubmission: removing realm for : " + submission.getReference() + " : " + e.getMessage()); + M_log.warn(" removeSubmission: removing realm for : " + submission.getReference() + " : " + e.getMessage()); } catch (GroupNotDefinedException e) { - M_log.warn(this + " removeSubmission: cannot find group for submission " + submission.getReference() + " : " + e.getMessage()); + M_log.warn(" removeSubmission: cannot find group for submission " + submission.getReference() + " : " + e.getMessage()); } } }// removeSubmission @@ -3830,7 +3830,7 @@ } catch (Exception ee) { - M_log.warn(this + " allowGradeAssignmentUsers " + ee.getMessage() + " problem with getting user =" + userId); + M_log.warn(" allowGradeAssignmentUsers " + ee.getMessage() + " problem with getting user =" + userId); } } } @@ -3841,7 +3841,7 @@ } catch (Exception e) { - M_log.warn(this + " allowGradeAssignmentUsers " + e.getMessage() + " assignmentReference=" + assignmentReference); + M_log.warn(" allowGradeAssignmentUsers " + e.getMessage() + " assignmentReference=" + assignmentReference); } return users; @@ -3873,7 +3873,7 @@ } catch (Exception e) { - M_log.warn(this + " allowAddAnySubmissionUsers " + e.getMessage() + " context=" + context); + M_log.warn(" allowAddAnySubmissionUsers " + e.getMessage() + " context=" + context); } return rv; @@ -4081,7 +4081,7 @@ } catch (Exception e) { - M_log.warn(this + " getGradesSpreadSheet " + e.getMessage() + " userId = " + userId); + M_log.warn(" getGradesSpreadSheet " + e.getMessage() + " userId = " + userId); } } @@ -4186,7 +4186,7 @@ } catch (IOException e) { - M_log.warn(this + " getGradesSpreadsheet Can not output the grade spread sheet for reference= " + ref); + M_log.warn(" getGradesSpreadsheet Can not output the grade spread sheet for reference= " + ref); } return b.getBytes(); @@ -4302,12 +4302,12 @@ } catch (IdUnusedException aIdException) { - M_log.warn(this + ":getSubmitterIdList: Assignme id not used: " + aRef + " " + aIdException.getMessage()); + M_log.warn(":getSubmitterIdList: Assignme id not used: " + aRef + " " + aIdException.getMessage()); } catch (PermissionException aPerException) { - M_log.warn(this + ":getSubmitterIdList: Not allowed to get assignment " + aRef + " " + aPerException.getMessage()); + M_log.warn(":getSubmitterIdList: Not allowed to get assignment " + aRef + " " + aPerException.getMessage()); } return rv; @@ -4330,7 +4330,7 @@ try { groups.add(SiteService.getSite(contextString)); } catch (IdUnusedException e) { - M_log.warn(this + ":getSelectedGroupUsers cannot find site " + " " + contextString + e.getMessage()); + M_log.warn(":getSelectedGroupUsers cannot find site " + " " + contextString + e.getMessage()); } } else @@ -4349,7 +4349,7 @@ } catch (Exception e) { - M_log.warn(this + ":getSelectedGroupUsers " + e.getMessage() + " groupId=" + allOrOneGroup); + M_log.warn(":getSelectedGroupUsers " + e.getMessage() + " groupId=" + allOrOneGroup); } } @@ -4381,13 +4381,13 @@ } catch (UserNotDefinedException uException) { - M_log.warn(this + ":getSelectedGroupUsers " + uException.getMessage() + " userId =" + userId); + M_log.warn(":getSelectedGroupUsers " + uException.getMessage() + " userId =" + userId); } } } catch (GroupNotDefinedException gException) { - M_log.warn(this + ":getSelectedGroupUsers " + gException.getMessage() + " authGroupId=" + authzGroupRef); + M_log.warn(":getSelectedGroupUsers " + gException.getMessage() + " authGroupId=" + authzGroupRef); } } } @@ -4553,7 +4553,7 @@ } catch (UserNotDefinedException e) { - M_log.warn(this + ":getSubmissionsZip cannot find user id=" + uId + e.getMessage() + ""); + M_log.warn(":getSubmissionsZip cannot find user id=" + uId + e.getMessage() + ""); } } @@ -4568,7 +4568,7 @@ { // log any error messages - M_log.warn(this + " getSubmissionsZip ref=" + ref + exceptionMessage.toString()); + M_log.warn(" getSubmissionsZip ref=" + ref + exceptionMessage.toString()); } } } @@ -4581,7 +4581,7 @@ } catch (PermissionException e) { - M_log.warn(this + " getSubmissionsZip -PermissionException Not permitted to get assignment " + ref); + M_log.warn(" getSubmissionsZip -PermissionException Not permitted to get assignment " + ref); throw new PermissionException(SessionManager.getCurrentSessionUserId(), SECURE_ACCESS_ASSIGNMENT, ref); } @@ -4593,7 +4593,7 @@ try { out = new ZipOutputStream(outputStream); - // create the folder structor - named after the assignment's title + // create the folder structure - named after the assignment's title String root = Validator.escapeZipEntry(assignmentTitle) + Entity.SEPARATOR; String submittedText = ""; @@ -4736,7 +4736,7 @@ } catch (Exception e) { - caughtException = e.getMessage(); + caughtException = e.toString(); break; } } // if the user is still in site @@ -4760,12 +4760,12 @@ else { // log the error - exceptionMessage.append("Exception " + caughtException + " for creating submission zip file for assignment " + "\"" + assignmentTitle + "\"\n"); + exceptionMessage.append(" Exception " + caughtException + " for creating submission zip file for assignment " + "\"" + assignmentTitle + "\"\n"); } } catch (IOException e) { - exceptionMessage.append("IOException for creating submission zip file for assignment " + "\"" + assignmentTitle + "\"\n"); + exceptionMessage.append("IOException for creating submission zip file for assignment " + "\"" + assignmentTitle + "\" exceptio: " + e + "\n"); } finally { // Complete the ZIP file if (out != null) { @@ -4842,12 +4842,12 @@ } catch (IOException ioException) { - M_log.warn(this + ":zipAttachments: problem closing zip entry " + ioException.getMessage()); + M_log.warn(":zipAttachments: problem closing zip entry " + ioException); } } catch (IllegalArgumentException iException) { - M_log.warn(this + ":zipAttachments: problem creating BufferedInputStream with content and length " + data.length + iException.getMessage()); + M_log.warn(":zipAttachments: problem creating BufferedInputStream with content and length " + data.length + iException); } finally { @@ -4859,34 +4859,34 @@ } catch (IOException ioException) { - M_log.warn(this + ":zipAttachments: problem closing FileChannel " + ioException.getMessage()); + M_log.warn(":zipAttachments: problem closing FileChannel " + ioException); } } } } catch (PermissionException e) { - M_log.warn(this + " zipAttachments--PermissionException submittersName=" + M_log.warn(" zipAttachments--PermissionException submittersName=" + submittersName + " attachment reference=" + r); } catch (IdUnusedException e) { - M_log.warn(this + " zipAttachments--IdUnusedException submittersName=" + M_log.warn(" zipAttachments--IdUnusedException submittersName=" + submittersName + " attachment reference=" + r); } catch (TypeException e) { - M_log.warn(this + " zipAttachments--TypeException: submittersName=" + M_log.warn(" zipAttachments--TypeException: submittersName=" + submittersName + " attachment reference=" + r); } catch (IOException e) { - M_log.warn(this + " zipAttachments--IOException: Problem in creating the attachment file: submittersName=" + M_log.warn(" zipAttachments--IOException: Problem in creating the attachment file: submittersName=" + submittersName + " attachment reference=" + r + " error " + e); } catch (ServerOverloadException e) { - M_log.warn(this + " zipAttachments--ServerOverloadException: submittersName=" + M_log.warn(" zipAttachments--ServerOverloadException: submittersName=" + submittersName + " attachment reference=" + r); } finally @@ -4899,7 +4899,7 @@ } catch (IOException ioException) { - M_log.warn(this + ":zipAttachments: problem closing Inputstream content " + ioException.getMessage()); + M_log.warn(":zipAttachments: problem closing Inputstream content " + ioException); } } } @@ -5055,7 +5055,7 @@ } catch (Throwable ignore) { - M_log.warn(this + ": handleAccess 1 " + ignore.getMessage()); + M_log.warn(": handleAccess 1 " + ignore.getMessage()); } } } @@ -5081,7 +5081,7 @@ } catch (Throwable ignore) { - M_log.warn(this + ": handleAccess 2 " + ignore.getMessage()); + M_log.warn(": handleAccess 2 " + ignore.getMessage()); } finally { @@ -5093,7 +5093,7 @@ } catch (Throwable ignore) { - M_log.warn(this + ": handleAccess 3 " + ignore.getMessage()); + M_log.warn(": handleAccess 3 " + ignore.getMessage()); } } } @@ -5101,13 +5101,13 @@ } else { - M_log.warn(this + "handleAccess: throw IdUnusedException " + ref.getReference()); + M_log.warn("handleAccess: throw IdUnusedException " + ref.getReference()); throw new IdUnusedException(ref.getReference()); } } catch (Throwable t) { - M_log.warn(this + " HandleAccess: caught exception " + t.toString() + " and rethrow it!"); + M_log.warn(" HandleAccess: caught exception " + t.toString() + " and rethrow it!"); throw new EntityNotDefinedException(ref.getReference()); } } @@ -5195,19 +5195,19 @@ rv = getSubmission(ref.getReference()); } else - M_log.warn(this + "getEntity(): unknown message ref subtype: " + ref.getSubType() + " in ref: " + ref.getReference()); + M_log.warn("getEntity(): unknown message ref subtype: " + ref.getSubType() + " in ref: " + ref.getReference()); } catch (PermissionException e) { - M_log.warn(this + "getEntity(): " + e + " ref=" + ref.getReference()); + M_log.warn("getEntity(): " + e + " ref=" + ref.getReference()); } catch (IdUnusedException e) { - M_log.warn(this + "getEntity(): " + e + " ref=" + ref.getReference()); + M_log.warn("getEntity(): " + e + " ref=" + ref.getReference()); } catch (NullPointerException e) { - M_log.warn(this + "getEntity(): " + e + " ref=" + ref.getReference()); + M_log.warn("getEntity(): " + e + " ref=" + ref.getReference()); } return rv; @@ -5276,7 +5276,7 @@ } catch (Throwable e) { - M_log.warn(this + " getEntityAuthzGroups(): " + e.getMessage() + " ref=" + ref.getReference()); + M_log.warn(" getEntityAuthzGroups(): " + e.getMessage() + " ref=" + ref.getReference()); } return rv; @@ -5310,19 +5310,19 @@ rv = s.getUrl(); } else - M_log.warn(this + " getEntityUrl(): unknown message ref subtype: " + ref.getSubType() + " in ref: " + ref.getReference()); + M_log.warn(" getEntityUrl(): unknown message ref subtype: " + ref.getSubType() + " in ref: " + ref.getReference()); } catch (PermissionException e) { - M_log.warn(this + "getEntityUrl(): " + e + " ref=" + ref.getReference()); + M_log.warn("getEntityUrl(): " + e + " ref=" + ref.getReference()); } catch (IdUnusedException e) { - M_log.warn(this + "getEntityUrl(): " + e + " ref=" + ref.getReference()); + M_log.warn("getEntityUrl(): " + e + " ref=" + ref.getReference()); } catch (NullPointerException e) { - M_log.warn(this + "getEntityUrl(): " + e + " ref=" + ref.getReference()); + M_log.warn("getEntityUrl(): " + e + " ref=" + ref.getReference()); } return rv; @@ -5691,7 +5691,7 @@ } catch (Exception any) { - M_log.warn(this + " merge(): exception: " + any.getMessage() + " siteId=" + siteId + " from site id=" + fromSiteId); + M_log.warn(" merge(): exception: " + any.getMessage() + " siteId=" + siteId + " from site id=" + fromSiteId); } results.append("merging assignment " + siteId + " (" + count + ") assignments.\n"); @@ -5808,7 +5808,7 @@ } catch (Exception e) { - if (M_log.isWarnEnabled()) M_log.warn(this + " transferCopyEntities " + e.toString() + " oAssignmentId=" + oAssignmentId); + if (M_log.isWarnEnabled()) M_log.warn(" transferCopyEntities " + e.toString() + " oAssignmentId=" + oAssignmentId); } if (nContent != null) @@ -5965,18 +5965,18 @@ catch (Exception eeAny) { // if the new resource cannot be added - M_log.warn(this + " transferCopyEntities: cannot add new attachment with id=" + nAttachmentId + " " + eeAny.getMessage()); + M_log.warn(" transferCopyEntities: cannot add new attachment with id=" + nAttachmentId + " " + eeAny.getMessage()); } } catch (Exception eAny) { // if cannot find the original attachment, do nothing. - M_log.warn(this + " transferCopyEntities: cannot find the original attachment with id=" + oAttachmentId + " " + eAny.getMessage()); + M_log.warn(" transferCopyEntities: cannot find the original attachment with id=" + oAttachmentId + " " + eAny.getMessage()); } } catch (Exception any) { - M_log.warn(this + " transferCopyEntities" + any.getMessage() + " oAttachmentId=" + oAttachmentId + " nAttachmentId=" + nAttachmentId); + M_log.warn(" transferCopyEntities" + any.getMessage() + " oAttachmentId=" + oAttachmentId + " nAttachmentId=" + nAttachmentId); } return rv; @@ -6010,19 +6010,19 @@ rv = "AssignmentSubmission: " + s.getId() + " (" + s.getContext() + ")"; } else - M_log.warn(this + " getEntityDescription(): unknown message ref subtype: " + ref.getSubType() + " in ref: " + ref.getReference()); + M_log.warn(" getEntityDescription(): unknown message ref subtype: " + ref.getSubType() + " in ref: " + ref.getReference()); } catch (PermissionException e) { - M_log.warn(this + " getEntityDescription(): " + e.getMessage() + " ref=" + ref.getReference()); + M_log.warn(" getEntityDescription(): " + e.getMessage() + " ref=" + ref.getReference()); } catch (IdUnusedException e) { - M_log.warn(this + " getEntityDescription(): " + e.getMessage() + " ref=" + ref.getReference()); + M_log.warn(" getEntityDescription(): " + e.getMessage() + " ref=" + ref.getReference()); } catch (NullPointerException e) { - M_log.warn(this + " getEntityDescription(): " + e.getMessage() + " ref=" + ref.getReference()); + M_log.warn(" getEntityDescription(): " + e.getMessage() + " ref=" + ref.getReference()); } return rv; @@ -6056,19 +6056,19 @@ rv = s.getProperties(); } else - M_log.warn(this + " getEntityResourceProperties: unknown message ref subtype: " + ref.getSubType() + " in ref: " + ref.getReference()); + M_log.warn(" getEntityResourceProperties: unknown message ref subtype: " + ref.getSubType() + " in ref: " + ref.getReference()); } catch (PermissionException e) { - M_log.warn(this + " getEntityResourceProperties(): " + e.getMessage() + " ref=" + ref.getReference()); + M_log.warn(" getEntityResourceProperties(): " + e.getMessage() + " ref=" + ref.getReference()); } catch (IdUnusedException e) { - M_log.warn(this + " getEntityResourceProperties(): " + e.getMessage() + " ref=" + ref.getReference()); + M_log.warn(" getEntityResourceProperties(): " + e.getMessage() + " ref=" + ref.getReference()); } catch (NullPointerException e) { - M_log.warn(this + " getEntityResourceProperties(): " + e.getMessage() + " ref=" + ref.getReference()); + M_log.warn(" getEntityResourceProperties(): " + e.getMessage() + " ref=" + ref.getReference()); } return rv; @@ -6143,7 +6143,7 @@ } catch (NumberFormatException e) { - M_log.warn(this + " canSubmit(String, Assignment) " + e.getMessage() + " allowResubmitNumString=" + allowResubmitNumString); + M_log.warn(" canSubmit(String, Assignment) " + e.getMessage() + " allowResubmitNumString=" + allowResubmitNumString); } } @@ -6173,7 +6173,7 @@ catch (UserNotDefinedException e) { // cannot find user - M_log.warn(this + " canSubmit(String, Assignment) " + e.getMessage() + " assignment ref=" + a.getReference()); + M_log.warn(" canSubmit(String, Assignment) " + e.getMessage() + " assignment ref=" + a.getReference()); return false; } @@ -6294,7 +6294,7 @@ } catch (Exception e) { - M_log.warn(this + ": BaseAssignment(Element) " + e.getMessage()); + M_log.warn(": BaseAssignment(Element) " + e.getMessage()); } // READ THE AUTHORS @@ -6324,7 +6324,7 @@ } catch (Exception e) { - M_log.warn(this + " BASE ASSIGNMENT : STORAGE CONSTRUCTOR : Exception reading authors : " + e); + M_log.warn(" BASE ASSIGNMENT : STORAGE CONSTRUCTOR : Exception reading authors : " + e); } // READ THE PROPERTIES AND INSTRUCTIONS @@ -6416,7 +6416,7 @@ } catch (Exception e) { - M_log.warn(this + ":getContentHandler:DefaultEntityHandler Long data parse problem " + attributes.getValue("position_order") + e.getMessage()); + M_log.warn(":getContentHandler:DefaultEntityHandler Long data parse problem " + attributes.getValue("position_order") + e.getMessage()); } // READ THE AUTHORS @@ -6439,7 +6439,7 @@ } catch (Exception e) { - M_log.warn(this + " BASE ASSIGNMENT getContentHandler startElement : Exception reading authors : " + e.toString()); + M_log.warn(" BASE ASSIGNMENT getContentHandler startElement : Exception reading authors : " + e.toString()); } // extract access @@ -6582,7 +6582,7 @@ } catch (Exception e) { - M_log.warn(this + ": setAll(Assignment) get position order " + e.getMessage()); + M_log.warn(": setAll(Assignment) get position order " + e.getMessage()); } m_properties = new BaseResourcePropertiesEdit(); m_properties.addAll(assignment.getProperties()); @@ -6738,11 +6738,11 @@ } catch (EntityPropertyNotDefinedException e) { - M_log.warn(this + ":getTimeCreated() no time property defined " + e.getMessage()); + M_log.warn(":getTimeCreated() no time property defined " + e.getMessage()); } catch (EntityPropertyTypeException e) { - M_log.warn(this + ":getTimeCreated() no time property defined " + e.getMessage()); + M_log.warn(":getTimeCreated() no time property defined " + e.getMessage()); } return null; } @@ -6760,11 +6760,11 @@ } catch (EntityPropertyNotDefinedException e) { - M_log.warn(this + ":getTimeLastModified() no time property defined " + e.getMessage()); + M_log.warn(":getTimeLastModified() no time property defined " + e.getMessage()); } catch (EntityPropertyTypeException e) { - M_log.warn(this + ":getTimeLastModified() no time property defined " + e.getMessage()); + M_log.warn(":getTimeLastModified() no time property defined " + e.getMessage()); } return null; } @@ -6785,7 +6785,7 @@ } catch (Exception e) { - M_log.warn(this + ":getContent() " + e.getMessage()); + M_log.warn(":getContent() " + e.getMessage()); } } @@ -7286,7 +7286,7 @@ // there should not be a case where there's no context if (m_context == null) { - M_log.warn(this + " setGroupAccess() called with null context: " + getReference()); + M_log.warn(" setGroupAccess() called with null context: " + getReference()); throw new PermissionException(SessionManager.getCurrentSessionUserId(), "access:site", getReference()); } @@ -7351,7 +7351,7 @@ if (m_context == null) { // there should not be a case where there's no context - M_log.warn(this + " clearGroupAccess() called with null context. " + getReference()); + M_log.warn(" clearGroupAccess() called with null context. " + getReference()); throw new PermissionException(SessionManager.getCurrentSessionUserId(), "access:site", getReference()); } else @@ -7687,7 +7687,7 @@ } catch (Exception e) { - M_log.warn(this + " getContentHandler startElement Exception parsing honor pledge int from xml file string : " + e); + M_log.warn(" getContentHandler startElement Exception parsing honor pledge int from xml file string : " + e); } try @@ -7696,7 +7696,7 @@ } catch (Exception e) { - M_log.warn(this + " getContentHandler startElement Exception parsing submission type int from xml file string : " + e); + M_log.warn(" getContentHandler startElement Exception parsing submission type int from xml file string : " + e); } try @@ -7705,7 +7705,7 @@ } catch (Exception e) { - M_log.warn(this + " getContentHandler startElement Exception parsing grade type int from xml file string : " + e); + M_log.warn(" getContentHandler startElement Exception parsing grade type int from xml file string : " + e); } try @@ -7725,7 +7725,7 @@ } catch (Exception e) { - M_log.warn(this + " getContentHandler startElement Exception parsing maxgradepoint int from xml file string : " + e); + M_log.warn(" getContentHandler startElement Exception parsing maxgradepoint int from xml file string : " + e); } // READ THE AUTHORS @@ -7744,7 +7744,7 @@ } catch (Exception e) { - M_log.warn(this + " getContentHandler startElement Exception reading authors : " + e); + M_log.warn(" getContentHandler startElement Exception reading authors : " + e); } // READ THE ATTACHMENTS @@ -7767,14 +7767,14 @@ } catch (Exception e) { - M_log.warn(this + " getContentHandler startElement DbCachedContent : Exception reading attachments : " + e); + M_log.warn(" getContentHandler startElement DbCachedContent : Exception reading attachments : " + e); } entity = thisEntity; } else { - M_log.warn(this + " getContentHandler startElement Unexpected Element " + qName); + M_log.warn(" getContentHandler startElement Unexpected Element " + qName); } } } @@ -8783,7 +8783,7 @@ contentReviewService.queueContent(userId, null, getAssignment().getReference(), contentId); } catch (QueueException qe) { - M_log.warn(this + " getReviewScore Unable to queue content with content review Service: " + qe.getMessage()); + M_log.warn(" getReviewScore Unable to queue content with content review Service: " + qe.getMessage()); } @@ -8796,7 +8796,7 @@ } catch (Exception e) { - M_log.warn(this + " getReviewScore " + e.getMessage()); + M_log.warn(" getReviewScore " + e.getMessage()); return -1; } @@ -8830,7 +8830,7 @@ } catch (Exception e) { //e.printStackTrace(); - M_log.warn(this + ":getReviewReport() " + e.getMessage()); + M_log.warn(":getReviewReport() " + e.getMessage()); return "Error"; } @@ -8850,7 +8850,7 @@ } } catch (Exception e) { - M_log.warn(this + ":getFirstAcceptableAttachment() " + e.getMessage()); + M_log.warn(":getFirstAcceptableAttachment() " + e.getMessage()); e.printStackTrace(); } return null; @@ -8970,7 +8970,7 @@ } catch (Exception e) { - M_log.warn(this + ":BaseAssignmentSubmission(Element el) " + e.getMessage()); + M_log.warn(":BaseAssignmentSubmission(Element el) " + e.getMessage()); } } } @@ -9010,7 +9010,7 @@ } catch (Exception e) { - M_log.warn(this + " BaseAssignmentSubmission: CONSTRUCTOR : Exception reading submitters : " + e); + M_log.warn(" BaseAssignmentSubmission: CONSTRUCTOR : Exception reading submitters : " + e); } // READ THE FEEDBACK ATTACHMENTS @@ -9038,7 +9038,7 @@ } catch (Exception e) { - M_log.warn(this + " BaseAssignmentSubmission: CONSTRUCTOR : Exception reading feedback attachments : " + e); + M_log.warn(" BaseAssignmentSubmission: CONSTRUCTOR : Exception reading feedback attachments : " + e); } // READ THE SUBMITTED ATTACHMENTS @@ -9066,7 +9066,7 @@ } catch (Exception e) { - M_log.warn(this + " BaseAssignmentSubmission: CONSTRUCTOR : Exception reading submitted attachments : " + e); + M_log.warn(" BaseAssignmentSubmission: CONSTRUCTOR : Exception reading submitted attachments : " + e); } // READ THE PROPERTIES, SUBMITTED TEXT, FEEDBACK COMMENT, FEEDBACK TEXT @@ -9139,7 +9139,7 @@ } catch (NumberFormatException nfe) { m_reviewScore = -1; - M_log.warn(this + ":BaseAssignmentSubmission(Element) " + nfe.getMessage()); + M_log.warn(":BaseAssignmentSubmission(Element) " + nfe.getMessage()); } try { // The report given by the content review service @@ -9202,7 +9202,7 @@ } catch (NumberFormatException nfe) { m_reviewScore = -1; - M_log.warn(this + ":AssignmentSubmission:getContentHandler:DefaultEntityHandler " + nfe.getMessage()); + M_log.warn(":AssignmentSubmission:getContentHandler:DefaultEntityHandler " + nfe.getMessage()); } try { // The report given by the content review service @@ -9249,7 +9249,7 @@ } catch (Exception e) { - M_log.warn(this + ":BaseAssignmentSubmission:getContentHanler:DefaultEnityHandler " + e.getMessage()); + M_log.warn(":BaseAssignmentSubmission:getContentHanler:DefaultEnityHandler " + e.getMessage()); } } } @@ -9289,7 +9289,7 @@ } catch (Exception e) { - M_log.warn(this + " BaseAssignmentSubmission getContentHandler : Exception reading submitters : " + e); + M_log.warn(" BaseAssignmentSubmission getContentHandler : Exception reading submitters : " + e); } // READ THE FEEDBACK ATTACHMENTS @@ -9312,7 +9312,7 @@ } catch (Exception e) { - M_log.warn(this + " BaseAssignmentSubmission getContentHandler : Exception reading feedback attachments : " + e); + M_log.warn(" BaseAssignmentSubmission getContentHandler : Exception reading feedback attachments : " + e); } // READ THE SUBMITTED ATTACHMENTS @@ -9335,7 +9335,7 @@ } catch (Exception e) { - M_log.warn(this + " BaseAssignmentSubmission getContentHandler: Exception reading submitted attachments : " + e); + M_log.warn(" BaseAssignmentSubmission getContentHandler: Exception reading submitted attachments : " + e); } entity = thisEntity; @@ -9615,7 +9615,7 @@ } catch (Exception e) { - M_log.warn(this + " BaseAssignmentSubmission getSubmitters" + e.getMessage() + userId); + M_log.warn(" BaseAssignmentSubmission getSubmitters" + e.getMessage() + userId); } } @@ -9732,7 +9732,7 @@ } catch (Exception e) { - M_log.warn(this + " BaseAssignmentSubmission getGrade getAssignmentScoreString from GradebookService " + e.getMessage() + " context=" + m_context + " assignment id=" + m_assignment + " userId=" + userId + " gAssignmentName=" + gAssignmentName); + M_log.warn(" BaseAssignmentSubmission getGrade getAssignmentScoreString from GradebookService " + e.getMessage() + " context=" + m_context + " assignment id=" + m_assignment + " userId=" + userId + " gAssignmentName=" + gAssignmentName); } } @@ -10540,7 +10540,7 @@ M_log.debug(this + " BaseAssignmentSubmissionEdit postAttachment: Unable to find assignment associated with submission id= " + this.m_id + " and assignment id=" + this.m_assignment); } } catch (QueueException qe) { - M_log.warn(this + " BaseAssignmentSubmissionEdit postAttachment: Unable to add content to Content Review queue: " + qe.getMessage()); + M_log.warn(" BaseAssignmentSubmissionEdit postAttachment: Unable to add content to Content Review queue: " + qe.getMessage()); } catch (Exception e) { e.printStackTrace(); } @@ -10559,15 +10559,15 @@ } catch (PermissionException e) { // TODO Auto-generated catch block e.printStackTrace(); - M_log.warn(this + ":geFirstAcceptableAttachment " + e.getMessage()); + M_log.warn(":geFirstAcceptableAttachment " + e.getMessage()); } catch (IdUnusedException e) { // TODO Auto-generated catch block e.printStackTrace(); - M_log.warn(this + ":geFirstAcceptableAttachment " + e.getMessage()); + M_log.warn(":geFirstAcceptableAttachment " + e.getMessage()); } catch (TypeException e) { // TODO Auto-generated catch block e.printStackTrace(); - M_log.warn(this + ":geFirstAcceptableAttachment " + e.getMessage()); + M_log.warn(":geFirstAcceptableAttachment " + e.getMessage()); } @@ -11041,7 +11041,7 @@ } catch (Exception e) { - M_log.warn(this + ":geTimeObject " + e.getMessage()); + M_log.warn(":geTimeObject " + e.getMessage()); try { long longTime = Long.parseLong(timeString); @@ -11049,7 +11049,7 @@ } catch (Exception ee) { - M_log.warn(this + " getTimeObject Base Exception creating time object from xml file : " + ee.getMessage() + " timeString=" + timeString); + M_log.warn(" getTimeObject Base Exception creating time object from xml file : " + ee.getMessage() + " timeString=" + timeString); } } } @@ -11343,7 +11343,7 @@ } else { - M_log.warn(this + " AssignmentStorageUser getDefaultHandler startElement Unexpected Element in XML [" + qName + "]"); + M_log.warn(" AssignmentStorageUser getDefaultHandler startElement Unexpected Element in XML [" + qName + "]"); } } @@ -11628,7 +11628,7 @@ } else { - M_log.warn(this + " AssignmentContentStorageUser getDefaultEntityHandler startElement Unexpected Element in XML [" + qName + "]"); + M_log.warn(" AssignmentContentStorageUser getDefaultEntityHandler startElement Unexpected Element in XML [" + qName + "]"); } } @@ -11930,7 +11930,7 @@ } else { - M_log.warn(this + " AssignmentSubmissionStorageUser getDefaultHandler startElement: Unexpected Element in XML [" + qName + "]"); + M_log.warn(" AssignmentSubmissionStorageUser getDefaultHandler startElement: Unexpected Element in XML [" + qName + "]"); } } @@ -12142,7 +12142,7 @@ } catch (Exception e) { - M_log.warn(this + " AssignmentComparator.compare " + e.getMessage() + " id=" + userId1); + M_log.warn(" AssignmentComparator.compare " + e.getMessage() + " id=" + userId1); } } @@ -12157,7 +12157,7 @@ } catch (Exception e) { - M_log.warn(this + " AssignmentComparator.compare " + e.getMessage() + " id=" + userId2); + M_log.warn(" AssignmentComparator.compare " + e.getMessage() + " id=" + userId2); } } @@ -12230,7 +12230,7 @@ } catch(Exception ee) { - M_log.warn(this + ":transferCopyEntities: remove Assignment and all references for " + assignment.getId() + ee.getMessage()); + M_log.warn(":transferCopyEntities: remove Assignment and all references for " + assignment.getId() + ee.getMessage()); } } @@ -12289,7 +12289,7 @@ } catch (Exception e) { - M_log.warn(this + " XmlDecodeAttribute: " + e.getMessage() + " tag=" + tag); + M_log.warn(" XmlDecodeAttribute: " + e.getMessage() + " tag=" + tag); } }