diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
index b1bdeeb..71ec0c9 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -311,7 +311,7 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter,
//}
}
-
+
$scope.SubmitAttempt = function () {
$scope.CreateLabExerciseDataToSave();
@@ -320,7 +320,7 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter,
$("#questionHtml").css("display", "none");
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;
@@ -336,7 +336,7 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter,
$compile(labExerciseHtml)($scope);
}
else {
- var labExerciseHtml = $("#resultLabData").append("
" + $scope.usersCorrectQuestData[i].QuestionNo + " | " + $scope.usersCorrectQuestData[i].title + " | " + $scope.usersCorrectQuestData[i].CorrectStatus + " | |
");
+ var labExerciseHtml = $("#resultLabData").append("" + $scope.usersCorrectQuestData[i].QuestionNo + " | " + $scope.usersCorrectQuestData[i].title + " | " + $scope.usersCorrectQuestData[i].CorrectStatus + " | |
");
$compile(labExerciseHtml)($scope);
}
break;
@@ -349,8 +349,25 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter,
}
}
}
+
+ for (var j = 1;j <= $scope.TotalNumberofQuiz;j++) {
+ $("#resultLabData tr td:nth-child(1)").each(function () {
+ if (j == $(this).text()) {
+ $q = $(this).parent();
+ if ($q.find("td:nth-child(3)").text() == "Correct") {
+ sortedQuestionHtml += '' + $q.find("td:nth-child(1)").text() + ' | ' + $q.find("td:nth-child(2)").text() + ' | ' + $q.find("td:nth-child(3)").text() + ' | |
';
+ }
+ else
+ {
+ sortedQuestionHtml += '' + $q.find("td:nth-child(1)").text() + ' | ' + $q.find("td:nth-child(2)").text() + ' | ' + $q.find("td:nth-child(3)").text() + ' | |
';
+ }
+ }
+ });
-
+ }
+ $("#resultLabData").empty();
+ var sortedCompileHtml = $("#resultLabData").append(sortedQuestionHtml);
+ $compile(sortedCompileHtml)($scope);
$scope.inCorrectAnswer = 0;
$scope.CorrectAnswer = 0;
$("#resultLabData tr td:nth-child(3)").each(function () {