Skip to content
Snippets Groups Projects
Commit 0ec211b6 authored by gnaegi's avatar gnaegi
Browse files

FXOLAT-193 OLAT-6302 add missing business path context entry pop

--HG--
branch : uzhFixes711
parent 0cf7b7ac
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,7 @@ import org.olat.core.id.Identity; ...@@ -53,6 +53,7 @@ import org.olat.core.id.Identity;
import org.olat.core.id.OLATResourceable; import org.olat.core.id.OLATResourceable;
import org.olat.core.id.User; import org.olat.core.id.User;
import org.olat.core.id.UserConstants; import org.olat.core.id.UserConstants;
import org.olat.core.id.context.ContextEntry;
import org.olat.core.util.Formatter; import org.olat.core.util.Formatter;
import org.olat.core.util.StringHelper; import org.olat.core.util.StringHelper;
import org.olat.core.util.coordinate.CoordinatorManager; import org.olat.core.util.coordinate.CoordinatorManager;
...@@ -123,6 +124,24 @@ public class InfoDisplayController extends FormBasicController { ...@@ -123,6 +124,24 @@ public class InfoDisplayController extends FormBasicController {
} }
initForm(ureq); initForm(ureq);
// OLAT-6302 when a specific message is shown display the page that
// contains the message. Jump in e.g. from portlet
ContextEntry ce = wControl.getBusinessControl().popLauncherContextEntry();
if (ce != null) { // a context path is left for me
OLATResourceable businessPathResource = ce.getOLATResourceable();
String typeName = businessPathResource.getResourceableTypeName();
if ("InfoMessage".equals(typeName)) {
Long messageId = businessPathResource.getResourceableId();
if (messageId != null && messageId.longValue() > 0) {
// currently no pageing is implemented, just page with all entries
maxResults = -1;
after = null;
}
}
}
// now load with configuration
loadMessages(); loadMessages();
} }
......
...@@ -419,7 +419,7 @@ public class FolderRunController extends BasicController implements Activateable ...@@ -419,7 +419,7 @@ public class FolderRunController extends BasicController implements Activateable
} }
} }
VFSItem vfsItem = folderComponent.getRootContainer().resolve(path.endsWith("/") ? path.substring(0, path.length()-1) : path); VFSItem vfsItem = folderComponent.getRootContainer().resolve(path.endsWith("/") ? path.substring(0, path.length()-1) : path);
if (!(vfsItem instanceof VFSContainer)) { if (vfsItem != null && !(vfsItem instanceof VFSContainer)) {
// could be a file - create the mapper - otherwise don't create one if it's a directory // could be a file - create the mapper - otherwise don't create one if it's a directory
// Create a mapper to deliver the auto-download of the file. We have to // Create a mapper to deliver the auto-download of the file. We have to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment