use of org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController in project OpenOLAT by OpenOLAT.
the class CourseRuntimeController method doEfficiencyStatements.
private void doEfficiencyStatements(UserRequest ureq) {
if (delayedClose == Delayed.efficiencyStatements || requestForClose(ureq)) {
// will not be disposed on course run dispose, popus up as new browserwindow
WindowControl bwControl = getSubWindowControl("Certification");
CertificateAndEfficiencyStatementController efficiencyStatementController = new CertificateAndEfficiencyStatementController(addToHistory(ureq, bwControl), ureq, getRepositoryEntry());
listenTo(efficiencyStatementController);
efficiencyStatementController = pushController(ureq, translate("command.efficiencystatement"), efficiencyStatementController);
currentToolCtr = efficiencyStatementController;
setActiveTool(efficiencyStatementsLink);
} else {
delayedClose = Delayed.efficiencyStatements;
}
}
use of org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController in project openolat by klemens.
the class EfficiencyStatementMediaHandler method getMediaController.
@Override
public Controller getMediaController(UserRequest ureq, WindowControl wControl, Media media, MediaRenderingHints hints) {
String statementXml = media.getContent();
EfficiencyStatement statement = null;
if (StringHelper.containsNonWhitespace(statementXml)) {
try {
statement = (EfficiencyStatement) myXStream.fromXML(statementXml);
} catch (Exception e) {
log.error("Cannot load efficiency statement from artefact", e);
}
}
CertificateAndEfficiencyStatementController ctrl = new CertificateAndEfficiencyStatementController(wControl, ureq, statement);
ctrl.disableMediaCollector();
return ctrl;
}
use of org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController in project openolat by klemens.
the class EfficiencyStatementsPortletRunController method event.
/**
* @see org.olat.core.gui.control.ControllerEventListener#dispatchEvent(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
public void event(UserRequest ureq, Controller source, Event event) {
super.event(ureq, source, event);
if (source == tableCtr) {
if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
TableEvent te = (TableEvent) event;
String actionid = te.getActionId();
if (actionid.equals(CMD_LAUNCH)) {
int rowid = te.getRowId();
final UserEfficiencyStatementLight statement = efficiencyStatementsListModel.getEfficiencyStatementAt(rowid);
// will not be disposed on course run dispose, popus up as new browserwindow
ControllerCreator ctrlCreator = new ControllerCreator() {
public Controller createController(UserRequest lureq, WindowControl lwControl) {
CertificateAndEfficiencyStatementController efficiencyCtrl = new CertificateAndEfficiencyStatementController(lwControl, lureq, statement.getArchivedResourceKey());
return new LayoutMain3ColsController(lureq, getWindowControl(), efficiencyCtrl);
}
};
// wrap the content controller into a full header layout
ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
// open in new browser window
PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
pbw.open(ureq);
//
}
}
}
}
use of org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController in project openolat by klemens.
the class CourseRuntimeController method doEfficiencyStatements.
private void doEfficiencyStatements(UserRequest ureq) {
if (delayedClose == Delayed.efficiencyStatements || requestForClose(ureq)) {
// will not be disposed on course run dispose, popus up as new browserwindow
WindowControl bwControl = getSubWindowControl("Certification");
CertificateAndEfficiencyStatementController efficiencyStatementController = new CertificateAndEfficiencyStatementController(addToHistory(ureq, bwControl), ureq, getRepositoryEntry());
listenTo(efficiencyStatementController);
efficiencyStatementController = pushController(ureq, translate("command.efficiencystatement"), efficiencyStatementController);
currentToolCtr = efficiencyStatementController;
setActiveTool(efficiencyStatementsLink);
} else {
delayedClose = Delayed.efficiencyStatements;
}
}
use of org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController in project OpenOLAT by OpenOLAT.
the class EfficiencyStatementMediaHandler method getMediaController.
@Override
public Controller getMediaController(UserRequest ureq, WindowControl wControl, Media media, MediaRenderingHints hints) {
String statementXml = media.getContent();
EfficiencyStatement statement = null;
if (StringHelper.containsNonWhitespace(statementXml)) {
try {
statement = (EfficiencyStatement) myXStream.fromXML(statementXml);
} catch (Exception e) {
log.error("Cannot load efficiency statement from artefact", e);
}
}
CertificateAndEfficiencyStatementController ctrl = new CertificateAndEfficiencyStatementController(wControl, ureq, statement);
ctrl.disableMediaCollector();
return ctrl;
}
Aggregations