From 194a327ad50f556660e0acb532a6e1964c320fd1 Mon Sep 17 00:00:00 2001 From: Nanne Baars Date: Wed, 3 May 2017 05:08:00 +0200 Subject: [PATCH] Fixed issue when restarting the lesson the menu was not updated (the marker stayed behind) Also restarting the lesson was not persisted --- .../java/org/owasp/webgoat/service/RestartLessonService.java | 1 + .../resources/static/js/goatApp/controller/LessonController.js | 1 + 2 files changed, 2 insertions(+) diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/service/RestartLessonService.java b/webgoat-container/src/main/java/org/owasp/webgoat/service/RestartLessonService.java index 5a46f90b0..4ea036996 100644 --- a/webgoat-container/src/main/java/org/owasp/webgoat/service/RestartLessonService.java +++ b/webgoat-container/src/main/java/org/owasp/webgoat/service/RestartLessonService.java @@ -61,5 +61,6 @@ public class RestartLessonService { UserTracker userTracker = userTrackerRepository.findOne(webSession.getUserName()); userTracker.reset(al); + userTrackerRepository.save(userTracker); } } diff --git a/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js b/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js index a0d8ceac0..52a341f13 100644 --- a/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js +++ b/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js @@ -191,6 +191,7 @@ define(['jquery', method:'GET' }).done(function(lessonLink) { self.loadLesson(self.name); + self.updateMenu(); }); };