Spaces:
Running
Running
Manual changes saved
Browse files- students-ate.html +4 -6
students-ate.html
CHANGED
|
@@ -141,7 +141,6 @@
|
|
| 141 |
<script>
|
| 142 |
// Dynamic student list from GitHub
|
| 143 |
let students = {};
|
| 144 |
-
let availableClasses = []; // Will be populated per form
|
| 145 |
|
| 146 |
async function loadStudentList() {
|
| 147 |
try {
|
|
@@ -166,12 +165,12 @@
|
|
| 166 |
students = {};
|
| 167 |
}
|
| 168 |
|
| 169 |
-
//
|
| 170 |
document.getElementById('class').disabled = true;
|
| 171 |
document.getElementById('class').innerHTML = '<option value="">Select Form First</option>';
|
| 172 |
}
|
| 173 |
|
| 174 |
-
//
|
| 175 |
function updateClassesForForm() {
|
| 176 |
const formVal = document.getElementById('form').value;
|
| 177 |
const classSelect = document.getElementById('class');
|
|
@@ -185,7 +184,6 @@
|
|
| 185 |
return;
|
| 186 |
}
|
| 187 |
|
| 188 |
-
// Find all classes that exist for this specific form
|
| 189 |
const classesForForm = new Set();
|
| 190 |
for (const key in students) {
|
| 191 |
const [cls, form] = key.split('-');
|
|
@@ -207,7 +205,7 @@
|
|
| 207 |
}
|
| 208 |
|
| 209 |
clearStudents();
|
| 210 |
-
loadStudents();
|
| 211 |
}
|
| 212 |
|
| 213 |
function loadStudents() {
|
|
@@ -247,7 +245,7 @@
|
|
| 247 |
|
| 248 |
window.addEventListener('load', loadStudentList);
|
| 249 |
|
| 250 |
-
// === Time & Meal Logic
|
| 251 |
function updateDateTime() {
|
| 252 |
const now = new Date();
|
| 253 |
document.getElementById('current-time').textContent = now.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
|
|
| 141 |
<script>
|
| 142 |
// Dynamic student list from GitHub
|
| 143 |
let students = {};
|
|
|
|
| 144 |
|
| 145 |
async function loadStudentList() {
|
| 146 |
try {
|
|
|
|
| 165 |
students = {};
|
| 166 |
}
|
| 167 |
|
| 168 |
+
// Reset class dropdown until form is selected
|
| 169 |
document.getElementById('class').disabled = true;
|
| 170 |
document.getElementById('class').innerHTML = '<option value="">Select Form First</option>';
|
| 171 |
}
|
| 172 |
|
| 173 |
+
// Update Class dropdown based on selected Form
|
| 174 |
function updateClassesForForm() {
|
| 175 |
const formVal = document.getElementById('form').value;
|
| 176 |
const classSelect = document.getElementById('class');
|
|
|
|
| 184 |
return;
|
| 185 |
}
|
| 186 |
|
|
|
|
| 187 |
const classesForForm = new Set();
|
| 188 |
for (const key in students) {
|
| 189 |
const [cls, form] = key.split('-');
|
|
|
|
| 205 |
}
|
| 206 |
|
| 207 |
clearStudents();
|
| 208 |
+
loadStudents();
|
| 209 |
}
|
| 210 |
|
| 211 |
function loadStudents() {
|
|
|
|
| 245 |
|
| 246 |
window.addEventListener('load', loadStudentList);
|
| 247 |
|
| 248 |
+
// === Time & Meal Logic ===
|
| 249 |
function updateDateTime() {
|
| 250 |
const now = new Date();
|
| 251 |
document.getElementById('current-time').textContent = now.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|