diff --git a/rubrics/impl/src/main/java/org/sakaiproject/rubrics/impl/RubricsServiceImpl.java b/rubrics/impl/src/main/java/org/sakaiproject/rubrics/impl/RubricsServiceImpl.java index 27e51926fffa..93ecf968d8c7 100644 --- a/rubrics/impl/src/main/java/org/sakaiproject/rubrics/impl/RubricsServiceImpl.java +++ b/rubrics/impl/src/main/java/org/sakaiproject/rubrics/impl/RubricsServiceImpl.java @@ -1607,8 +1607,6 @@ public String merge(String toSiteId, Element root, String archivePath, String fr StringBuilder results = new StringBuilder(); results.append("begin merging ").append(getLabel()).append(" for site ").append(toSiteId).append(LINE_SEPARATOR); - String currentUserId = sessionManager.getCurrentSessionUserId(); - if (!root.getTagName().equals(getLabel())) { log.warn("Tried to merge a non <{}> xml document", getLabel()); return "Invalid xml document"; @@ -1631,23 +1629,9 @@ public String merge(String toSiteId, Element root, String archivePath, String fr continue; } - String creatorId = currentUserId; - - // If the original creator of this rubric is a valid user in "this" Sakai instance, - // then use the same creator id for the new rubric. Otherwise, use the current user. - String originalCreatorId = rubricEl.getAttribute("creator"); - if (StringUtils.isNotBlank(originalCreatorId)) { - try { - userDirectoryService.getUser(originalCreatorId); - creatorId = originalCreatorId; - } catch (UserNotDefinedException unde) { - log.debug("Original rubric creator {} is not a user in *this* Sakai", originalCreatorId); - } - } - RubricTransferBean rubricBean = new RubricTransferBean(); rubricBean.setOwnerId(toSiteId); - rubricBean.setCreatorId(creatorId); + rubricBean.setCreatorId(sessionManager.getCurrentSessionUserId()); rubricBean.setCreated(now); rubricBean.setTitle(title); rubricBean.setMaxPoints(Double.parseDouble(rubricEl.getAttribute("max-points")));