diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
index 807cc2c..e46c749 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -539,11 +539,22 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter,
$.each(Options, function (inx, value2) {
if (Options[inx].BoxName == id.split('-')[1]) {
if ($scope.DraggedList != null) {
- $.each($scope.DraggedList, function (inx1, value3) {
- if ($scope.DraggedList[inx1].Value == dataText) {
- $scope.DraggedList.splice(inx1, 1);
+ //$.each($scope.DraggedList, function (inx1, value3) {
+ // if ($scope.DraggedList[inx1].Value == dataText) {
+ // $scope.DraggedList.splice(inx1, 1);
+ // }
+ //});
+ for (var i = 0; i <= $scope.DraggedList.length - 1; i++) {
+
+ if ($scope.DraggedList[i].Value == undefined) {
+ i = 0;
+ continue;
}
- });
+
+ if ($scope.DraggedList[i].Value == dataText) {
+ $scope.DraggedList.splice(i, 1);
+ }
+ }
}
// $scope.UserAttempt.push({ "BlankBoxName": id.split('-')[1], "OptionName": $scope.dragableId.split('-')[1] });
//$scope.UserAttempt.push({ balnkBox: +$scope.dragableId.split('-')[1] });