A mobile-friendly attendance system for DPS Whitefield In-House students.
Teachers open a URL on their phone, mark absent students, and submit. The record updates instantly.
https://physics4noobs.github.io/Attendance/
Teacher opens URL on phone
↓
Selects batch → sees student list (all Present by default)
↓
Toggles absent students → hits Submit
↓
Browser sends data to Google Apps Script (Web App)
↓
Apps Script writes P/A into its own JSON data store (in Drive)
↓
Everyone's phone stays in sync via the same backend
There is no Google Sheet involved — attendance lives entirely in a JSON file that the Apps Script manages in its own Drive, not something anyone opens and edits by hand. If a spreadsheet view is ever needed again (e.g. to hand management a live report), that can be built as a one-off export — just ask.
| File | Purpose |
|---|---|
index.html |
The attendance webpage (what teachers see on their phone) |
Code.gs |
Google Apps Script — receives submissions and reads/writes the data store |
README.md |
This file |
| Item | Value |
|---|---|
| Apps Script Web App URL | https://script.google.com/macros/s/AKfycbxnF5JmMEb_fx9turFYNiRJNgN2mptZnR6bhRMQxriR5n9E8za5xbsdXK6ppxfVsXai/exec |
| GitHub Repo | https://github.com/physics4noobs/Attendance |
| Live Website | https://physics4noobs.github.io/Attendance/ |
The attendance data file itself lives in the Apps Script's Drive and doesn't
need a fixed ID checked into this repo — its ID is cached automatically the
first time the script runs (in Script Properties). Run logStoreInfo() from
the Apps Script editor any time to print a link to it (e.g. to download a
backup copy).
| Batch | STUDENTS key | Students |
|---|---|---|
| XI – Advance A | XI-Adv A |
35 |
| XI – Advance B | XI-Adv B |
27 |
| XI – Mains | XI-Mains |
26 |
| XI – NEET | XI-NEET |
25 |
| Grade X | Grade X |
6 |
| Grade IX | Grade IX |
18 |
The JSON file (one per academic year) looks like:
{
"XI-Adv A": {
"dates": ["02-Jun-2026", "03-Jun-2026", ...],
"students": { "Student Name": ["P", "A", ...], ... }
},
"XI-Adv B": { "dates": [...], "students": {...} },
...
"submitted": { "02-Jun-2026": ["XI-Adv A", "XI-NEET"], ... }
}Each student's record array is always the same length as that batch's
dates array — a new date column is appended (never inserted) whenever a
teacher submits for a date that doesn't exist yet, and resubmitting for the
same date overwrites that column instead of creating a new one.
- Open
index.html— find theSTUDENTSobject in the<script>section - Add the student name to the correct batch array
- Open
Code.gs— find the sameSTUDENTSobject and add the name there too - Push the updated
index.htmlto GitHub (see Deploying Changes below) - Re-deploy the Apps Script (see Re-deploying Apps Script below)
The student's attendance history starts blank going forward — there's nothing to touch in a spreadsheet.
Remove them from the STUDENTS object in both index.html and Code.gs,
then push and re-deploy. Their historical P/A record stays in the data
store (harmless, just no longer shown) unless you want it cleaned up.
- Move their name in
STUDENTSin bothindex.htmlandCode.gs - If you want their attendance history to move with them, that requires a small one-off script run from the Apps Script editor — ask for it rather than hand-editing the JSON file.
- Push and re-deploy
- Add the batch to the
STUDENTSobject in bothindex.htmlandCode.gs - Add a new batch card in the HTML (copy an existing card block)
- Push and re-deploy — the batch's entry in the data store is created automatically the first time attendance is submitted for it
- Fix it in
index.html→STUDENTSobject - Fix it in
Code.gs→STUDENTSobject - Push and re-deploy
Note: this makes their old attendance history "orphaned" under the old spelling in the data store, since lookups match by exact name. Ask if you want that history renamed over.
After editing index.html, run these commands in Terminal:
cd "/Users/sankaracharyadutta/Desktop/Teaching/DPS PROGRAM/Students & Attendance/attendance-system"
git add index.html
git commit -m "describe what you changed"
git pushThe live URL updates automatically within 1–2 minutes.
After editing Code.gs:
- Open script.google.com and open this project (or open it from the Apps Script editor you already have it in)
- Paste the updated
Code.gscontents - Click Deploy → Manage deployments
- Click the pencil ✏️ icon on the existing deployment
- Change version to New version
- Click Deploy
⚠️ Do NOT create a new deployment — always update the existing one, otherwise the URL inindex.htmlwill be wrong.
The webpage stores which batches have been submitted today in the browser's localStorage.
The key is dps_done_DD-Mon-YYYY (e.g. dps_done_02-Jun-2026).
Every new day the key changes, so all tick marks automatically reset.
On load, the page also asks the backend which batches have already submitted
today (syncSubmittedState()), so a teacher opening the app on a second
phone still sees the correct ticks.
When a teacher submits:
- The Apps Script looks for a date matching today's date in the batch's
dateslist - If it doesn't exist yet, it's appended as a new entry
- Every student's record array is written to at that same position
- If attendance is submitted twice for the same date, it overwrites the first entry (useful for corrections) — it does not create a duplicate date
There's currently no live spreadsheet view for management to check in on (that went away along with the Google Sheet). If a report or live dashboard is needed again, ask — it can be built as a one-off Sheet export from the data store, or a small read-only page, without going back to storing attendance in Sheets day-to-day.
2025–26. When the new year starts, either wipe the existing data file (run
a small reset script from the Apps Script editor) or let a fresh one get
created automatically — ask, since there's no SPREADSHEET_ID to swap out
anymore.