Skip to content
Snippets Groups Projects
Commit 7f5648b5 authored by Matthai Kurian's avatar Matthai Kurian
Browse files

merge

parents eb7d0135 cfceca19
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,12 @@ public class Window extends Container {
*/
public static final Event END_OF_DISPATCH_CYCLE = new Event("eodc");
/**
* fired before render-only call is rendered (e.g. after reload, redirect).
* In this case normally no dispatch is fired. No dispatch will be done
*/
public static final Event BEFORE_RENDER_ONLY = new Event("before_render_only");
/**
* fired before inline (text/html computed response) takes place
*/
......@@ -521,6 +527,7 @@ public class Window extends Container {
if (renderOnly || timestampID == null) {
inline = true;
validate = true;
wbackofficeImpl.fireCycleEvent(BEFORE_RENDER_ONLY);
} else if (validatingCausedRerendering && timestampID.equals("-1")) {
// the first request after the 302 redirect cause by a component validation
// -> just rerender, but clear the flag for further async media requests
......
......@@ -141,13 +141,9 @@ public class ScormRunController extends BasicController implements ScormAPICallb
putInitialPanel(main);
boolean doSkip = config.getBooleanSafe(ScormEditController.CONFIG_SKIPLAUNCHPAGE, true);
if (isAssessable && doSkip && !maxAttemptsReached()) {
if (doSkip && !maxAttemptsReached()) {
doLaunch(ureq, true);
//CoordinatorManager.getInstance().getCoordinator().getEventBus().registerFor(this, ureq.getIdentity(), OresHelper.createOLATResourceableType(getClass().getName()));
getWindowControl().getWindowBackOffice().addCycleListener(this);
// Component scormContent = scormDispC.getInitialComponent();
// fireEvent(ureq, new FullWidthReplaceRequestEvent(true, scormContent));
}
}
......@@ -436,7 +432,12 @@ public class ScormRunController extends BasicController implements ScormAPICallb
@Override
public void event(Event event) {
if (event == Window.END_OF_DISPATCH_CYCLE) {
if (event == Window.END_OF_DISPATCH_CYCLE || event == Window.BEFORE_RENDER_ONLY) {
// do initial modal dialog activation
// a) just after the dispatching of the event which is before
// rendering after a normal click
// b) just before a render-only operation which happens when using a
// jump-in URL followed by a redirect without dispatching
scormDispC.activate();
getWindowControl().getWindowBackOffice().removeCycleListener(this);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment