AssignmentModelAnswerItem oModelAnswerItem = assignmentSupplementItemService.getModelAnswer(oAssignmentId); if (oModelAnswerItem != null) { AssignmentModelAnswerItem nModelAnswerItem = assignmentSupplementItemService.newModelAnswer(); assignmentSupplementItemService.saveModelAnswer(nModelAnswerItem); nModelAnswerItem.setAssignmentId(nAssignment.getId()); nModelAnswerItem.setText(oModelAnswerItem.getText()); for (Iterator iter = oAttachments.iterator(); iter.hasNext();) { AssignmentSupplementItemAttachment a = (AssignmentSupplementItemAttachment) iter.next(); AssignmentSupplementItemAttachment nAttach = assignmentSupplementItemService.newAttachment(); nAttach.setAssignmentSupplementItemWithAttachment(nModelAnswerItem); nAttach.setAttachmentId(nAttachId); assignmentSupplementItemService.saveAttachment(nAttach); nAttachments.add(nAttach); assignmentSupplementItemService.saveModelAnswer(nModelAnswerItem); AssignmentNoteItem oNoteItem = assignmentSupplementItemService.getNoteItem(oAssignmentId); if (oNoteItem != null) { AssignmentNoteItem nNoteItem = assignmentSupplementItemService.newNoteItem(); nNoteItem.setShareWith(oNoteItem.getShareWith()); nNoteItem.setCreatorId(UserDirectoryService.getCurrentUser().getId()); assignmentSupplementItemService.saveNoteItem(nNoteItem); AssignmentAllPurposeItem oAllPurposeItem = assignmentSupplementItemService.getAllPurposeItem(oAssignmentId); if (oAllPurposeItem != null) { AssignmentAllPurposeItem nAllPurposeItem = assignmentSupplementItemService.newAllPurposeItem();