Search in sources :

Example 1 with EPMultipleArtefactPreviewController

use of org.olat.portfolio.ui.artefacts.view.EPMultipleArtefactPreviewController in project OpenOLAT by OpenOLAT.

the class EPArtefactPoolRunController method initMultiArtefactCtrl.

private void initMultiArtefactCtrl(UserRequest ureq, List<AbstractArtefact> artefacts) {
    // decide how to present artefacts depending on users settings
    String userPrefsMode = ePFMgr.getUsersPreferedArtefactViewMode(getIdentity(), EPViewModeController.VIEWMODE_CONTEXT_ARTEFACTPOOL);
    if (previousViewMode != null && !previousViewMode.equals(userPrefsMode)) {
        removeAsListenerAndDispose(artCtrl);
    }
    if (importV2 || (userPrefsMode != null && userPrefsMode.equals(EPViewModeController.VIEWMODE_TABLE))) {
        EPSecurityCallback secCallback = new EPSecurityCallbackImpl(true, true);
        artCtrl = new EPMultipleArtefactsAsTableController(ureq, getWindowControl(), artefacts, null, artefactChooseMode, importV2, secCallback);
        viewModeCtrl.selectTable();
    } else {
        artCtrl = new EPMultipleArtefactPreviewController(ureq, getWindowControl(), artefacts, artefactChooseMode);
        viewModeCtrl.selectDetails();
    }
    previousViewMode = userPrefsMode;
    listenTo(artCtrl);
    previousArtefactsList = artefacts;
}
Also used : EPMultipleArtefactsAsTableController(org.olat.portfolio.ui.artefacts.view.EPMultipleArtefactsAsTableController) EPSecurityCallback(org.olat.portfolio.EPSecurityCallback) EPMultipleArtefactPreviewController(org.olat.portfolio.ui.artefacts.view.EPMultipleArtefactPreviewController) EPSecurityCallbackImpl(org.olat.portfolio.EPSecurityCallbackImpl)

Example 2 with EPMultipleArtefactPreviewController

use of org.olat.portfolio.ui.artefacts.view.EPMultipleArtefactPreviewController in project openolat by klemens.

the class EPArtefactPoolRunController method initMultiArtefactCtrl.

private void initMultiArtefactCtrl(UserRequest ureq, List<AbstractArtefact> artefacts) {
    // decide how to present artefacts depending on users settings
    String userPrefsMode = ePFMgr.getUsersPreferedArtefactViewMode(getIdentity(), EPViewModeController.VIEWMODE_CONTEXT_ARTEFACTPOOL);
    if (previousViewMode != null && !previousViewMode.equals(userPrefsMode)) {
        removeAsListenerAndDispose(artCtrl);
    }
    if (importV2 || (userPrefsMode != null && userPrefsMode.equals(EPViewModeController.VIEWMODE_TABLE))) {
        EPSecurityCallback secCallback = new EPSecurityCallbackImpl(true, true);
        artCtrl = new EPMultipleArtefactsAsTableController(ureq, getWindowControl(), artefacts, null, artefactChooseMode, importV2, secCallback);
        viewModeCtrl.selectTable();
    } else {
        artCtrl = new EPMultipleArtefactPreviewController(ureq, getWindowControl(), artefacts, artefactChooseMode);
        viewModeCtrl.selectDetails();
    }
    previousViewMode = userPrefsMode;
    listenTo(artCtrl);
    previousArtefactsList = artefacts;
}
Also used : EPMultipleArtefactsAsTableController(org.olat.portfolio.ui.artefacts.view.EPMultipleArtefactsAsTableController) EPSecurityCallback(org.olat.portfolio.EPSecurityCallback) EPMultipleArtefactPreviewController(org.olat.portfolio.ui.artefacts.view.EPMultipleArtefactPreviewController) EPSecurityCallbackImpl(org.olat.portfolio.EPSecurityCallbackImpl)

Aggregations

EPSecurityCallback (org.olat.portfolio.EPSecurityCallback)2 EPSecurityCallbackImpl (org.olat.portfolio.EPSecurityCallbackImpl)2 EPMultipleArtefactPreviewController (org.olat.portfolio.ui.artefacts.view.EPMultipleArtefactPreviewController)2 EPMultipleArtefactsAsTableController (org.olat.portfolio.ui.artefacts.view.EPMultipleArtefactsAsTableController)2