Spaces:
Running
Running
Upload 10 files
Browse files- src/views/InstructorView.js +10 -1
src/views/InstructorView.js
CHANGED
|
@@ -726,11 +726,20 @@ export function setupInstructorEvents() {
|
|
| 726 |
|
| 727 |
// --- Transposed Heatmap Renderer ---
|
| 728 |
function renderTransposedHeatmap(users) {
|
|
|
|
|
|
|
| 729 |
const container = document.getElementById('heatmap-container');
|
| 730 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 731 |
|
| 732 |
// Make sure challenges are loaded (might be empty initially)
|
|
|
|
| 733 |
if (cachedChallenges.length === 0) {
|
|
|
|
| 734 |
container.innerHTML = '<div class="text-gray-500 text-center p-4">載入題目中...</div>';
|
| 735 |
return;
|
| 736 |
}
|
|
|
|
| 726 |
|
| 727 |
// --- Transposed Heatmap Renderer ---
|
| 728 |
function renderTransposedHeatmap(users) {
|
| 729 |
+
console.log("renderTransposedHeatmap called with users:", users.length);
|
| 730 |
+
|
| 731 |
const container = document.getElementById('heatmap-container');
|
| 732 |
+
console.log("heatmap-container element:", container);
|
| 733 |
+
|
| 734 |
+
if (!container) {
|
| 735 |
+
console.error("renderTransposedHeatmap: heatmap-container not found!");
|
| 736 |
+
return; // Might be hidden
|
| 737 |
+
}
|
| 738 |
|
| 739 |
// Make sure challenges are loaded (might be empty initially)
|
| 740 |
+
console.log("cachedChallenges length:", cachedChallenges.length);
|
| 741 |
if (cachedChallenges.length === 0) {
|
| 742 |
+
console.warn("renderTransposedHeatmap: No challenges loaded, showing loading message");
|
| 743 |
container.innerHTML = '<div class="text-gray-500 text-center p-4">載入題目中...</div>';
|
| 744 |
return;
|
| 745 |
}
|