Class 9 Homework Dashboard
An online dashboard designed for classmates to view and record homeworks, based on PHP.
Independent Project
Links
Class 9 Homework Dashboard (hw9.x-way.work) is a class homework website based on PHP and MySQL, developed for Class 9, Grade 2023, RDFZ (Renmin University Affiliated High School). It aims to move "what homework is assigned today, when it is due, and who hasn't submitted it yet" from the blackboard and group chats into one place where it can be queried, counted, and reviewed.
The most important design philosophy of the project is to abstract each homework assignment as a task with a start time and an end time, rather than an online notepad organized by date columns. Each assignment has attributes such as subject, body text, assignment date, due date, estimated time required, and whether submission is required; the page "projects" these tasks by date, so a "week-long assignment" no longer depends on the subject representative copying it every day, but instead appears within its valid period until the due date. By contrast, as far as I know, students from another school once made a homework board for their own class organized by date columns, placing each day's homework in a text box, but it was more like moving the blackboard directly onto the Internet; Class 9 Homework Dashboard, however, chooses to sacrifice some freedom of expression in exchange for structured querying, registration, and statistics.
This design improved the efficiency of homework recording and viewing within the class, effectively solving these problems of the traditional blackboard homework recording method:
- The blackboard had to be erased every day, which was very inconvenient.
- For homework assigned at the end of the school day, if no one took a photo and sent it to the group chat, some classmates would not have time to see it.
- It was difficult to represent assignments lasting multiple days well, and it was easy to completely forget that an assignment left last week was to be collected tomorrow.
The platform went online in December 2023 (first semester of senior year 1). It was deployed on an Alibaba Cloud ECS (1 core, 2 GB, promotional price 99 yuan/year, exactly covering the period until the college entrance examination), and Wang Chujun wrote a Tampermonkey automatic login script, greatly improving convenience of use.
As of the June 2026 college entrance examination, the homework board had cumulatively recorded 2,702 assignments. All 45 students in the class and subject representatives from each subject used it to check homework, assign homework, and register submission status - it has indeed become an important tool indispensable to the daily life of Class 9 students.
Core Features of the Project
Class 9 Homework Dashboard starts from the core function of recording homework and, using the convenience of the website and the user ecosystem, continuously expands its features, gradually developing into a lightweight platform carrying class culture.
(1) Homework Recording Features
| Feature Module | Description |
|---|---|
| Homework Board (by day) | Lists only homework "still within the valid period" (assignment date ≤ current day < due date); supports paging forward and backward, date jumping, hiding subjects not taken according to elective subject combinations, and viewing only homework due the next day; due dates are displayed as "today/tomorrow/this Friday" |
| Homework History | Search any start and end interval, filter by subject, retain id, assignment date, due date, and estimated time required |
| Homework Registration | Set one of four states for each assignment and each student: not submitted/late/submitted/on leave; supports writing batch commands; a single-person edit lock for the same assignment |
| Homework Statistics | Displays a "student × assignment" matrix for weekly/monthly/custom intervals, filters by subject and elective subjects, and colors by tiers of missing-submission counts |
| Homework Collection Board | Lists the homework to be collected that morning by due date, and states which row to submit to and when to collect it, making it convenient to open and display on a large screen every morning |
| Homework Load Estimation | Sums after flattening by duration days, giving comments in tiers such as "very little/moderate/a bit heavy/piled up like mountains." This feature later led to the Class 9 Homework Dashboard's per-semester homework load statistics charts (see the gallery for details). |
| Add and Edit | Uses CKEditor to support rich text; quick-input entries organized by subject ("workbook," "cloze," "industrial process," etc.); linked assignment date and due date |
| Special Entries | Announcements, non-elective politics, "placebos," college entrance examination blessings, etc., reusing the same editing and display logic in the form of "homework" |
(2) Cultural Nature
Beyond being a tool, the homework board gradually came to carry things of the class itself.
| Feature Module | Description |
|---|---|
| Announcements | Pinned as independent cards, with a deadline, and editable body text |
| Placebo | A special homework for which text can be written and a negative homework load can also be set, causing the displayed total homework load to decrease accordingly, as an "emotional buffer" |
| College Entrance Examination Blessings | A type added in the later stage of senior year 3; classmates can write what they want to say as if assigning homework |
| Extreme Leaderboard | An assignment fixed at id=934, whose content can be changed at any time, mainly responsible for recording the leaderboard of teachers' and students' overtime/class-delaying and lateness durations |
| Birthdays and Exams | Built-in birthdays of 9 teachers and all classmates in the class, with automatic blessings appearing on the day; also a college entrance examination countdown and the next exam |
| Random Picker | A classroom roll-call device, 45 students + 4 subject teachers, including real human voice, supporting avoidance of repetition, seating rounds, and leave status |
| Class Song and Sheet Music | Uses PDF.js to embed sheet music such as "Nine Heavens (Class 9 Class Song)," "I Believe (Choral Festival repertoire)," and "Waiting (Choral Festival repertoire)" as a class music archive |
| Break-time Game Pages | 2048, guess the element, guess the lyrics, AI couplets, etc.; some entrances have already been hidden |
Technical Details of the Engineering Part
(1) Framework-free Page Controllers and Templates
The project does not use any framework or routing system. More than twenty scripts in the root directory, such as index.php, hw_list.php, hw_reg.php, and hw_stat.php, each independently complete authentication and parameter fetching and querying, and then wrap the templates under view/ into view/main_template.php; the latter uniformly provides the top bar, sidebar, light/dark themes, footer filing information, and global scripts. Common logic is split into common/: init.php is responsible for time zone and database connection, function.php contains date formatting, input filtering, pagination, and rate limiting, validate.php contains two levels of passwords, and visitor_recorder.php is responsible for access recording. SQL is written directly in the pages as mysqli prepared statements, while views directly consume variables that controllers put into the global scope.
The advantage of doing this is that deployment is extremely simple and changes are extremely convenient, suitable for rapid iteration and adding new features; the cost is that pages and data access are highly coupled, and the same query appears repeatedly in multiple files.
(2) Data Model: Treating Homework as Tasks
Core tables:
| Table Name | Fields |
|---|---|
homework_list |
id, subject, content, startdate, duedate, submit_type, hwamount, inc_stat, tag |
homework_stat |
hw_id, stud_id, hw_state, missing_count |
accounts |
id, username, optional_subj |
action_log |
— |
validation_questions |
— |
The homework board's ability to register "cross-day" homework is mainly reflected in the core SQL query:
startdate <= current day AND duedate > current day
An assignment remains in the list from the day it is assigned until it exits on the due date.
Subjects are integer codes: 1 to 9 correspond to Chinese through History, 10 is non-elective politics, 11 is announcements, 13 is placebos, 14 is college entrance examination blessings, and 12 is an unused placeholder. Putting everything into one homework_list table allows announcements, placebos, blessings, and other "non-homework" items to reuse the same editing, due-date, and display logic—this is the most practical and also the most makeshift decision in this project.
(3) Homework Load Calculation
Homework load is calculated by flattening according to duration days (for each assignment, take homework load / duration days and then sum). Thus, an assignment "to be completed within one week, reference value 120 minutes" counts as only about 17 minutes per day. The total is divided into tiers at 120, 150, 220, 260, 300, 320, 350, and 380 minutes, displayed with comments such as "very little," "moderate," "a bit heavy," and "piled up like mountains," and the page clearly states "this value is for reference only."
Easter egg: If the total is exactly 114514 (a certain meme), the page will prompt "you must be doing this on purpose"; if it falls near this value, it will tell you how much to add to or subtract from which assignment to reach this number.
(4) Batch Registration: A Simple Command Language Convenient for Subject Representatives
The registration page is a table of 45 rows × 4 states, and to keep subject representatives from clicking 45 times, the page provides a minimal command language:
s 1-8,10-16,27 # set these people to submitted
s all # set the whole class to submitted
n 31-42,44 # set these people to not submitted
lt 24 # set person 24 to late
ab 16-17 # set persons 16 and 17 to on leave
Later, to facilitate merging with subject representatives' paper missing-count tables, a new set of commands was added to the homework statistics page, supporting "puppet homework":
alter hw <id> <state> <target>
alter hwstate <id> <state>
addpuppet <subject> <date>
deletepuppet <id>
alter puppet <id>
set <target> to <count>
alter puppet <id> fset
Puppet homework is a fake assignment with an empty content line. It does not appear in the homework list and is only used to store the "missing count" of a subject over a period of time. The count is placed in homework_stat.missing_count, separate from the hw_state of ordinary homework. In this way, when subject representatives merge records from paper tables into the electronic table, they do not need to register item by item again for statistics.
(5) Account-free Design
This is a highly special aspect of the website's design, and also the optimal choice made in light of the class situation and the software's usage scenario. This website has no registration and no accounts. Entering the site only requires entering the class's unified password to view, add, and edit all homework. For the two somewhat sensitive operations of deleting homework and registering homework, an additional administrator password is required to obtain administrator privileges. To prevent brute-force password attacks, password entry allows at most 10 attempts every 5 minutes; otherwise, the IP address will be banned for 10 minutes. This means that everyone who logs into the system has permission to anonymously edit homework content on the website, like a shared document. However, as a fallback, all operation content on this website is recorded in the backend in the form of IP addresses.
The reason the website is designed this way is that it faces a small class with a high degree of internal trust. Based on trust in all internal users, after simple experimentation I believed there was no need to design an account and authentication system; it was only necessary to simply confirm that the person logging in was one of the class's own people. At the same time, it is also more convenient to use on the classroom large screen. In the actual two and a half years of use, no malicious editing, malicious addition, or malicious deletion of homework was encountered. The website relied on everyone's conscientiousness and ran very well. At the same time, thanks to this collective conscientiousness of users, the website's authentication system could be simplified to the greatest extent, giving users a greater degree of freedom (for example, if the subject representative forgets to add homework today, any classmate can help add it).





