Skip to content

Commit 77c8a6f

Browse files
Tong so GV trong bang thong ke
1 parent 415cdb8 commit 77c8a6f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎public/admin.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,10 +2146,10 @@ async function loadUsageStats() {
21462146
const totSh = rows.reduce((s, r) => s + (r.shuffles || 0), 0);
21472147
const totMx = rows.reduce((s, r) => s + (r.matrices || 0), 0);
21482148
const totMB = fmtStorage(d.totalStorageBytes !== undefined ? d.totalStorageBytes : rows.reduce((s, r) => s + (r.storageBytes || 0), 0));
2149-
box.innerHTML = '<table><thead><tr><th>Giáo viên</th><th>Số đề đã đưa lên</th><th>Số lượt HS nộp</th><th>Số lượt trộn đề</th><th>Số ma trận đã tạo</th><th>Dung lượng đang lưu</th><th></th></tr></thead><tbody>' +
2149+
box.innerHTML = '<div style="overflow-x:auto"><table style="min-width:600px"><thead><tr><th>Giáo viên (' + rows.length + ')</th><th>Số đề đã đưa lên</th><th>Số lượt HS nộp</th><th>Số lượt trộn đề</th><th>Số ma trận đã tạo</th><th>Dung lượng đang lưu</th><th></th></tr></thead><tbody>' +
21502150
rows.map((r) => `<tr><td>${esc(r.displayName)} (${esc(r.username)})</td><td>${r.exams}</td><td>${r.submissions}</td><td>${r.shuffles || 0}</td><td>${r.matrices || 0}</td><td><strong>${fmtStorage(r.storageBytes)}</strong></td><td>${r.username === 'admin' ? '' : `<button class="btn secondary small" onclick="notifyTeacher('${r.id}', '${esc(r.displayName)}', '${fmtStorage(r.storageBytes)}')">📩 Gửi cảnh báo</button>`}</td></tr>`).join('') +
21512151
`<tr><td><strong>Tổng cộng</strong></td><td><strong>${totE}</strong></td><td><strong>${totS}</strong></td><td><strong>${totSh}</strong></td><td><strong>${totMx}</strong></td><td><strong>${totMB}</strong></td><td></td></tr>` +
2152-
'</tbody></table>' +
2152+
'</tbody></table></div>' +
21532153
'<p class="muted" style="margin-top:6px">Dung lượng gồm đề, hình trong đề, bài nộp và ma trận của từng giáo viên. Tổng kho dữ liệu đang dùng chung một mức 250 MB.</p>';
21542154
} catch (e) {
21552155
box.textContent = 'Không tải được thống kê: ' + e.message;

0 commit comments

Comments
 (0)