Clicking on 'LAB: Role Based Access Control' produces 'Invalid Session' in UI #44

This commit is contained in:
Nanne Baars 2015-08-28 16:24:04 +02:00
parent a44e08cbfd
commit 2f43c16cc1

View File

@ -842,6 +842,7 @@ public class WebSession {
} else if (al instanceof RandomLessonAdapter) { } else if (al instanceof RandomLessonAdapter) {
try { try {
RandomLessonAdapter rla = (RandomLessonAdapter) al; RandomLessonAdapter rla = (RandomLessonAdapter) al;
if (!myParser.getRawParameter(STAGE).equals("null")) {
int stage = myParser.getIntParameter(STAGE) - 1; int stage = myParser.getIntParameter(STAGE) - 1;
String[] stages = rla.getStages(); String[] stages = rla.getStages();
if (stages == null) { if (stages == null) {
@ -850,6 +851,9 @@ public class WebSession {
if (stage >= 0 && stage < stages.length) { if (stage >= 0 && stage < stages.length) {
rla.setStage(this, stages[stage]); rla.setStage(this, stages[stage]);
} }
} else {
rla.setStage(this, null);
}
} catch (ParameterNotFoundException pnfe) { } catch (ParameterNotFoundException pnfe) {
} }
} }