Take a simple approach to add direct stage access.
Make it a numerical stage indicator. This allows the person to skip a stage if they choose to, but it will effectively be marked as completed. git-svn-id: http://webgoat.googlecode.com/svn/trunk@145 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
parent
e6fcd4176c
commit
51cc4fb0b4
@ -164,6 +164,12 @@ public abstract class AbstractLesson extends Screen implements Comparable
|
||||
*/
|
||||
public abstract Element getCredits();
|
||||
|
||||
/**
|
||||
* Get the number of stages provided by this lesson
|
||||
*
|
||||
* @return the number of stages
|
||||
*/
|
||||
public abstract int getStageCount();
|
||||
|
||||
/**
|
||||
* Description of the Method
|
||||
|
@ -310,8 +310,12 @@ public class CrossSiteScripting extends LessonAdapter
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStageCount() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
protected LessonAction getAction(String actionName)
|
||||
protected LessonAction getAction(String actionName)
|
||||
{
|
||||
return (LessonAction) lessonFunctions.get(actionName);
|
||||
}
|
||||
|
@ -381,4 +381,12 @@ public abstract class LessonAdapter extends AbstractLesson
|
||||
t.addElement(tr);
|
||||
return t;
|
||||
}
|
||||
|
||||
/* By default returns 1 stage.
|
||||
* (non-Javadoc)
|
||||
* @see org.owasp.webgoat.lessons.AbstractLesson#getStageCount()
|
||||
*/
|
||||
public int getStageCount() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user