use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.
the class SharedFolderHandler method createEditorController.
@Override
public Controller createEditorController(RepositoryEntry re, UserRequest ureq, WindowControl wControl, TooledStackedPanel toolbar) {
Controller sharedFolderCtr = new SharedFolderEditorController(re, ureq, wControl);
// use on column layout
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(ureq, wControl, sharedFolderCtr);
// dispose content on layout dispose
layoutCtr.addDisposableChildController(sharedFolderCtr);
return layoutCtr;
}
use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.
the class RepositoyUIFactory method createRepoEntryDisabledDueToSecurityMessageController.
/**
* Create main controller that does nothing but displaying a message that
* this resource is disabled due to security constraints
*
* @param ureq
* @param wControl
* @return
*/
public static GenericMainController createRepoEntryDisabledDueToSecurityMessageController(UserRequest ureq, WindowControl wControl) {
// wrap simple message into mainLayout
GenericMainController glc = new GenericMainController(ureq, wControl) {
@Override
public void init(UserRequest uureq) {
Panel empty = new Panel("empty");
setTranslator(Util.createPackageTranslator(RepositoryModule.class, uureq.getLocale()));
MessageController contentCtr = MessageUIFactory.createInfoMessage(uureq, getWindowControl(), translate("security.disabled.title"), translate("security.disabled.info"));
// auto dispose later
listenTo(contentCtr);
Component resComp = contentCtr.getInitialComponent();
LayoutMain3ColsController columnLayoutCtr = new LayoutMain3ColsController(uureq, getWindowControl(), empty, resComp, /*do not save no prefs*/
null);
// auto dispose later
listenTo(columnLayoutCtr);
putInitialPanel(columnLayoutCtr.getInitialComponent());
}
@Override
protected Controller handleOwnMenuTreeEvent(Object uobject, UserRequest uureq) {
// no menutree means no menu events.
return null;
}
};
glc.init(ureq);
return glc;
}
use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.
the class IQManager method createLockedMessageController.
private GenericMainController createLockedMessageController(UserRequest ureq, WindowControl wControl, String fullName) {
// wrap simple message into mainLayout
GenericMainController glc = new GenericMainController(ureq, wControl) {
@Override
public void init(UserRequest uureq) {
Panel empty = new Panel("empty");
setTranslator(Util.createPackageTranslator(this.getClass(), uureq.getLocale()));
Controller contentCtr = MessageUIFactory.createInfoMessage(uureq, getWindowControl(), translate("status.currently.locked.title"), translate("status.currently.locked", fullName));
// auto dispose later
listenTo(contentCtr);
Component resComp = contentCtr.getInitialComponent();
LayoutMain3ColsController columnLayoutCtr = new LayoutMain3ColsController(uureq, getWindowControl(), empty, resComp, /*do not save no prefs*/
null);
// auto dispose later
listenTo(columnLayoutCtr);
putInitialPanel(columnLayoutCtr.getInitialComponent());
}
@Override
protected Controller handleOwnMenuTreeEvent(Object uobject, UserRequest uureq) {
// no menutree means no menu events.
return null;
}
};
glc.init(ureq);
return glc;
}
use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.
the class EfficiencyStatementArtefactHandler method createDetailsController.
@Override
public Controller createDetailsController(UserRequest ureq, WindowControl wControl, AbstractArtefact artefact, boolean readOnlyMode) {
EPFrontendManager ePFMgr = CoreSpringFactory.getImpl(EPFrontendManager.class);
String statementXml = ePFMgr.getArtefactFullTextContent(artefact);
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 efficiencyCtrl = new CertificateAndEfficiencyStatementController(wControl, ureq, statement);
return new LayoutMain3ColsController(ureq, wControl, efficiencyCtrl);
}
use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.
the class QTI21AssessmentRunController method doStart.
private void doStart(UserRequest ureq) {
removeAsListenerAndDispose(displayCtrl);
OLATResourceable ores = OresHelper.createOLATResourceableTypeWithoutCheck("test");
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = addToHistory(ureq, ores, null);
RepositoryEntry courseRe = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
displayCtrl = new AssessmentTestDisplayController(ureq, bwControl, this, testEntry, courseRe, courseNode.getIdent(), deliveryOptions, overrideOptions, true, false, false);
listenTo(displayCtrl);
if (displayCtrl.getAssessmentTest() == null) {
logError("Test cannot be read: " + testEntry + " in course: " + courseRe + " element: " + courseNode.getIdent(), null);
showError("error.resource.corrupted");
} else if (displayCtrl.isEnded()) {
if (!displayCtrl.isResultsVisible()) {
doExitAssessment(ureq, null, true);
initAssessment(ureq);
}
} else {
// in case displayController was unable to initialize, a message was set by displayController
// this is the case if no more attempts or security check was unsuccessfull
displayContainerController = new QTI21AssessmentMainLayoutController(ureq, getWindowControl(), displayCtrl);
// autodispose
listenTo(displayContainerController);
// empty panel set as "menu" and "tool"
Panel empty = new Panel("empty");
Controller courseCloser = new DisposedCourseRestartController(ureq, getWindowControl(), courseRe);
Controller disposedRestartController = new LayoutMain3ColsController(ureq, getWindowControl(), empty, courseCloser.getInitialComponent(), "disposed");
displayContainerController.setDisposedMessageController(disposedRestartController);
boolean fullWindow = deliveryOptions.isHideLms();
if (fullWindow) {
displayContainerController.setAsFullscreen(ureq);
}
displayContainerController.activate();
assessmentStopped = false;
singleUserEventCenter.registerFor(this, getIdentity(), assessmentInstanceOres);
singleUserEventCenter.fireEventToListenersOf(new AssessmentEvent(AssessmentEvent.TYPE.STARTED, ureq.getUserSession()), assessmentEventOres);
ThreadLocalUserActivityLogger.log(QTI21LoggingAction.QTI_START_IN_COURSE, getClass());
}
}
Aggregations