use of org.olat.core.id.context.BusinessControl in project OpenOLAT by OpenOLAT.
the class MailBoxExtension method open.
@Override
public void open(UserRequest ureq, WindowControl wControl, String businessPath) {
BusinessControl bc = BusinessControlFactory.getInstance().createFromString(businessPath);
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, wControl);
NewControllerFactory.getInstance().launch(ureq, bwControl);
}
use of org.olat.core.id.context.BusinessControl in project OpenOLAT by OpenOLAT.
the class DisposedCourseRestartController 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)
*/
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (source == restartLink) {
OLATResourceable ores = OLATResourceManager.getInstance().findResourceable(courseRepositoryEntry.getOlatResource().getResourceableId(), courseRepositoryEntry.getOlatResource().getResourceableTypeName());
if (ores == null) {
// course was deleted!
MessageController msgController = MessageUIFactory.createInfoMessage(ureq, getWindowControl(), translate("course.deleted.title"), translate("course.deleted.text"));
panel.setContent(msgController.getInitialComponent());
} else {
OLATResourceable reOres = OresHelper.clone(courseRepositoryEntry);
DTabs dtabs = getWindowControl().getWindowBackOffice().getWindow().getDTabs();
if (dtabs != null) {
DTab dt = dtabs.getDTab(reOres);
if (dt != null) {
dtabs.removeDTab(ureq, dt);
}
}
List<ContextEntry> entries = null;
List<HistoryPoint> stacks = ureq.getUserSession().getHistoryStack();
for (int i = stacks.size(); i-- > 0; ) {
HistoryPoint point = stacks.get(i);
if (point != null && point.getEntries() != null && point.getEntries().size() > 0) {
ContextEntry entry = point.getEntries().get(0);
if (reOres.equals(entry.getOLATResourceable())) {
entries = point.getEntries();
break;
}
}
}
WindowControl bwControl;
if (entries == null) {
bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(getWindowControl(), reOres);
} else {
BusinessControl bc = BusinessControlFactory.getInstance().createFromContextEntries(entries);
bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
}
NewControllerFactory.getInstance().launch(ureq, bwControl);
dispose();
}
}
}
use of org.olat.core.id.context.BusinessControl in project OpenOLAT by OpenOLAT.
the class EfficiencyStatementAssessmentController method openConfiguration.
private void openConfiguration(UserRequest ureq) {
String resourceUrl = "[RepositoryEntry:" + courseEntry.getKey() + "][CertificationSettings: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 OpenOLAT.
the class CertificateAndEfficiencyStatementController method doOpenCourse.
private void doOpenCourse(UserRequest ureq) {
if (courseRepoEntry != null) {
List<ContextEntry> ces = new ArrayList<ContextEntry>(1);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("RepositoryEntry", courseRepoEntry.getKey());
ces.add(BusinessControlFactory.getInstance().createContextEntry(ores));
BusinessControl bc = BusinessControlFactory.getInstance().createFromContextEntries(ces);
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 CertificateAndEfficiencyStatementController method doOpenGroup.
private void doOpenGroup(UserRequest ureq) {
if (businessGroup != null) {
List<ContextEntry> ces = new ArrayList<ContextEntry>(1);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("BusinessGroup", businessGroup.getKey());
ces.add(BusinessControlFactory.getInstance().createContextEntry(ores));
BusinessControl bc = BusinessControlFactory.getInstance().createFromContextEntries(ces);
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
NewControllerFactory.getInstance().launch(ureq, bwControl);
}
}
Aggregations