diff --git a/trainingportal/static/submitCodeCtrl.js b/trainingportal/static/submitCodeCtrl.js index 79596f0..c388494 100644 --- a/trainingportal/static/submitCodeCtrl.js +++ b/trainingportal/static/submitCodeCtrl.js @@ -42,7 +42,9 @@ app.controller("submitCodeCtrl", function($scope, $http, $routeParams) { var moduleId = $routeParams.moduleId; var challengeId = $routeParams.challengeId; var challengeType = $routeParams.challengeType; - var answerValue = answer.value; + var answerValue = ""; + if(typeof answer !== "undefined") answerValue = answer.value; + var challengeCodeValue = ""; if(typeof challengeCode !== "undefined"){ challengeCodeValue = challengeCode.value