Commit 9e26e98b14a67854b84a566843640fe6d30194bc

Authored by unknown
1 parent 351ab87a

Commit Changes

400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
... ... @@ -1290,37 +1290,25 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
1290 1290 }
1291 1291 $scope.reportCopyStatus = false;
1292 1292 $scope.SendLabEXMailToUser = function (User) {
1293   -
1294   -
1295   - // html2canvas($("#submitResultHtml"), {
1296   - // onrendered: function (canvas) {
1297   - // var dataURL = canvas.toDataURL("image/jpeg");
1298   - // dataURL = dataURL.replace(/^data:image\/(png|jpg);base64,/, "");
1299   - // var imageToPrint = new Image();
1300   - // imageToPrint.src = dataURL;
1301   - // console.log(imageToPrint.src);
1302   - // $scope.reportImage = imageToPrint.src;
1303   - var htm = '';
1304   - htm += '<table style="width:100%;"><thead><th style="padding:15px;border:1px solid #cccccc"><strong>Question</strong></th><th style="padding:15px;border:1px solid #cccccc"><strong>Activity Title</strong></th><th style="padding:15px;border:1px solid #cccccc"><strong>Status</strong></th></thead><tbody>';
  1293 + var reportHtml = '';
  1294 + reportHtml += '<table style="width:100%;"><thead><th style="padding:15px;border:1px solid #cccccc"><strong>Question</strong></th><th style="padding:15px;border:1px solid #cccccc"><strong>Activity Title</strong></th><th style="padding:15px;border:1px solid #cccccc"><strong>Status</strong></th></thead><tbody>';
1305 1295 $("#resultLabData tr").each(function () {
1306   - htm += '<tr>';
  1296 + reportHtml += '<tr>';
1307 1297 $(this).children("td").each(function () {
1308 1298 if ($(this).text() == " Review") {
1309 1299 }
1310 1300 else{
1311   - htm += '<td style="border:1px solid #cccccc;padding:15px;">'+$(this).text()+'</td>';
  1301 + reportHtml += '<td style="border:1px solid #cccccc;padding:15px;">' + $(this).text() + '</td>';
1312 1302 }
1313 1303 });
1314   - htm += '</tr>';
  1304 + reportHtml += '</tr>';
1315 1305  
1316 1306 });
1317   - htm += '</tbody></table>';
1318   - $scope.reportImage = "<table style='width:100%;'><tr><td style='padding:15px;'><strong>"+$("#submitResultHtml .panel-heading .row div:nth-child(1)").text()+"</strong></td><td style='padding:15px;'>Performance Report</td><td style='padding:15px;text-align:right;'><span>" + $("#submitResultHtml .panel-heading .row div:nth-child(3)").text() + "</span></td></tr></table><table style='width:100%;'><thead><th style='text-align:center;padding:15px;border:1px solid #cccccc;'><strong>Total Question</strong></th><th style='border:1px solid #cccccc;text-align:center;padding:15px;'><strong>Correct Answers</strong></th><th style='border:1px solid #cccccc;padding:15px;text-align:center;'><strong>Incorrect Answers</strong></th></thead><tr><td style='border:1px solid #cccccc;padding:15px;text-align:center;'><span>" + $("#questionStatus tbody tr td:nth-child(1)").text() + "</span></td><td style='text-align:center;border:1px solid #cccccc;padding:15px;'><span>" + $("#questionStatus tbody tr td:nth-child(2)").text() + "</span></td><td style='text-align:center;border:1px solid #cccccc;padding:15px;'><span>" + $("#questionStatus tbody tr td:nth-child(3)").text() + "</span></td></tr></table><br/><br/>" + htm + "";
  1307 + reportHtml += '</tbody></table>';
  1308 + $scope.reportImage = "<table style='width:100%;'><tr><td style='padding:15px;'><strong>"+$("#submitResultHtml .panel-heading .row div:nth-child(1)").text()+"</strong></td><td style='padding:15px;'>Performance Report</td><td style='padding:15px;text-align:right;'><span>" + $("#submitResultHtml .panel-heading .row div:nth-child(3)").text() + "</span></td></tr></table><table style='width:100%;'><thead><th style='text-align:center;padding:15px;border:1px solid #cccccc;'><strong>Total Question</strong></th><th style='border:1px solid #cccccc;text-align:center;padding:15px;'><strong>Correct Answers</strong></th><th style='border:1px solid #cccccc;padding:15px;text-align:center;'><strong>Incorrect Answers</strong></th></thead><tr><td style='border:1px solid #cccccc;padding:15px;text-align:center;'><span>" + $("#questionStatus tbody tr td:nth-child(1)").text() + "</span></td><td style='text-align:center;border:1px solid #cccccc;padding:15px;'><span>" + $("#questionStatus tbody tr td:nth-child(2)").text() + "</span></td><td style='text-align:center;border:1px solid #cccccc;padding:15px;'><span>" + $("#questionStatus tbody tr td:nth-child(3)").text() + "</span></td></tr></table><br/><br/>" + reportHtml + "";
1319 1309 $scope.reportTitle = "Lab Exercise Report for " + $("#submitResultHtml .panel-heading .row div:nth-child(1)").text();
1320 1310 $scope.senderEmails = $("#emailTo").val();
1321 1311  
1322   - // }
1323   - // });
1324 1312  
1325 1313 LabExerciseService.LabExerciseReport(User, $scope.reportImage, $scope.reportTitle, $scope.reportCopyStatus, $scope.senderEmails).then(
1326 1314  
... ...