-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchecking_system_2_school.html
More file actions
384 lines (365 loc) · 24.3 KB
/
Copy pathchecking_system_2_school.html
File metadata and controls
384 lines (365 loc) · 24.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>School Overview · 4Set Checking System</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="assets/js/tailwind.config.js"></script>
<link rel="stylesheet" href="assets/css/theme_pantone_light_1.css" />
<link rel="stylesheet" href="assets/css/index.css" />
<link rel="stylesheet" href="assets/css/global.css" />
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono&family=Noto+Sans+TC&display=swap" rel="stylesheet" />
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.min.js"></script>
<style>
.status-circle {
width: 14px;
height: 14px;
border-radius: 9999px;
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
}
.status-circle::after {
content: '';
width: 6px;
height: 6px;
border-radius: 9999px;
background-color: rgba(255, 255, 255, 0.85);
}
.status-green { background-color: #22c55e; }
.status-yellow { background-color: #fbbf24; }
.status-red { background-color: #ef4444; }
.status-grey { background-color: #cbd5e1; }
</style>
</head>
<body class="min-h-screen hero-background">
<div class="relative overflow-hidden">
<!-- Animated Background Elements -->
<div id="background-circles"></div>
<div class="absolute inset-x-0 top-0 h-32 bg-gradient-to-b from-white/70 to-transparent"></div>
<header class="relative z-20 bg-white/80 backdrop-blur-md border-b border-[color:var(--border)] shadow-sm sticky top-0">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="flex items-center gap-3">
<a href="index.html" title="Return to 4Set Entry Point" class="p-2 rounded-full hover:bg-[color:var(--muted)] text-[color:var(--muted-foreground)] hover:text-[color:var(--primary)] transition-colors">
<i data-lucide="home" class="w-4 h-4"></i>
</a>
<button onclick="window.history.back()" class="hero-button secondary-button text-xs font-medium rounded-md px-3 py-1.5 inline-flex items-center gap-1.5">
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
<span>Back</span>
</button>
<nav class="breadcrumb-nav text-xs text-[color:var(--muted-foreground)] flex items-center gap-1.5 font-mono">
<a href="#" class="breadcrumb-district px-2 py-1 rounded bg-slate-100 text-slate-700 hover:bg-slate-200 transition-colors">—</a>
<i data-lucide="chevron-right" class="w-3 h-3 text-slate-400"></i>
<a href="#" class="breadcrumb-group px-2 py-1 rounded bg-slate-100 text-slate-700 hover:bg-slate-200 transition-colors">—</a>
<i data-lucide="chevron-right" class="w-3 h-3 text-slate-400"></i>
<span class="breadcrumb-school px-2 py-1 rounded bg-blue-50 text-blue-700 font-semibold">—</span>
</nav>
</div>
<div class="flex items-center gap-2">
<button id="validate-button" class="hero-button secondary-button text-xs font-medium rounded-md px-3 py-1.5 inline-flex items-center gap-1.5" title="Validate cache data vs display">
<i data-lucide="shield-check" class="w-3.5 h-3.5 flex-shrink-0"></i>
<span>Validate</span>
</button>
<button id="export-button" class="hero-button secondary-button text-xs font-medium rounded-md px-3 py-1.5 inline-flex items-center gap-1.5">
<i data-lucide="download" class="w-3.5 h-3.5 flex-shrink-0"></i>
<span>Export</span>
</button>
<a href="checking_system_home.html" class="text-sm text-[color:var(--primary)] hover:underline">New Search</a>
</div>
</div>
</div>
</header>
<main class="relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 space-y-4">
<!-- School Profile -->
<details class="entry-card border-l-4 border-l-[color:var(--primary)]">
<summary class="flex flex-col gap-3 md:flex-row md:items-center md:justify-between px-6 py-4 cursor-pointer list-none">
<div>
<h2 class="text-sm font-semibold text-[color:var(--foreground)] font-noto" id="school-name-chinese">Loading...</h2>
<p class="text-xs text-[color:var(--muted-foreground)]" id="school-name-english">Tap to expand school details</p>
</div>
<span class="text-[11px] text-[color:var(--muted-foreground)]">Last synced · Today</span>
</summary>
<div class="px-6 pb-4">
<div class="grid grid-cols-1 sm:grid-cols-3 xl:grid-cols-5 gap-2 text-xs">
<div class="border border-[color:var(--border)] rounded-md p-2.5 bg-[color:var(--muted)]/30">
<p class="text-[10px] uppercase text-[color:var(--muted-foreground)] tracking-wide">Group</p>
<p class="text-base font-semibold" id="school-group">—</p>
</div>
<div class="border border-[color:var(--border)] rounded-md p-2.5 bg-[color:var(--muted)]/30">
<p class="text-[10px] uppercase text-[color:var(--muted-foreground)] tracking-wide">District</p>
<p class="text-base font-semibold" id="school-district">—</p>
</div>
<div class="border border-[color:var(--border)] rounded-md p-2.5 bg-[color:var(--muted)]/30">
<p class="text-[10px] uppercase text-[color:var(--muted-foreground)] tracking-wide">School ID</p>
<p class="text-base font-mono font-semibold" id="school-id">—</p>
</div>
<div class="border border-[color:var(--border)] rounded-md p-2.5 bg-[color:var(--muted)]/30">
<p class="text-[10px] uppercase text-[color:var(--muted-foreground)] tracking-wide">Classes</p>
<p class="text-base font-semibold" id="total-classes">0</p>
</div>
<div class="border border-[color:var(--border)] rounded-md p-2.5 bg-[color:var(--muted)]/30">
<p class="text-[10px] uppercase text-[color:var(--muted-foreground)] tracking-wide">Students (with Core ID)</p>
<p class="text-base font-semibold" id="total-students">0</p>
</div>
</div>
</div>
</details>
<!-- School Metrics -->
<details class="entry-card border-l-4 border-l-[color:var(--secondary)]">
<summary class="flex items-center justify-between px-6 py-4 cursor-pointer list-none">
<h2 class="text-sm font-semibold text-[color:var(--foreground)]">School-level Task Status Overview</h2>
<span class="text-[11px] text-[color:var(--muted-foreground)]">Quick statistics</span>
</summary>
<div class="px-6 pb-4 grid grid-cols-2 sm:grid-cols-3 xl:grid-cols-5 gap-3">
<div class="bg-gradient-to-br from-white to-blue-50 rounded-lg border border-blue-200 px-4 py-3" title="Percentage of Set 1 tasks completed across all students in this school">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-blue-700">Set 1</span>
<span class="text-xs text-[color:var(--muted-foreground)]" id="set1-count">—</span>
</div>
<p class="text-2xl font-bold text-blue-900" id="set1-completion">—%</p>
</div>
<div class="bg-gradient-to-br from-white to-green-50 rounded-lg border border-green-200 px-4 py-3" title="Percentage of Set 2 tasks completed across all students in this school">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-green-700">Set 2</span>
<span class="text-xs text-[color:var(--muted-foreground)]" id="set2-count">—</span>
</div>
<p class="text-2xl font-bold text-green-900" id="set2-completion">—%</p>
</div>
<div class="bg-gradient-to-br from-white to-purple-50 rounded-lg border border-purple-200 px-4 py-3" title="Percentage of Set 3 tasks completed across all students in this school">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-purple-700">Set 3</span>
<span class="text-xs text-[color:var(--muted-foreground)]" id="set3-count">—</span>
</div>
<p class="text-2xl font-bold text-purple-900" id="set3-completion">—%</p>
</div>
<div class="bg-gradient-to-br from-white to-amber-50 rounded-lg border border-amber-200 px-4 py-3" title="Percentage of Set 4 tasks completed across all students in this school">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-amber-700">Set 4</span>
<span class="text-xs text-[color:var(--muted-foreground)]" id="set4-count">—</span>
</div>
<p class="text-2xl font-bold text-amber-900" id="set4-completion">—%</p>
</div>
<div class="bg-gradient-to-br from-white to-rose-50 rounded-lg border border-rose-200 px-4 py-3" title="Percentage of E-Prime tasks completed across all students in this school">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-rose-700">E-Prime</span>
<span class="text-xs text-[color:var(--muted-foreground)]" id="eprime-count">—</span>
</div>
<p class="text-2xl font-bold text-rose-900" id="eprime-completion">—%</p>
</div>
</div>
</details>
<!-- Classes List / Student List -->
<details class="entry-card border-l-4 border-l-[color:var(--accent)]">
<summary class="flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between px-6 py-4 cursor-pointer list-none border-b border-[color:var(--border)]">
<div>
<h2 class="text-sm font-semibold text-[color:var(--foreground)]" id="main-view-title">Classes in this School</h2>
<p class="text-xs text-[color:var(--muted-foreground)]" id="main-view-subtitle">Click to expand/collapse class list</p>
</div>
<div class="flex items-center gap-3">
<span class="text-[11px] text-[color:var(--muted-foreground)]">View Mode:</span>
<div class="inline-flex items-center bg-[color:var(--muted)]/30 rounded-lg p-1">
<button id="view-by-class-btn" class="px-3 py-1.5 text-xs font-medium rounded-md transition-colors bg-[color:var(--primary)] text-white shadow-sm">
By Class
</button>
<button id="view-by-student-btn" class="px-3 py-1.5 text-xs font-medium rounded-md transition-colors text-[color:var(--muted-foreground)] hover:bg-[color:var(--secondary)] hover:text-[color:var(--secondary-foreground)]">
By Student
</button>
</div>
</div>
</summary>
<!-- Legend and Filters -->
<div class="px-6 py-3 border-b border-[color:var(--border)] bg-[color:var(--muted)]/20 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
<div class="flex items-center gap-4 text-xs text-[color:var(--muted-foreground)]">
<!-- Legend -->
<div id="legend-container" class="flex items-center gap-4">
<span class="inline-flex items-center gap-1.5">
<span class="status-circle status-green"></span>
<span>Complete</span>
</span>
<span class="inline-flex items-center gap-1.5">
<span class="status-circle status-red"></span>
<span>Incomplete</span>
</span>
<span class="inline-flex items-center gap-1.5">
<span class="status-circle status-grey"></span>
<span>Not Started</span>
</span>
</div>
</div>
<div class="flex items-center gap-3">
<label for="data-view-filter" class="text-xs font-medium text-[color:var(--foreground)]">Filter:</label>
<select id="data-view-filter" class="px-2 py-1 border border-[color:var(--border)] rounded-md bg-white text-xs focus:outline-none focus:ring-2 focus:ring-[color:var(--primary)]">
<option value="all" selected>All</option>
<option value="with-data">With Data Only</option>
<option value="incomplete">Incomplete Only</option>
</select>
<!-- Student List View Mode Toggle (only shown when By Student is active) -->
<div id="student-view-mode-toggle" class="inline-flex items-center bg-white/50 rounded-lg p-1 border border-[color:var(--border)]" style="display: none;">
<button id="student-view-by-set-btn" class="px-3 py-1.5 text-xs font-medium rounded-md transition-colors bg-[color:var(--primary)] text-white shadow-sm">
By Set
</button>
<button id="student-view-by-task-btn" class="px-3 py-1.5 text-xs font-medium rounded-md transition-colors text-[color:var(--muted-foreground)] hover:bg-[color:var(--secondary)] hover:text-[color:var(--secondary-foreground)]">
By Task
</button>
</div>
<!-- By Missing toggle (only visible when By Task is active) -->
<div id="missing-view-toggle" class="inline-flex items-center bg-white/50 rounded-lg p-1 border border-[color:var(--border)]" style="display: none;">
<button id="student-view-by-missing-btn" class="px-3 py-1.5 text-xs font-medium rounded-md transition-colors text-[color:var(--muted-foreground)] hover:bg-amber-100 hover:text-amber-700">
By Missing
</button>
</div>
<button id="grade-filter-button" class="hero-button btn-secondary filter-button">
<i data-lucide="sliders-horizontal"></i>
<span>Filter by Grade</span>
</button>
</div>
</div>
<div class="px-6 pb-6 pt-3">
<div id="classes-table"></div>
<div id="students-table" style="display: none; overflow-x: auto;"></div>
</div>
</details>
</main>
</div>
<!-- Grade Filter Modal -->
<div id="grade-filter-modal" class="modal-backdrop hidden">
<div class="modal-panel max-w-md">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-semibold text-[color:var(--foreground)]">Filter by Grade</h3>
<button onclick="window.closeGradeFilterModal()" class="modal-close">
<i data-lucide="x" class="w-5 h-5"></i>
</button>
</div>
<div class="flex items-center justify-center gap-2 mb-4" id="grade-pills-container">
<button class="grade-pill px-3 py-2 rounded-full border-2 border-[color:var(--border)] bg-white text-sm font-medium hover:border-[color:var(--primary)] hover:bg-blue-50 transition-colors whitespace-nowrap" data-grade="all">
All Grades
</button>
<button class="grade-pill px-3 py-2 rounded-full border-2 border-[color:var(--border)] bg-white text-sm font-medium hover:border-[color:var(--primary)] hover:bg-blue-50 transition-colors whitespace-nowrap" data-grade="1">
K1
</button>
<button class="grade-pill px-3 py-2 rounded-full border-2 border-[color:var(--border)] bg-white text-sm font-medium hover:border-[color:var(--primary)] hover:bg-blue-50 transition-colors whitespace-nowrap" data-grade="2">
K2
</button>
<button class="grade-pill px-3 py-2 rounded-full border-2 border-[color:var(--border)] bg-white text-sm font-medium hover:border-[color:var(--primary)] hover:bg-blue-50 transition-colors whitespace-nowrap" data-grade="3">
K3
</button>
<button class="grade-pill px-3 py-2 rounded-full border-2 border-[color:var(--border)] bg-white text-sm font-medium hover:border-[color:var(--primary)] hover:bg-blue-50 transition-colors whitespace-nowrap" data-grade="0">
No Class
</button>
</div>
<button onclick="window.closeGradeFilterModal()" class="hero-button secondary-button text-sm font-medium rounded-md px-4 py-2 w-full">
Close
</button>
</div>
</div>
<!-- Student List Modal -->
<div id="student-list-modal" class="modal-backdrop hidden">
<div class="modal-panel max-w-2xl max-h-[80vh] overflow-hidden flex flex-col">
<div class="flex items-center justify-between mb-4">
<div>
<h3 class="text-lg font-semibold text-[color:var(--foreground)]">Students in Class</h3>
<p class="text-xs text-[color:var(--muted-foreground)] mt-1" id="modal-class-name">—</p>
</div>
<button onclick="window.closeStudentListModal()" class="modal-close">
<i data-lucide="x" class="w-5 h-5"></i>
</button>
</div>
<div class="flex-1 overflow-y-auto">
<div id="modal-students-list" class="space-y-2"></div>
</div>
<div class="pt-4 border-t border-[color:var(--border)] mt-4">
<button onclick="window.closeStudentListModal()" class="hero-button secondary-button text-sm font-medium rounded-md px-4 py-2 w-full">
Close
</button>
</div>
</div>
</div>
<!-- Outstanding Classes Modal -->
<div id="outstanding-classes-modal" class="modal-backdrop hidden">
<div class="modal-panel max-w-2xl max-h-[80vh] overflow-hidden flex flex-col">
<div class="flex items-center justify-between mb-4">
<div>
<h3 class="text-lg font-semibold text-[color:var(--foreground)]">Outstanding Sets</h3>
<p class="text-xs text-[color:var(--muted-foreground)] mt-1" id="modal-outstanding-class-name">—</p>
</div>
<button onclick="window.closeOutstandingClassesModal()" class="modal-close">
<i data-lucide="x" class="w-5 h-5"></i>
</button>
</div>
<div class="flex-1 overflow-y-auto">
<div id="modal-outstanding-list" class="space-y-3"></div>
</div>
<div class="pt-4 border-t border-[color:var(--border)] mt-4">
<button onclick="window.closeOutstandingClassesModal()" class="hero-button secondary-button text-sm font-medium rounded-md px-4 py-2 w-full">
Close
</button>
</div>
</div>
</div>
<!-- JavaScript Modules -->
<script src="https://cdn.jsdelivr.net/npm/localforage@1.10.0/dist/localforage.min.js"></script>
<script src="assets/js/encryption.js"></script>
<script src="assets/js/checking-system-data-loader.js"></script>
<script src="assets/js/checking-system-preferences.js"></script><!-- User preferences manager -->
<script src="assets/js/task-validator.js"></script>
<script src="assets/js/cache-validator.js"></script><!-- Cache validation utility -->
<script src="assets/js/jotform-cache.js"></script>
<script src="assets/js/export-utils.js"></script><!-- Shared export utilities -->
<script src="assets/js/checking-system-school-page.js"></script>
<script>
// Load background animation config and render
(async () => {
try {
const response = await fetch('config/checking_system_config.json');
const config = await response.json();
if (config.backgroundAnimation) {
const container = document.getElementById('background-circles');
if (!container) return;
let html = '<div class="fixed inset-0 pointer-events-none z-0">';
// Add circles
if (config.backgroundAnimation.circles) {
config.backgroundAnimation.circles.forEach(circle => {
const positionStyles = Object.entries(circle.position)
.map(([key, value]) => `${key}: ${value}`)
.join('; ');
const sizeStyles = Object.entries(circle.size)
.map(([key, value]) => `${key}: ${value}`)
.join('; ');
html += `<div class="absolute rounded-full border ${circle.animation}"
style="${positionStyles}; ${sizeStyles};
border-color: ${circle.color};
animation-duration: ${circle.animationDuration};
animation-delay: ${circle.animationDelay};"></div>`;
});
}
// Add blobs
if (config.backgroundAnimation.blobs) {
config.backgroundAnimation.blobs.forEach(blob => {
const positionStyles = Object.entries(blob.position)
.map(([key, value]) => `${key}: ${value}`)
.join('; ');
const sizeStyles = Object.entries(blob.size)
.map(([key, value]) => `${key}: ${value}`)
.join('; ');
html += `<div class="absolute rounded-full"
style="${positionStyles}; ${sizeStyles};
background-color: ${blob.color};
filter: blur(${blob.blur});"></div>`;
});
}
html += '</div>';
container.innerHTML = html;
}
} catch (error) {
console.warn('[Background] Failed to load animation config:', error);
}
})();
</script>
</body>
</html>