diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/LabExerciseController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/LabExerciseController.cs
index 56715b4..042ea6f 100644
--- a/400-SOURCECODE/AIAHTML5.API/Controllers/LabExerciseController.cs
+++ b/400-SOURCECODE/AIAHTML5.API/Controllers/LabExerciseController.cs
@@ -260,7 +260,7 @@ namespace AIAHTML5.API.Controllers
{
aar.Add(User["EmailAdd"].ToString());
}
- AIAHTML5.API.Models.UserUtility.SendEmail(User, aar, User["EmailAdd"].ToString(), "test", User["reportImage"].ToString());
+ AIAHTML5.API.Models.UserUtility.SendEmail(User, aar, User["EmailAdd"].ToString(), User["reportTitle"].ToString(), User["reportImage"].ToString());
return Request.CreateResponse(HttpStatusCode.OK);
}
[Route("api/LabExercise/GetParameter")]
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
index 89e013b..54df43d 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -1293,15 +1293,38 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
console.log(User);
html2canvas($("#submitResultHtml"), {
onrendered: function (canvas) {
- var dataURL = canvas.toDataURL("image/jpeg");
- var imageToPrint = new Image();
- imageToPrint.src = dataURL;
- console.log(imageToPrint.src);
- $scope.reportImage = imageToPrint.src;
+ // var dataURL = canvas.toDataURL("image/jpeg");
+ // dataURL = dataURL.replace(/^data:image\/(png|jpg);base64,/, "");
+ // var imageToPrint = new Image();
+ // imageToPrint.src = dataURL;
+ // console.log(imageToPrint.src);
+ // $scope.reportImage = imageToPrint.src;
+ console.log($("#submitResultHtml").html());
+ // $scope.reportImage = "
" + $("#submitResultHtml").html() + "";
+ alert($("#submitResultHtml .panel-heading .row div:nth-child(1)").text());
+ var htm = '';
+ htm += 'Question | Activity Title | Status | ';
+ $("#resultLabData tr").each(function () {
+ htm += '';
+ $(this).children("td").each(function () {
+
+ if ($(this).text() == " Review") { }
+ else{
+ htm += ''+$(this).text()+' | ';
+ alert($(this).text());
+ }
+ });
+ htm += '
';
+
+ });
+
+ htm += '
';
+ $scope.reportImage = ""+$("#submitResultHtml .panel-heading .row div:nth-child(1)").text()+" | Performance Report | " + $("#submitResultHtml .panel-heading .row div:nth-child(3)").text() + " |
Total Question | Correct Answers | Incorrect Answers | " + $("#questionStatus tbody tr td:nth-child(1)").text() + " | " + $("#questionStatus tbody tr td:nth-child(2)").text() + " | " + $("#questionStatus tbody tr td:nth-child(3)").text() + " |
" + htm + "";
+ $scope.reportTitle = "Lab Exercise Report for " + $("#submitResultHtml .panel-heading .row div:nth-child(1)").text();
}
});
- debugger;
- LabExerciseService.LabExerciseReport(User, $scope.reportImage).then(
+
+ LabExerciseService.LabExerciseReport(User, $scope.reportImage, $scope.reportTitle).then(
function (result) {
console.log(result);
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js b/400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js
index 0935b33..83499c2 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js
@@ -51,10 +51,10 @@
},
// code of email report
- LabExerciseReport: function (User, reportImage) {
+ LabExerciseReport: function (User, reportImage, reportTitle) {
User.reportImage = reportImage;
+ User.reportTitle = reportTitle;
var deferred = $q.defer();
- debugger;
// var jsonData = { 'EmailTo': User.EmailTo, 'EmailAdd': User.EmailAdd };
$http.post('http://192.168.90.19:91/API/api/LabExercise/SendEmail', JSON.stringify(User), {
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/lab-exercises-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/lab-exercises-detail.html
index 262df82..a921b46 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/lab-exercises-detail.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/lab-exercises-detail.html
@@ -201,7 +201,7 @@