diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js.orig b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js.orig
deleted file mode 100644
index 7d0b606..0000000
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js.orig
+++ /dev/null
@@ -1,245 +0,0 @@
-AIA.controller("3dAController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce', "$compile",
-function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile) {
-
-
- $scope.showTabButton = false;
- $scope.threeDAnatomyData;
- $scope.Id;
- $scope.$on('$viewContentLoaded', function (event) {
- var currentURL = $location.path();
- var selectedModuleName = '';
- //set module title
- angular.forEach($rootScope.userModules, function (value, key) {
-<<<<<<< HEAD
- if (value.slug === currentURL.replace('/', '')) {
- selectedModuleName = value.name;
-=======
- // if (value.slug === currentURL.replace('/', '')) {
- if (value.slug === "3d-anatomy-list") {
- selectedModuleName = value.name;
->>>>>>> a3f0825d877d83f47a713081fef2e780c2d2c693
- }
- $rootScope.currentActiveModuleTitle = selectedModuleName;
- })
- if ($rootScope.refreshcheck == null) {
- $location.path('/');
- }
- $scope.scroll();
- var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json')
- promise.then(
- function (result) {
- $scope.threeDAnatomyData = result;
-
- // $scope.selectedThreeDAdata = $scope.threeDAnatomyData.root.ThreeDAData;
-
- $scope.selectedThreeDAdata = new jinqJs()
- .from($scope.threeDAnatomyData.root.ThreeDAData)
- .orderBy([{ field: '_Title', sort: 'asc' }])
- .select();
-
- // console.log($scope.selectedCIListViewData);
- $('#grid-view').empty();
- angular.forEach($scope.selectedThreeDAdata, function (value, key) {
- $scope.imagePath = "~/../content/images/3da/thumbnails/" + value._ThumbnailImage;
-
- var $el = $('
'
- + '
'
- + '
![' + value._Title + ']()
'
- + '
').appendTo('#grid-view');
-
-
- $compile($el)($scope);
-
- $(".sidebar").mCustomScrollbar({
- autoHideScrollbar: true,
- //theme:"rounded"
- });
-
- });
-
- },
- function (error) {
- // handle errors here
- console.log(' $scope.threeDAnatomyData = ' + error.statusText);
- }
- );
-
- });
- $scope.scroll = function () {
- // $window.scrollTo(0, 0);
- $("html,body").scrollTop(0);
- //alert("scroll");
- }
- $scope.IsVisible = function () {
- //$scope.scroll();
-
- $location.url("/3dAnatomy");
-
- }
-
-
- $scope.Open3DModel = function ($event) {
- $rootScope.currentBodyViewId = $event.currentTarget.id;
- if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") {
- var ThreeDTitle = [];
- ThreeDTitle = new jinqJs()
- .from($scope.selectedThreeDAdata)
- .where('_id = ' + $event.currentTarget.id)
- .select('_Title');
-
- $rootScope.ViewTitle = ThreeDTitle[0]._Title;
- }
- else {
- $rootScope.ViewTitle = $event.currentTarget.textContent;
-
- }
-
-
- localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle);
- localStorage.setItem("currentBodyViewId", $event.currentTarget.id);
-
- var u = $location.url();
- $location.url('/3d-anatomy-details');
-
- }
-
- $scope.Open3DModelBody = function () {
-
- if ($rootScope.refreshcheck == null) {
- $location.path('/');
-
- }
- $rootScope.isLoading = true;
- $('#spinner').css('visibility', 'visible');
- //alert($rootScope.getLocalStorageValue("currentBodyViewId"));
- $scope.voId3D = $rootScope.getLocalStorageValue("currentBodyViewId");
-
- //alert($scope.voId3D);
-
-
- //once you get id in scope push detail in jspanel content
-
- var openViews;
-<<<<<<< HEAD
- if ($rootScope.openViews.length > 0) {
- openViews = new jinqJs()
- .from($rootScope.openViews)
- .where("BodyViewId==" + $scope.voId3D)
- .select();
- }
- var counter = 1;
- var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson");
-
- if (openViews != null && openViews.length > 0) {
- angular.forEach(openViews, function (value, key) {
-
- if (value.body - views == tittle) {
- tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;
- $rootScope.currentActiveViewTitle = tittle;
- localStorage.setItem("currentViewTitle", tittle);
- }
-
- });
- }
- else {
- localStorage.setItem("currentViewTitle", tittle);
-
- }
-=======
- //if ($rootScope.openViews.length > 0) {
- // openViews = new jinqJs()
- // .from($rootScope.openViews)
- // .where("BodyViewId==" + $scope.voId3D)
- // .select();
- //}
- //var counter = 1;
- var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson");
- $rootScope.currentActiveViewTitle = tittle;
- localStorage.setItem("currentViewTitle", tittle);
- //if (openViews != null && openViews.length > 0) {
- // angular.forEach(openViews, function (value, key) {
-
- // if (value.body - views == tittle) {
- // tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;
- // $rootScope.currentActiveViewTitle = tittle;
- // localStorage.setItem("currentViewTitle", tittle);
- // }
-
- // });
- //}
- //else {
- // localStorage.setItem("currentViewTitle", tittle);
-
- //}
->>>>>>> a3f0825d877d83f47a713081fef2e780c2d2c693
-
- // alert($rootScope.getLocalStorageValue("currentViewTitle"));
-
- var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json')
- promise.then(
- function (result) {
- $scope.threeDAnatomyData = result;
-
- var clicked3dAview = [];
- clicked3dAview = new jinqJs().from($scope.threeDAnatomyData.root.ThreeDAData)
- .where('_id == ' + $scope.voId3D)
- .select('_Title', '_3dimagepath');
- $scope.Selected3DImagePath = clicked3dAview[0]._3dimagepath;
- $scope.threeDBodySystemTitle = clicked3dAview[0]._Title;
-
- if (clicked3dAview.length > 0) {
-
- $rootScope.isLoading = false;
- $('#spinner').css('visibility', 'hidden');
-
- $.jsPanel({
- id: '3DImagePanel',
- selector: '.threeDView',
- theme: 'success',
- currentController: '3dAController',
- parentSlug: '3d-anatomy-list',
- content: '' +
- '' +
- '
',
- title: $rootScope.getLocalStorageValue("currentViewTitle"),
- position: {
- top: 70,
- left: 1,
- },
-
- size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() - 10 },
-
- });
-
- $rootScope.currentSlug = '3d-anatomy-details';
-
- $rootScope.openViews.push(
- {
- "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId,
- "slug": $rootScope.currentSlug
- });
-
-
- }
-
-
- },
- function (error) {
- // handle errors here
- console.log(' $scope.CIllustrationData = ' + error.statusText);
- }
-
- );
- $('#ThreeDView').css("height", $(window).outerHeight());
-
- $('#ThreeDView').css("width", $(window).outerWidth());
-
- }
-
-
-
-}]
-
-
-
-);
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index e35382e..bd78b97 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -363,8 +363,18 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
$rootScope.userModules = result.Modules;
//1. set haveRoleAdmin = false because LicenseInfo is not null
- $rootScope.haveRoleAdmin = false;
+ if (result.LicenseTypeId != 5) {
+
+ $rootScope.haveRoleAdmin = true;
+
+ }
+ if (result.UserTypeId == 8){
+
+ $rootScope.haveRoleAdmin = false;
+ }
+ $("#modestyDiv").css("pointer-events", "none");
+ $("#modestyDiv").css("opacity", 0.5);
//2.
if ($scope.currentUserDetails == null || $scope.currentUserDetails == undefined || $scope.currentUserDetails == "") {
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
index 8720462..c90a4f1 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -15,7 +15,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
$scope.LabExerciseUserData = [];
$scope.LabExercise = [];
$scope.dragableId = "";
- $scope.UserAttempt = [];
+
$scope.blReviewAttempt = false;
$scope.isResetClicked = false;
$scope.$on('$viewContentLoaded', function (event) {
@@ -307,7 +307,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
$scope.CreateLabExerciseDataToSave();
}
$scope.dragableId = "";
- $scope.UserAttempt = [];
+ // $scope.UserAttempt = [];
if ($scope.quiznumber == 1)
return;
else
@@ -370,15 +370,51 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
$("#resultLabData").empty();
var sortedQuestionHtml = '';
+
+
+
+
+ // console.log($scope.SavedLabExercise);
+
+ $scope.usersCorrectQuestDataArray = [];
+
+ for (var j = 0; j <= $scope.usersCorrectQuestData.length - 1; j++) {
+
+ for (var i = 0; i <= $scope.SavedLabExercise.labExercise.length - 1; i++) {
+
+ if ($scope.SavedLabExercise.labExercise[i].QuestionNo == $scope.usersCorrectQuestData[j].QuestionNo) {
+ // alert($scope.SavedLabExercise.labExercise[i].QuestionNo + " " + $scope.usersCorrectQuestData[j].QuestionNo);
+ }
+ else {
+
+ if ($scope.SavedLabExercise.labExercise[i].MaxScore == $scope.SavedLabExercise.labExercise[i].Score) {
+ $scope.usersCorrectQuestDataArray.push({ "CorrectAnswer": $scope.SavedLabExercise.labExercise[i].CorrectAnswers, "CorrectStatus": "Correct", "DragItems": $scope.SavedLabExercise.labExercise[i].DragItems, "MaxScore": $scope.SavedLabExercise.labExercise[i].MaxScore, "QuestionNo": $scope.SavedLabExercise.labExercise[i].QuestionNo, "Score": $scope.SavedLabExercise.labExercise[i].Score, "UserAnswers": $scope.SavedLabExercise.labExercise[i].UserAnswers, "title": " " });
+
+ }
+ else {
+ $scope.usersCorrectQuestDataArray.push({ "CorrectAnswer": $scope.SavedLabExercise.labExercise[i].CorrectAnswers, "CorrectStatus": "Incorrect", "DragItems": $scope.SavedLabExercise.labExercise[i].DragItems, "MaxScore": $scope.SavedLabExercise.labExercise[i].MaxScore, "QuestionNo": $scope.SavedLabExercise.labExercise[i].QuestionNo, "Score": $scope.SavedLabExercise.labExercise[i].Score, "UserAnswers": $scope.SavedLabExercise.labExercise[i].UserAnswers, "title": " " });
+ }
+ }
+ }
+ }
+ console.log($scope.usersCorrectQuestDataArray);
+ for (var i = 0; i <= $scope.usersCorrectQuestDataArray.length - 1; i++) {
+ $scope.usersCorrectQuestData.push({ "CorrectAnswer": $scope.usersCorrectQuestDataArray[i].CorrectAnswer, "CorrectStatus": $scope.usersCorrectQuestDataArray[i].CorrectStatus, "DragItems": $scope.usersCorrectQuestDataArray[i].DragItems, "MaxScore": $scope.usersCorrectQuestDataArray[i].MaxScore, "QuestionNo": $scope.usersCorrectQuestDataArray[i].QuestionNo, "Score": $scope.usersCorrectQuestDataArray[i].Score, "UserAnswers": $scope.usersCorrectQuestDataArray[i].UserAnswers, "title": " " });
+ }
+
+ //console.log($scope.usersCorrectQuestData);
+
+
+
for (var j = $scope.TotalNumberofQuiz; j >= 1; j--) {
for (var i = 0; i <= $scope.usersCorrectQuestData.length - 1; i++) {
if (j == $scope.usersCorrectQuestData[i].QuestionNo) {
if ($scope.usersCorrectQuestData[i].CorrectStatus == "Correct") {
- 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);
}
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);
}
$scope.isValueExist = true;
@@ -399,10 +435,10 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
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() + ' | |
';
+ 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() + ' | |
';
+ sortedQuestionHtml += '' + $q.find("td:nth-child(1)").text() + ' | ' + $q.find("td:nth-child(2)").text() + ' | ' + $q.find("td:nth-child(3)").text() + ' | |
';
}
}
});
@@ -429,7 +465,10 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
if ($(this).text().length == 1) {
var a = parseInt($(this).prev().text()) - 1;
$(this).text($scope.labExerciseModuleData[0].Questions[a].activityTitle);
- $(this).next().text("Not Attempted");
+ //if ($(this).next().text() == "Correct") { $(this).next().text("Correct"); }
+ //else {
+ // $(this).next().text("Incorrect");
+ //}
}
});
}
@@ -883,6 +922,14 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
$scope.usersCorrectQuestData = [];
$scope.CreateLabExerciseDataToSave = function () {
+ if ($scope.UserAttempt.length == 0) {
+ $("#imgdiv").find("div").each(function () {
+ if ($(this).attr("id").split("-")[0] == "blockans") {
+ $scope.UserAttempt.push({ "BlankBoxName": $(this).attr("id").split("-")[1], "OptionName": $(this).attr("draggedattr").split("-")[1] });
+ }
+ });
+ }
+
$scope.LabExerciseAttemptedData = [];
$scope.lb = [];
//get user answers
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
index 7c4dd75..17ce05a 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
@@ -25,7 +25,7 @@
-
Medical Speciality
+ Medical Specialty
@@ -33,15 +33,18 @@