use of org.olat.core.id.context.BusinessControl in project OpenOLAT by OpenOLAT.
the class InfoMessagePortletRunController method event.
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (source == showAllLink) {
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.MONTH, -1);
// fxdiff activate homes tab in top navigation and activate the correct
// menu item
String resourceUrl = "[HomeSite:" + ureq.getIdentity().getKey() + "][notifications:0][type=" + InfoMessage.class.getSimpleName() + ":0]" + BusinessControlFactory.getInstance().getContextEntryStringForDate(cal.getTime());
BusinessControl bc = BusinessControlFactory.getInstance().createFromString(resourceUrl);
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
NewControllerFactory.getInstance().launch(ureq, bwControl);
}
}
use of org.olat.core.id.context.BusinessControl in project OpenOLAT by OpenOLAT.
the class MembersTableController method doOpenHomePage.
private void doOpenHomePage(MemberView member, UserRequest ureq) {
String url = "[HomePage:" + member.getIdentityKey() + "]";
BusinessControl bc = BusinessControlFactory.getInstance().createFromString(url);
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
NewControllerFactory.getInstance().launch(ureq, bwControl);
}
use of org.olat.core.id.context.BusinessControl in project openolat by klemens.
the class NotificationsPortletRunController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
*/
public void event(UserRequest ureq, Component source, Event event) {
if (source == showAllLink) {
// activate homes tab in top navigation and active bookmarks menu item
String resourceUrl = "[HomeSite:" + ureq.getIdentity().getKey() + "][notifications:0]";
BusinessControl bc = BusinessControlFactory.getInstance().createFromString(resourceUrl);
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
NewControllerFactory.getInstance().launch(ureq, bwControl);
} else if (event == ComponentUtil.VALIDATE_EVENT && needsModelReload) {
// updateTableModel(ureq.getLocale(), ureq.getIdentity());
reloadModel(sortingCriteria);
needsModelReload = false;
}
}
use of org.olat.core.id.context.BusinessControl in project openolat by klemens.
the class BookmarksPortletRunController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
*/
public void event(UserRequest ureq, Component source, Event event) {
if (source == showAllLink) {
// activate homes tab in top navigation and active bookmarks menu item
String resourceUrl = "[MyCoursesSite:0][Favorits:0]";
BusinessControl bc = BusinessControlFactory.getInstance().createFromString(resourceUrl);
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
NewControllerFactory.getInstance().launch(ureq, bwControl);
}
}
use of org.olat.core.id.context.BusinessControl in project openolat by klemens.
the class PortfolioCourseNodeRunController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == newMapLink) {
RepositoryEntry courseEntry = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
Date deadline = courseNode.getDeadline();
if (templateMap != null) {
copyMap = ePFMgr.assignStructuredMapToUser(getIdentity(), templateMap, courseEntry, courseNode.getIdent(), null, deadline);
if (copyMap != null) {
showInfo("map.copied", StringHelper.escapeHtml(templateMap.getTitle()));
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapPortfolioOres(copyMap));
ThreadLocalUserActivityLogger.log(EPLoggingAction.EPORTFOLIO_TASK_STARTED, getClass());
}
} else if (templateBinder != null) {
if (copyBinder == null) {
copyBinder = portfolioService.assignBinder(getIdentity(), templateBinder, courseEntry, courseNode.getIdent(), deadline);
if (copyBinder != null) {
showInfo("map.copied", StringHelper.escapeHtml(templateBinder.getTitle()));
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrap(copyBinder));
ThreadLocalUserActivityLogger.log(PortfolioLoggingAction.PORTFOLIO_TASK_STARTED, getClass());
}
} else if (copyBinder != null && copyBinder.getBinderStatus() == BinderStatus.deleted) {
String title = translate("trashed.binder.confirm.title");
String text = translate("trashed.binder.confirm.descr", new String[] { StringHelper.escapeHtml(copyBinder.getTitle()) });
restoreBinderCtrl = activateYesNoDialog(ureq, title, text, restoreBinderCtrl);
restoreBinderCtrl.setUserObject(copyBinder);
return;
}
}
updateUI(ureq);
} else if (source == selectMapLink) {
String resourceUrl;
if (copyMap != null) {
resourceUrl = "[HomeSite:" + getIdentity().getKey() + "][Portfolio:0][EPStructuredMap:" + copyMap.getKey() + "]";
} else if (copyBinder != null) {
resourceUrl = "[HomeSite:" + getIdentity().getKey() + "][PortfolioV2:0][MyBinders:0][Binder:" + copyBinder.getKey() + "]";
} else {
return;
}
BusinessControl bc = BusinessControlFactory.getInstance().createFromString(resourceUrl);
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
NewControllerFactory.getInstance().launch(ureq, bwControl);
} else if ("ONCLICK".equals(event.getCommand())) {
String cmd = ureq.getParameter("fcid");
String panelId = ureq.getParameter("panel");
if (StringHelper.containsNonWhitespace(cmd) && StringHelper.containsNonWhitespace(panelId)) {
saveOpenPanel(ureq, panelId, "show".equals(cmd));
}
}
}
Aggregations