HTTP-Basics mark lesson complete issue fixed
This commit is contained in:
parent
5c800f6f2b
commit
6d45bbc09c
@ -49,7 +49,7 @@ public class HttpBasicsQuiz extends Assignment {
|
|||||||
@RequestMapping(method = RequestMethod.POST)
|
@RequestMapping(method = RequestMethod.POST)
|
||||||
public @ResponseBody AttackResult completed(@RequestParam String answer, @RequestParam String magic_answer, @RequestParam String magic_num, HttpServletRequest request) throws IOException {
|
public @ResponseBody AttackResult completed(@RequestParam String answer, @RequestParam String magic_answer, @RequestParam String magic_num, HttpServletRequest request) throws IOException {
|
||||||
if ("POST".equals(answer.toUpperCase()) && magic_answer.equals(magic_num)) {
|
if ("POST".equals(answer.toUpperCase()) && magic_answer.equals(magic_num)) {
|
||||||
return AttackResult.success();
|
return trackProgress(AttackResult.success());
|
||||||
} else {
|
} else {
|
||||||
StringBuffer message = new StringBuffer();
|
StringBuffer message = new StringBuffer();
|
||||||
if (!"POST".equals(answer.toUpperCase())) {
|
if (!"POST".equals(answer.toUpperCase())) {
|
||||||
@ -58,7 +58,7 @@ public class HttpBasicsQuiz extends Assignment {
|
|||||||
if (!magic_answer.equals(magic_num)){
|
if (!magic_answer.equals(magic_num)){
|
||||||
message.append("The magic number is incorrect. ");
|
message.append("The magic number is incorrect. ");
|
||||||
}
|
}
|
||||||
return AttackResult.failed("You are close, try again. " + message.toString());
|
return trackProgress(AttackResult.failed("You are close, try again. " + message.toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user