package org.owasp.webgoat.session; import java.util.HashMap; import java.util.Map; import java.util.Properties; public class RandomLessonTracker extends LessonTracker { private String[] stages; private String stage; private Map completed = new HashMap(); public RandomLessonTracker(String[] stages) { if (stages == null) stages = new String[0]; this.stages = stages; } public void setStage(String stage) { this.stage = stage; } public String getStage() { if (this.stage == null && stages.length > 0) return stages[0]; return this.stage; } public void setStageComplete(String stage, boolean complete) { completed.put(stage, Boolean.valueOf(complete)); for (int i=0; i