Commit d28b5572 authored by I.K Seneviratne's avatar I.K Seneviratne

Committing the modifications of finding correlations between student behavior components.

.
parent 723f804a
...@@ -1167,6 +1167,7 @@ class GetLectureActivityCorrelations(APIView): ...@@ -1167,6 +1167,7 @@ class GetLectureActivityCorrelations(APIView):
activity_correlations = ar.get_activity_correlations(individual_lec_activities, lec_recorded_activity_data) activity_correlations = ar.get_activity_correlations(individual_lec_activities, lec_recorded_activity_data)
return Response({ return Response({
"correlations": activity_correlations "correlations": activity_correlations
}) })
......
This diff is collapsed.
...@@ -1240,7 +1240,7 @@ ...@@ -1240,7 +1240,7 @@
function displayActivityEmotionCorrelations(correlations) { function displayActivityEmotionCorrelations(correlations) {
let htmlString = ""; let htmlString = "";
if (correlations.length !== 0) {
//create the html content for the activity correlation table //create the html content for the activity correlation table
for (let i = 0; i < correlations.length; i++) { for (let i = 0; i < correlations.length; i++) {
let corr = correlations[i]; let corr = correlations[i];
...@@ -1275,6 +1275,14 @@ ...@@ -1275,6 +1275,14 @@
htmlString += "</tr>"; htmlString += "</tr>";
} }
} else {
htmlString += "<tr>";
htmlString += "<td colspan='3'>";
htmlString += "<span class='font-italic'>No correlations were found</span>";
htmlString += "</td>";
htmlString += "</tr>";
}
//append to the <tbody> //append to the <tbody>
$('#student_activity_emotion_corr_tbody').append(htmlString); $('#student_activity_emotion_corr_tbody').append(htmlString);
...@@ -1293,6 +1301,7 @@ ...@@ -1293,6 +1301,7 @@
let htmlString = ""; let htmlString = "";
if (correlations.length !== 0) {
//create the html content for the activity correlation table //create the html content for the activity correlation table
for (let i = 0; i < correlations.length; i++) { for (let i = 0; i < correlations.length; i++) {
let corr = correlations[i]; let corr = correlations[i];
...@@ -1327,6 +1336,13 @@ ...@@ -1327,6 +1336,13 @@
htmlString += "</tr>"; htmlString += "</tr>";
} }
} else {
htmlString += "<tr>";
htmlString += "<td colspan='3'>";
htmlString += "<span class='font-italic'>No correlations were found</span>";
htmlString += "</td>";
htmlString += "</tr>";
}
//append to the <tbody> //append to the <tbody>
$('#student_activity_gaze_corr_tbody').append(htmlString); $('#student_activity_gaze_corr_tbody').append(htmlString);
...@@ -1346,6 +1362,7 @@ ...@@ -1346,6 +1362,7 @@
let htmlString = ""; let htmlString = "";
if (correlations.length !== 0) {
//create the html content for the activity correlation table //create the html content for the activity correlation table
for (let i = 0; i < correlations.length; i++) { for (let i = 0; i < correlations.length; i++) {
let corr = correlations[i]; let corr = correlations[i];
...@@ -1380,6 +1397,14 @@ ...@@ -1380,6 +1397,14 @@
htmlString += "</tr>"; htmlString += "</tr>";
} }
} else {
htmlString += "<tr>";
htmlString += "<td colspan='3'>";
htmlString += "<span class='font-italic'>No correlations were found</span>";
htmlString += "</td>";
htmlString += "</tr>";
}
//append to the <tbody> //append to the <tbody>
$('#student_emotion_gaze_corr_tbody').append(htmlString); $('#student_emotion_gaze_corr_tbody').append(htmlString);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment