From 40f1d587964714de13b10ff81b4f9cdb6e02ec00 Mon Sep 17 00:00:00 2001 From: Mario Zupan Date: Sat, 7 Jan 2017 15:46:19 +0100 Subject: [PATCH] Issue #302: Fix redundant calls to lessonoverview.mvc and lessonmenu.mvc on submission --- .../static/js/goatApp/controller/LessonController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 57d5778c0..45b8e5d31 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 @@ -64,6 +64,8 @@ define(['jquery', this.listenTo(this.lessonContent,'content:loaded',this.onContentLoaded); this.userAndInfoView = new UserAndInfoView(); this.menuButtonView = new MenuButtonView(); + this.listenTo(this.lessonContentView, 'lesson:complete', this.updateMenu); + this.listenTo(this.lessonContentView, 'lesson:complete', this.updateLessonOverview); }; this.loadLesson = function(name,pageNum) { @@ -104,8 +106,6 @@ define(['jquery', this.listenTo(this.helpControlsView,'source:show',this.hideShowHelps); this.listenTo(this.helpControlsView,'lesson:restart',this.restartLesson); this.listenTo(this.developerControlsView, 'dev:labels', this.restartLesson); - this.listenTo(this.lessonContentView, 'lesson:complete', this.updateMenu) - this.listenTo(this.lessonContentView, 'lesson:complete', this.updateLessonOverview) this.listenTo(this,'hints:show',this.onShowHints); this.helpControlsView.render();