Search in sources :

Example 1 with CertificateAndEfficiencyStatementController

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;
    }
}
Also used : CertificateAndEfficiencyStatementController(org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 2 with CertificateAndEfficiencyStatementController

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;
}
Also used : CertificateAndEfficiencyStatementController(org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController) EfficiencyStatement(org.olat.course.assessment.EfficiencyStatement)

Example 3 with CertificateAndEfficiencyStatementController

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);
            // 
            }
        }
    }
}
Also used : TableEvent(org.olat.core.gui.components.table.TableEvent) PopupBrowserWindow(org.olat.core.gui.control.generic.popup.PopupBrowserWindow) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) UserEfficiencyStatementLight(org.olat.course.assessment.model.UserEfficiencyStatementLight) CertificateAndEfficiencyStatementController(org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController) WindowControl(org.olat.core.gui.control.WindowControl) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Example 4 with CertificateAndEfficiencyStatementController

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;
    }
}
Also used : CertificateAndEfficiencyStatementController(org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 5 with CertificateAndEfficiencyStatementController

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;
}
Also used : CertificateAndEfficiencyStatementController(org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController) EfficiencyStatement(org.olat.course.assessment.EfficiencyStatement)

Aggregations

CertificateAndEfficiencyStatementController (org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController)10 EfficiencyStatement (org.olat.course.assessment.EfficiencyStatement)6 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)4 WindowControl (org.olat.core.gui.control.WindowControl)4 UserRequest (org.olat.core.gui.UserRequest)2 TableEvent (org.olat.core.gui.components.table.TableEvent)2 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)2 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)2 UserEfficiencyStatement (org.olat.course.assessment.UserEfficiencyStatement)2 UserEfficiencyStatementLight (org.olat.course.assessment.model.UserEfficiencyStatementLight)2 EPFrontendManager (org.olat.portfolio.manager.EPFrontendManager)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2