diff --git a/src/main/java/org/olat/portfolio/manager/EPNotificationsHandler.java b/src/main/java/org/olat/portfolio/manager/EPNotificationsHandler.java index 473487fd20ae64082644d7d90f111dcb4576290b..b2957ed1f51c87ef5f81161d0f05fb79797aaa38 100644 --- a/src/main/java/org/olat/portfolio/manager/EPNotificationsHandler.java +++ b/src/main/java/org/olat/portfolio/manager/EPNotificationsHandler.java @@ -132,7 +132,7 @@ public class EPNotificationsHandler implements NotificationsHandler { // sbTitle.append(" (Portfoliovorlage)"); } } - return new TitleItem(sbTitle.toString(), "o_ep_icon"); + return new TitleItem(sbTitle.toString(), "o_EPStructuredMapTemplate_icon"); } @Override diff --git a/src/main/java/org/olat/portfolio/manager/EPNotificationsHelper.java b/src/main/java/org/olat/portfolio/manager/EPNotificationsHelper.java index ac2dd30e3a75bf66e25d947730f91783283b0af6..f8518a5564b15a82594d2e4f653068b4d622aa0f 100644 --- a/src/main/java/org/olat/portfolio/manager/EPNotificationsHelper.java +++ b/src/main/java/org/olat/portfolio/manager/EPNotificationsHelper.java @@ -118,38 +118,41 @@ public class EPNotificationsHelper { allItems.add(new SubscriptionListItem(translator.translate("li.newpage", new String[] { childPage.getTitle() }), tmp_linkUrl, structLink.getCreationDate(), "b_ep_page_icon")); } else { + tmp_linkUrl = BusinessControlFactory.getInstance().getURLFromBusinessPathString(rootBusinessPath); if (structLink.getParent() instanceof EPPage) { EPPage parentPage = (EPPage) structLink.getParent(); tmp_bPath = rootBusinessPath + "[EPPage:" + parentPage.getKey() + "]"; tmp_linkUrl = BusinessControlFactory.getInstance().getURLFromBusinessPathString(tmp_bPath); - } else { - tmp_linkUrl = BusinessControlFactory.getInstance().getURLFromBusinessPathString(rootBusinessPath); - allItems.add(new SubscriptionListItem( - translator.translate("li.newstruct", new String[] { structLink.getChild().getTitle() }), tmp_linkUrl, structLink - .getCreationDate(), "b_ep_struct_icon")); } + + allItems.add(new SubscriptionListItem(translator.translate("li.newstruct", new String[] { structLink.getChild().getTitle() }), + tmp_linkUrl, structLink.getCreationDate(), "b_ep_struct_icon")); + } } } + Long tmp_LinkKey; + String tmp_TargetTitle; /* all artefacts on the maps pages and structElements */ List<EPStructureToArtefactLink> links = getAllArtefactLinks(map); for (EPStructureToArtefactLink link : links) { if (link.getCreationDate().after(compareDate)) { PortfolioStructure linkParent = link.getStructureElement(); - Long linkKey = 0L; if (linkParent instanceof EPPage) { - linkKey = linkParent.getKey(); + tmp_LinkKey = linkParent.getKey(); + tmp_TargetTitle = linkParent.getTitle(); } else { // it's no page, thus a struct-element, we want to jump to // the page - linkKey = linkParent.getRoot().getKey(); + tmp_LinkKey = linkParent.getRoot().getKey(); + tmp_TargetTitle = linkParent.getRoot().getTitle(); } - tmp_bPath = rootBusinessPath + "[EPPage:" + linkKey + "]"; + tmp_bPath = rootBusinessPath + "[EPPage:" + tmp_LinkKey + "]"; tmp_linkUrl = BusinessControlFactory.getInstance().getURLFromBusinessPathString(tmp_bPath); allItems.add(new SubscriptionListItem(translator.translate("li.newartefact", new String[] { getFullNameFromUser(link.getArtefact() - .getAuthor()) }), tmp_linkUrl, link.getCreationDate(), "b_eportfolio_link")); + .getAuthor()), link.getArtefact().getTitle(), tmp_TargetTitle }), tmp_linkUrl, link.getCreationDate(), "b_eportfolio_link")); } } @@ -185,27 +188,32 @@ public class EPNotificationsHelper { String tmp_bPath; String tmp_linkUrl; - + Long tmp_linkKey = 0L; + String tmp_TargetTitle; + // now check artefacts, comments and ratings of this map List<EPStructureToArtefactLink> links = getAllArtefactLinks(map); for (EPStructureToArtefactLink link : links) { if (link.getCreationDate().after(compareDate)) { PortfolioStructure linkParent = link.getStructureElement(); - Long linkKey = 0L; + if (linkParent instanceof EPPage) { - linkKey = linkParent.getKey(); + tmp_linkKey = linkParent.getKey(); + tmp_TargetTitle = linkParent.getTitle(); } else { // it's no page, thus a struct-element, we want to jump to // the page - linkKey = linkParent.getRoot().getKey(); + tmp_linkKey = linkParent.getRoot().getKey(); + tmp_TargetTitle = linkParent.getRoot().getTitle(); } - tmp_bPath = rootBusinessPath + "[EPPage:" + linkKey + "]"; + tmp_bPath = rootBusinessPath + "[EPPage:" + tmp_linkKey + "]"; tmp_linkUrl = BusinessControlFactory.getInstance().getURLFromBusinessPathString(tmp_bPath); allItems.add(new SubscriptionListItem(translator.translate("li.newartefact", new String[] { getFullNameFromUser(link.getArtefact() - .getAuthor()) }), tmp_linkUrl, link.getCreationDate(), "b_eportfolio_link")); + .getAuthor()),link.getArtefact().getTitle(), tmp_TargetTitle }), tmp_linkUrl, link.getCreationDate(), "b_eportfolio_link")); } } + /* the comments and ratings */ allItems.addAll(getCRItemsForMap(compareDate, map)); diff --git a/src/main/java/org/olat/portfolio/ui/artefacts/collect/EPCollectStepForm04.java b/src/main/java/org/olat/portfolio/ui/artefacts/collect/EPCollectStepForm04.java index 353c61ef144ede7207a198a2c345cfa1d9f58bce..a374c8ffa86197c20d40103b2073f17093969748 100644 --- a/src/main/java/org/olat/portfolio/ui/artefacts/collect/EPCollectStepForm04.java +++ b/src/main/java/org/olat/portfolio/ui/artefacts/collect/EPCollectStepForm04.java @@ -49,7 +49,7 @@ import org.olat.portfolio.ui.structel.EPStructureChangeEvent; /** * Description:<br> - * controller to select a map as target for an artefact + * controller to select a map as target for an artefact * * <P> * Initial Date: 28.07.2010 <br> @@ -65,7 +65,7 @@ public class EPCollectStepForm04 extends StepFormBasicController { private PortfolioStructure selStructure; private AbstractArtefact artefact; private PortfolioStructure oldStructure; - + @SuppressWarnings("unused") public EPCollectStepForm04(UserRequest ureq, WindowControl wControl, Form rootForm, StepsRunContext runContext, int layout, String customLayoutPageName, AbstractArtefact artefact) { @@ -79,9 +79,9 @@ public class EPCollectStepForm04 extends StepFormBasicController { ePFMgr = (EPFrontendManager) CoreSpringFactory.getBean("epFrontendManager"); this.artefact = artefact; this.oldStructure = oldStructure; - initForm(this.flc, this, ureq); + initForm(this.flc, this, ureq); } - + /** * @see org.olat.core.gui.control.generic.wizard.StepFormBasicController#initForm(org.olat.core.gui.components.form.flexible.FormItemContainer, * org.olat.core.gui.control.Controller, org.olat.core.gui.UserRequest) @@ -91,12 +91,12 @@ public class EPCollectStepForm04 extends StepFormBasicController { protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) { List<PortfolioStructure> structs = ePFMgr.getStructureElementsForUser(getIdentity()); - if (structs != null && structs.size() != 0) { + if (structs != null && structs.size() != 0) { AjaxTreeModel treeModel = buildTreeModel(); treeCtr = new TreeController(ureq, getWindowControl(), translate("step4.my.maps"), treeModel, null); treeCtr.setTreeSorting(false, false, false); listenTo(treeCtr); - + // find last used structure and preselect PortfolioStructure lastStruct = ePFMgr.getUsersLastUsedPortfolioStructure(getIdentity()); if (lastStruct != null) { @@ -109,7 +109,7 @@ public class EPCollectStepForm04 extends StepFormBasicController { if (!isUsedInStepWizzard()) { // add form buttons uifactory.addFormSubmitButton("stepform.submit", formLayout); - } + } } private AjaxTreeModel buildTreeModel() { @@ -147,7 +147,7 @@ public class EPCollectStepForm04 extends StepFormBasicController { for (PortfolioStructure portfolioStructure : structs) { // FXOLAT-436 : skip templateMaps that are closed if (portfolioStructure instanceof EPStructuredMap) { - if( ((EPStructuredMap) portfolioStructure).getStatus().equals(StructureStatusEnum.CLOSED)){ + if( ((EPStructuredMap) portfolioStructure).getStatus() != null && ((EPStructuredMap) portfolioStructure).getStatus().equals(StructureStatusEnum.CLOSED)){ continue; } } @@ -183,7 +183,8 @@ public class EPCollectStepForm04 extends StepFormBasicController { * save clicked node to selStructure * * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, - * org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event) + * org.olat.core.gui.control.Controller, + * org.olat.core.gui.control.Event) */ @Override protected void event(@SuppressWarnings("unused") UserRequest ureq, Controller source, Event event) { @@ -200,7 +201,7 @@ public class EPCollectStepForm04 extends StepFormBasicController { selStructure = null; this.flc.setDirty(true); } - if (selStructure!=null && selStructure instanceof EPAbstractMap) { + if (selStructure != null && selStructure instanceof EPAbstractMap) { showWarning("map.not.choosable"); treeCtr.selectPath(null); selStructure = null; @@ -233,9 +234,10 @@ public class EPCollectStepForm04 extends StepFormBasicController { addToRunContext("selectedStructure", selStructure); fireEvent(ureq, StepsEvent.ACTIVATE_NEXT); } else { - if (!selStructure.getKey().equals(oldStructure.getKey())){ + if (!selStructure.getKey().equals(oldStructure.getKey())) { ePFMgr.moveArtefactFromStructToStruct(artefact, oldStructure, selStructure); - fireEvent(ureq, new EPStructureChangeEvent(EPStructureChangeEvent.CHANGED, selStructure)); // refresh ui + fireEvent(ureq, new EPStructureChangeEvent(EPStructureChangeEvent.CHANGED, selStructure)); // refresh + // ui } } } diff --git a/src/main/java/org/olat/portfolio/ui/structel/view/EPChangelogController.java b/src/main/java/org/olat/portfolio/ui/structel/view/EPChangelogController.java index 32381d3249674506e42900885a7ac627390e161a..7feeff36fe06a33412e71fbf7551b5c619a848ec 100644 --- a/src/main/java/org/olat/portfolio/ui/structel/view/EPChangelogController.java +++ b/src/main/java/org/olat/portfolio/ui/structel/view/EPChangelogController.java @@ -78,8 +78,8 @@ public class EPChangelogController extends FormBasicController { + map.getKey()); subsContext = new SubscriptionContext(EPNotificationsHandler.TYPENNAME, map.getResourceableId(), EPNotificationsHandler.TYPENNAME); if (subsContext != null) { - String businnessPath = getWindowControl().getBusinessControl().getAsString(); - PublisherData data = new PublisherData(EPNotificationsHandler.TYPENNAME, null, businnessPath); + String businessPath = "[EPDefaultMap:" + map.getKey() + "]"; + PublisherData data = new PublisherData(EPNotificationsHandler.TYPENNAME, null, businessPath); cSubscriptionCtrl = new ContextualSubscriptionController(ureq, getWindowControl(), subsContext, data); listenTo(cSubscriptionCtrl); flc.put("subscription", cSubscriptionCtrl.getInitialComponent()); diff --git a/src/main/java/org/olat/portfolio/ui/structel/view/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/portfolio/ui/structel/view/_i18n/LocalStrings_de.properties index c27cbca81244adbbd9525325c1ef90a1401ce030..8dc4df1019cfad6c97e85e23f71d04f589854480 100644 --- a/src/main/java/org/olat/portfolio/ui/structel/view/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/portfolio/ui/structel/view/_i18n/LocalStrings_de.properties @@ -6,6 +6,6 @@ li.newrating=Neues Rating f li.newcomment=Neuer Kommentar zu '{0}' von {1} li.newpage=Es wurde eine neue Seite '{0}' hinzugefügt li.newstruct=Es wurde ein neues Strukturelement '{0}' hinzugefügt -li.newartefact={0} hat ein neues Artefakt hinzugefügt +li.newartefact=Es wurde ein neues Artefakt '{1}' auf '{2}' von {0} hinzugefügt changelog=Änderungsprotokoll news.since=Änderungen seit: \ No newline at end of file