DTabs dts = (DTabs) getWindowControl().getWindowBackOffice().getWindow().getAttribute("DTabs");
OLATResourceable ores = OLATResourceManager.getInstance().findResourceable(
courseRepositoryEntry.getOlatResource().getResourceableId(), courseRepositoryEntry.getOlatResource().getResourceableTypeName());
if(ores==null) {
//course was deleted!
MessageController msgController = MessageUIFactory.createInfoMessage(ureq, this.getWindowControl(), translate("course.deleted.title"), translate("course.deleted.text"));
panel.setContent(msgController.getInitialComponent());
return;
}
DTab dt = dts.getDTab(ores);
// remove and dispose "old course run"
dts.removeDTab(dt);//disposes also dt and controllers