diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js index 71ec0c9..59fb487 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js @@ -144,6 +144,7 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter, $.each(result.LabExercise, function (index, value) { + debugger; $scope.LabExerciseName = result.LabExercise[index].Topic; if (result.LabExercise[index].Slug == keywords.labexercise) { @@ -183,6 +184,11 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter, if ($scope.SavedLabExercise != undefined && $scope.SavedLabExercise.lastQuestion > 0) { if ($scope.isResetClicked != true) { $scope.ShowSavedLabExercise(); + + } + else { + $rootScope.isLoading = false; + $('#spinner').css('visibility', 'hidden'); $scope.isResetClicked = false; } } @@ -321,12 +327,7 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter, console.log($scope.usersCorrectQuestData); $("#resultLabData").empty(); var sortedQuestionHtml = ''; - $scope.usersCorrectQuestData.sort(function (obj1, obj2) { - // Ascending: first age less than the previous - return obj1.QuestionNo - obj2.QuestionNo; - }); - - + for (var j = $scope.TotalNumberofQuiz; j >= 1; j--) { for (var i = 0; i <= $scope.usersCorrectQuestData.length - 1; i++) { if (j == $scope.usersCorrectQuestData[i].QuestionNo) @@ -339,15 +340,18 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter, var labExerciseHtml = $("#resultLabData").append("