Commit 4e94e2f625b5a4969f3665895e3b089c71dc2bc4

Authored by unknown
1 parent 12329c83

commit Changes

400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
... ... @@ -1291,38 +1291,33 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
1291 1291  
1292 1292 $scope.SendLabEXMailToUser = function (User) {
1293 1293 console.log(User);
1294   - html2canvas($("#submitResultHtml"), {
1295   - onrendered: function (canvas) {
  1294 + // html2canvas($("#submitResultHtml"), {
  1295 + // onrendered: function (canvas) {
1296 1296 // var dataURL = canvas.toDataURL("image/jpeg");
1297 1297 // dataURL = dataURL.replace(/^data:image\/(png|jpg);base64,/, "");
1298 1298 // var imageToPrint = new Image();
1299 1299 // imageToPrint.src = dataURL;
1300 1300 // console.log(imageToPrint.src);
1301 1301 // $scope.reportImage = imageToPrint.src;
1302   - console.log($("#submitResultHtml").html());
1303   - // $scope.reportImage = "<html><head><link href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap-theme.css' rel='stylesheet'/><link href='themes/default/css/bootstrap/3.3.6/main.css' rel='stylesheet'/><body>" + $("#submitResultHtml").html() + "</body></head></html>";
1304   - alert($("#submitResultHtml .panel-heading .row div:nth-child(1)").text());
1305 1302 var htm = '';
1306 1303 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>';
1307 1304 $("#resultLabData tr").each(function () {
1308 1305 htm += '<tr>';
1309 1306 $(this).children("td").each(function () {
1310   -
1311   - if ($(this).text() == " Review") { }
  1307 + if ($(this).text() == " Review") {
  1308 + }
1312 1309 else{
1313 1310 htm += '<td style="border:1px solid #cccccc;padding:15px;">'+$(this).text()+'</td>';
1314   - alert($(this).text());
1315 1311 }
1316 1312 });
1317 1313 htm += '</tr>';
1318 1314  
1319 1315 });
1320   -
1321 1316 htm += '</tbody></table>';
1322 1317 $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 + "";
1323 1318 $scope.reportTitle = "Lab Exercise Report for " + $("#submitResultHtml .panel-heading .row div:nth-child(1)").text();
1324   - }
1325   - });
  1319 + // }
  1320 + // });
1326 1321  
1327 1322 LabExerciseService.LabExerciseReport(User, $scope.reportImage, $scope.reportTitle).then(
1328 1323  
... ...