Commit 1244cf12d60d4e074bbe8d444d74f99e7955010d

Authored by Birendra
1 parent be36035b

fixed issue to open course with secure link

400-SOURCECODE/AIAHTML5.API/Web.config
... ... @@ -60,7 +60,6 @@
60 60 <add key ="ForgotUserIdEmailTemplate" value="~/Templates/forgot-UserId.html"/>
61 61  
62 62 <!-- Aod used: Added by Birendra-->
63   - <!-- Access-Control-Allow-Origin: change origin also to resolve CORS policy on UAT and PROD for AOD domain-->
64 63 <add key="Aod_site_Url" value="https://uat.adamondemand.com/"/>
65 64 <add key="aiapasskey" value="as@2$eDu8Jk"/>
66 65  
... ... @@ -110,12 +109,6 @@
110 109 </assemblyBinding>
111 110 </runtime>
112 111 <system.webServer>
113   - <httpProtocol>
114   - <customHeaders>
115   - <add name="Access-Control-Allow-Origin" value="https://uat.adamondemand.com" />
116   - <!--<add name="Access-Control-Allow-Origin" value="https://adamondemand.com" />-->
117   - </customHeaders>
118   - </httpProtocol>
119 112 <handlers>
120 113 <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
121 114 <remove name="OPTIONSVerbHandler" />
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
... ... @@ -10,7 +10,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
10 10 'moduleName': '',
11 11 'aodUrl':'',
12 12 'courseId':'',
13   - 'uid':'2',
  13 + 'uid':'2',//categoty id. courseid cheched in category id
  14 + 'requestType':'SCORMPackage',
14 15 'currentViewTitle': '',
15 16 'parentSlugName': '',
16 17 'currentSlug': '',
... ... @@ -358,7 +359,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
358 359 var aodlink = $rootScope.aodDomainName+ $scope.GetAODwindowStoreData(windowviewid, 'aodUrl');
359 360 var courseid = $scope.GetAODwindowStoreData(windowviewid, 'courseId');
360 361 var uid = $scope.GetAODwindowStoreData(windowviewid, 'uid');
361   - var aodSiteUrl = aodlink+"?aodkeypass="+$rootScope.aodkeypass+ "&SessionId=" + $rootScope.userData.SessionId + "&Courseid=" + courseid + "&uID=" + uid+ ",_self"
  362 + var requestType = $scope.GetAODwindowStoreData(windowviewid, 'requestType');
  363 + var aodSiteUrl = aodlink+"?SessionId=" + $rootScope.userData.SessionId + "&Courseid=" + courseid + "&type="+requestType +"&uID=" + uid+ ",_self";
362 364  
363 365 $scope.jsPanelWidth = $(window).outerWidth() - 20;
364 366 $scope.jsPanelHeight = $(window).outerHeight() - 140;
... ... @@ -374,7 +376,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
374 376 parentSlug: $scope.GetAODwindowStoreData(windowviewid, 'parentSlugName'),
375 377 content: '<div style="height: 100%;overflow: scroll;" >' +
376 378 '<iframe name="aodFrame" src="" style="width: 100%;height:100%" id="aodvideo_' + windowviewid + '" onload="MyAODvideoOnLoad(event)"></iframe>'+
377   - // '<object data="' + aodurl + '" width="100%" height="100%" id="aodvideo_' + windowviewid + '" onload="MyAODvideoOnLoad(event)"></object>' +
378 379 '</div><script>$(document).ready(function(){var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {var threeDivWidth = $("#AODView").css("width");$("#AODView").css({"left":"0px","width":"100%","min-idth": threeDivWidth}); var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth}); $("#aodImagePanel_' + windowviewid + '").css("width", "100%"); }});</script>',
379 380 title: tittle,
380 381 position: {
... ... @@ -417,7 +418,42 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
417 418  
418 419 $scope.MyAODvideoOnLoad = function (windowviewid)
419 420 {
420   - $scope.EnableUI();
  421 + $scope.EnableUI();
  422 + $scope.JsPanelMouseEnter(windowviewid);
  423 + }
  424 +
  425 + $scope.JsPanelMouseEnter = function (windowviewid) {
  426 + $rootScope.resetMenuOption();
  427 +
  428 + var timeintval = null;
  429 + timeintval = $interval(PointerEventEnableDisable, 5000);
  430 +
  431 + function PointerEventEnableDisable() {
  432 + var pointevents = $("#aodvideo_" + windowviewid).css('pointer-events');
  433 + if (pointevents=='auto') {
  434 + $scope.stop3drefresh(timeintval);
  435 + timeintval = $interval(PointerEventEnableDisable, 500);
  436 + $("#aodvideo_" + windowviewid).css('pointer-events', 'none');
  437 + }
  438 + else if(pointevents=='none')
  439 + {
  440 + $("#aodvideo_" + windowviewid).css('pointer-events', 'auto');
  441 + $scope.stop3drefresh(timeintval);
  442 + timeintval = $interval(PointerEventEnableDisable, 10000);
  443 + }
  444 + else
  445 + {
  446 + //auto clode interval when panel close
  447 + $scope.stop3drefresh(timeintval);
  448 + }
  449 + }
  450 +
  451 + $scope.stop3drefresh = function (timeintval) {
  452 + if (angular.isDefined(timeintval)) {
  453 + $interval.cancel(timeintval);
  454 + timeintval = undefined;
  455 + }
  456 + };
421 457 }
422 458  
423 459 }]);
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -714,7 +714,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
714 714 $rootScope.aiaPingInterval = configresult.pingInterval;
715 715 $rootScope.aiaAnimationPath = configresult.serverPath;
716 716 $rootScope.MaxOneFileSize = configresult.fileSize;
717   - $rootScope.aodkeypass = configresult.aodkeypass;
718 717 $rootScope.aodDomainName = configresult.aodSiteUrl;
719 718  
720 719 var loggedInUser = JSON.parse($scope.currentUserDetails);
... ... @@ -949,7 +948,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
949 948 $rootScope.aiaPingInterval = configresult.pingInterval;
950 949 $rootScope.aiaAnimationPath = configresult.serverPath;
951 950 $rootScope.MaxOneFileSize = configresult.fileSize;
952   - $rootScope.aodkeypass = configresult.aodkeypass;
953 951 $rootScope.aodDomainName = configresult.aodSiteUrl;
954 952  
955 953 });
... ... @@ -1195,13 +1193,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1195 1193 $rootScope.userData = result;
1196 1194 $rootScope.userModules = result.Modules;
1197 1195  
1198   - //update slag of aod untill push to PROD
1199   - $rootScope.userModules = new jinqJs()
1200   - .from($rootScope.userModules)
1201   - .update(function (coll, index) { coll[index].slug = 'ADAM-on-demand'; })
1202   - .at("id == " + 17)
1203   - .select();
1204   -
1205 1196 localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
1206 1197  
1207 1198 if (isCommingSoonModel == true) {
... ... @@ -1267,13 +1258,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1267 1258 $rootScope.userData = result;
1268 1259 $rootScope.userModules = result.Modules;
1269 1260  
1270   - //update slag of aod untill push to PROD
1271   - $rootScope.userModules = new jinqJs()
1272   - .from($rootScope.userModules)
1273   - .update(function (coll, index) { coll[index].slug = 'ADAM-on-demand'; })
1274   - .at("id == " + 17)
1275   - .select();
1276   -
1277 1261 //only instructor allowed to change modesty
1278 1262 //concurrent user of non-instructor
1279 1263 if( result.UserTypeId == 6 && result.EditionId!=1 && result.EditionId!=2)
... ... @@ -1489,7 +1473,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1489 1473 $rootScope.aiaPingInterval = configresult.pingInterval;
1490 1474 $rootScope.aiaAnimationPath = configresult.serverPath;
1491 1475 $rootScope.MaxOneFileSize = configresult.fileSize;
1492   - $rootScope.aodkeypass = configresult.aodkeypass;
1493 1476 $rootScope.aodDomainName = configresult.aodSiteUrl;
1494 1477  
1495 1478 userInfo.username = result.LoginId;
... ... @@ -1545,7 +1528,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1545 1528 $rootScope.aiaPingInterval = configresult.pingInterval;
1546 1529 $rootScope.aiaAnimationPath = configresult.serverPath;
1547 1530 $rootScope.MaxOneFileSize = configresult.fileSize;
1548   - $rootScope.aodkeypass = configresult.aodkeypass;
1549 1531 $rootScope.aodDomainName = configresult.aodSiteUrl;
1550 1532  
1551 1533 var loggedInUser = JSON.parse($scope.currentUserDetails);
... ... @@ -1739,13 +1721,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1739 1721  
1740 1722 $rootScope.userData = result;
1741 1723 $rootScope.userModules = result.Modules;
1742   - //update slag of aod untill push to PROD
1743   - $rootScope.userModules = new jinqJs()
1744   - .from($rootScope.userModules)
1745   - .update(function (coll, index) { coll[index].slug = 'ADAM-on-demand'; })
1746   - .at("id == " + 17)
1747   - .select();
1748   -
  1724 +
1749 1725 localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
1750 1726  
1751 1727 if (isCommingSoonModel == true) {
... ... @@ -1796,13 +1772,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1796 1772  
1797 1773 $rootScope.userData = result;
1798 1774 $rootScope.userModules = result.Modules;
1799   - //update slag of aod untill push to PROD
1800   - $rootScope.userModules = new jinqJs()
1801   - .from($rootScope.userModules)
1802   - .update(function (coll, index) { coll[index].slug = 'ADAM-on-demand'; })
1803   - .at("id == " + 17)
1804   - .select();
1805   -
  1775 +
1806 1776 //1. set haveRoleAdmin = false because LicenseInfo is not null
1807 1777 $rootScope.haveRoleAdmin = false;
1808 1778  
... ... @@ -1924,12 +1894,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1924 1894 $rootScope.userData = userInfo;
1925 1895 $rootScope.userModules = userInfo.Modules;
1926 1896  
1927   - //update slag of aod untill push to PROD
1928   - $rootScope.userModules = new jinqJs()
1929   - .from($rootScope.userModules)
1930   - .update(function (coll, index) { coll[index].slug = 'ADAM-on-demand'; })
1931   - .at("id == " + 17)
1932   - .select();
1933 1897 // ShowAssignedModulesPopup(userInfo.Modules);;
1934 1898 // for reseller type user first need to update profile
1935 1899 if (userInfo.UserTypeId == 7 && (userInfo.FirstName == "" || userInfo.EmailId == "" || userInfo.LastName == "")) {
... ...