use of org.olat.group.ui.run.BusinessGroupMainRunController in project OpenOLAT by OpenOLAT.
the class BGControllerFactory method createRunControllerFor.
//
// 2) Group run controllers
//
/**
* Factory method to create a configured group run controller
*
* @param ureq
* @param wControl
* @param businessGroup
* @param isGMAdmin true if user is group management administrator
* @param initialViewIdentifier
* @return a run controller for this business group
*/
public BusinessGroupMainRunController createRunControllerFor(UserRequest ureq, WindowControl wControl, BusinessGroup businessGroup) {
// build up the context path
WindowControl bwControl;
OLATResourceable businessOres = businessGroup;
ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(businessOres);
// OLAT-5944: check if the current context entry is not already the group entry to avoid duplicate in the business path
if (ce.equals(wControl.getBusinessControl().getCurrentContextEntry())) {
bwControl = wControl;
} else {
bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl);
}
return new BusinessGroupMainRunController(ureq, bwControl, businessGroup);
}
use of org.olat.group.ui.run.BusinessGroupMainRunController in project openolat by klemens.
the class BGControllerFactory method createRunControllerFor.
//
// 2) Group run controllers
//
/**
* Factory method to create a configured group run controller
*
* @param ureq
* @param wControl
* @param businessGroup
* @param isGMAdmin true if user is group management administrator
* @param initialViewIdentifier
* @return a run controller for this business group
*/
public BusinessGroupMainRunController createRunControllerFor(UserRequest ureq, WindowControl wControl, BusinessGroup businessGroup) {
// build up the context path
WindowControl bwControl;
OLATResourceable businessOres = businessGroup;
ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(businessOres);
// OLAT-5944: check if the current context entry is not already the group entry to avoid duplicate in the business path
if (ce.equals(wControl.getBusinessControl().getCurrentContextEntry())) {
bwControl = wControl;
} else {
bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl);
}
return new BusinessGroupMainRunController(ureq, bwControl, businessGroup);
}
Aggregations