Spaces:
Running
Running
Upload 9 files
Browse files- src/views/InstructorView.js +4 -19
src/views/InstructorView.js
CHANGED
|
@@ -482,28 +482,13 @@ export function setupInstructorEvents() {
|
|
| 482 |
if (createBtn) {
|
| 483 |
// Dashboard Update Logic
|
| 484 |
const updateDashboard = (data) => {
|
| 485 |
-
const dashboardContent = document.getElementById('dashboard-content');
|
| 486 |
-
const heatmapBody = document.getElementById('heatmap-body');
|
| 487 |
-
const heatmapHeader = document.getElementById('heatmap-header');
|
| 488 |
-
|
| 489 |
const users = Array.isArray(data) ? data : (data?.users ? Object.values(data.users) : []);
|
| 490 |
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
return;
|
| 494 |
-
}
|
| 495 |
|
| 496 |
-
//
|
| 497 |
-
|
| 498 |
-
heatmapBody.innerHTML = '';
|
| 499 |
-
|
| 500 |
-
// This part needs real logic based on your data structure
|
| 501 |
-
// For now, let's just list users to prove it works
|
| 502 |
-
users.forEach(user => {
|
| 503 |
-
const tr = document.createElement('tr');
|
| 504 |
-
tr.innerHTML = `<td class="p-3 text-white">${user.nickname || 'Unknown'}</td>`;
|
| 505 |
-
heatmapBody.appendChild(tr);
|
| 506 |
-
});
|
| 507 |
}
|
| 508 |
|
| 509 |
// Create Room
|
|
|
|
| 482 |
if (createBtn) {
|
| 483 |
// Dashboard Update Logic
|
| 484 |
const updateDashboard = (data) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 485 |
const users = Array.isArray(data) ? data : (data?.users ? Object.values(data.users) : []);
|
| 486 |
|
| 487 |
+
// Update global state for modals/snapshot
|
| 488 |
+
currentStudents = users;
|
|
|
|
|
|
|
| 489 |
|
| 490 |
+
// Use the full heatmap renderer
|
| 491 |
+
renderTransposedHeatmap(users);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 492 |
}
|
| 493 |
|
| 494 |
// Create Room
|