Yearly Plan → Weekly Lesson Plan
The admin draws the yearly map: for each class + subject, which chapter happens between which dates. The subject teacher takes that map and packs the actual modules into specific weeks, ticking each module off as they teach it. Finishing a chapter unlocks (and gates) a class test for that chapter, and the next chapter's weeks stay locked until that test is published.
At a glance
| Who can do this | Admin creates the yearly plan per class × subject (with chapter date windows) · Subject teacher adds and ticks weekly plans for the subjects they teach |
| Where it lives | Admin → School → Yearly Plans (/dashboard/school/:id/yearly-plans, see admin/yearly-plans) · Teacher → /dashboard/teaching-plan (sections list) → /dashboard/teaching-plan/sections/:sectionId/subjects (subjects within a section) → /dashboard/teaching-plan/sections/:sectionId/subjects/:subjectId/weekly (weekly view) → /dashboard/teaching-plan/sections/:sectionId/subjects/:subjectId/weekly/module-content/:contentId (AI-generated teaching content per module) |
| Triggers notifications? | No direct push, but completing a chapter prompts the teacher to set up the chapter's class test |
| Related features | Class Tests · Chapter Tests · Syllabus & Knowledge Base |
How it flows
Status lifecycle
The "lock" state for a teacher's weekly plan is computed live: a week is locked if any earlier week is completed AND its linked class test is missing or still in draft.
Step-by-step
1. Admin creates the yearly plan
- App / route: Admin → School Sidebar → Yearly Plans (
/dashboard/school/:id/yearly-plans). - Modal: Create Yearly Plan — three steps:
- Pick the class + subject combo (one yearly plan per
class × subject). - Pick the plan's overall start date and end date (the academic-year window for that subject).
- For each chapter in the subject's syllabus, set the chapter's start and end dates within that window. Chapters carry a
sequencefrom the syllabus.
- Pick the class + subject combo (one yearly plan per
- The list page shows every plan with
Class · Subject · Period · Status (Active / Completed) · Created. Admin can view, edit chapter dates inline, mark complete, or delete.
2. Teacher opens their weekly plan workspace
- App / route: Teacher → bottom nav → Lesson plan →
/dashboard/teaching-plan(sections you teach). - Pick a section → pick a subject → land on
/dashboard/teaching-plan/sections/:sectionId/subjects/:subjectId/weekly. - Header confirms
Class — Section · Subject syllabus tracking. Two tabs:- My plan — the editable weekly view (default).
- Yearly — read-only chapter timeline mirrored from the admin's yearly plan.
3. The Yearly tab (read-only mirror)
- Top card: a horizontal timeline with Start (circle) → progress fill (today indicator if active) → End (flag). Caption shows
Day N of M,Starts in X days, orEnded X days ago. A pill showsIn progress / Upcoming / Ended / Complete. - Below: an ordered list of chapters (sorted by
sequence). Each row:- Chapter index + name.
dd Mon – dd Mon yyyywindow.- Pill
Current(today inside window),Done(window passed), or no pill (upcoming).
- If the admin has not created a yearly plan for the subject yet, this tab shows: "No yearly plan set by admin for this subject yet."
4. The My plan tab — week strip and adding a plan
- A week-card up top with ‹ › chevrons and swipe-left/right gestures lets the teacher move week-to-week. The navigable range spans from the earliest existing weekly plan up to ~52 weeks in the future, always including today.
- Each shown week card lists weekly plans whose
[startDate, endDate]overlaps the visible week. - Tap + in the header → Create / edit weekly plan drawer. Pick a chapter (constrained to the admin's chapter window for this subject) and select which modules within that chapter belong to this week. Modules unselected here are not part of the week and don't show up as checkboxes.
5. Working a week — module-content view and checkboxes
- Each week card shows the chapter heading (or
Chapter A · +n chaptersif the week spans multiple), the date range, and below it a checklist of modules. - Tapping a module title opens the module-content drawer. If content exists, navigates to
/dashboard/teaching-plan/sections/:sectionId/subjects/:subjectId/weekly/module-content/:contentIdto view AI-generated lesson notes / steps. If no content exists, opens a generate sheet to author it. - Tapping the checkbox to the right marks the module as taught (
pending → completed). Recompute: when every module in the week iscompleted, the week itself flips tocompletedand the All done pill shows. - A revision week is tagged with a blue Revision pill instead of being tied to chapter progression.
6. Chapter completion → class test prompt
- The first time a week's last module is ticked AND the week has no class test linked AND the popup hasn't been shown for this week before, a modal appears:
Chapter Complete! Do you want to generate the class test for this chapter now?
- Yes, Set Up Test — creates a draft Class Test on the spot (
title: "Class Test Draft" · type: MCQ · maxMarks: 10) for this chapter, links it to the weekly plan, and makes the on-card "Class Test Draft" card pulse. The teacher can finish authoring the test now or later. - No, I'll do it later — closes the modal; the on-card "Class Test Draft" still appears, just without the pulse.
- The popup-shown flag is stored in
localStorageperweekIdso it doesn't nag the teacher repeatedly.
7. Class Test card — gating the next chapter
- Once a week is
completed, a card at the bottom of the week shows:- Amber
Class Test Draft— when no test exists yet, or test status isdraft. - Green
Class Test Ready— when the linked class test has any non-draft status (e.g.published,assigned).
- Amber
- Tapping the card creates a draft if needed, then routes to
/dashboard/class-tests/create?sectionId=&subjectId=&chapterId=so the teacher can author/publish the test. - Locking rule: any later week (chronologically) is locked as long as ANY earlier
completedweek has a missing test or a test still indraft. Locked weeks render with reduced opacity, a Locked pill, and disabled checkboxes; tapping a checkbox toasts "Complete the previous chapter's class test to unlock this chapter." - Already-saved module-content drawers remain viewable on locked weeks — only authoring/checking is blocked.
8. Connection to chapter tests
- Once a chapter is fully
doneacross all its weekly plans, the chapter's questions are eligible for the broader Chapter Tests flow (longer-form per-chapter assessment) for the section.
Edge cases & things to test
- No yearly plan: a teacher opens the weekly view for a subject the admin hasn't created a yearly plan for → Yearly tab shows the empty state but the My plan tab still works (teacher can plan ad hoc).
- Plan outside admin's chapter window: teacher tries to schedule a chapter into a week that falls outside the chapter's admin-defined
[startDate, endDate]→ drawer should warn or constrain the date pickers. - Edit chapter dates after weekly plans exist: admin moves a chapter window forward by 2 weeks → existing weekly plans referencing that chapter should still render; the Yearly tab updates immediately.
- Module added to syllabus mid-year: admin adds a new module to a chapter → it appears in the create-week drawer for new weeks; existing weekly plans don't auto-include it.
- Tick race: teacher rapidly taps the same checkbox several times → only the latest intent should win (server echo for stale toggles must be ignored).
- Lock chain: Week A is completed (no test), Week B is completed (no test), Week C is in progress → Week C must be locked. Publishing the test for Week A only does not unlock C until Week B's test is also out of draft.
- Revision weeks: a revision-tagged week should never block the next chapter, and should not trigger the Chapter Complete prompt.
- Multi-chapter week: a week spans two chapters' modules → the card heading shows
Chapter A · +1 chapterand the Class Test card uses the FIRST chapter for the chapter-id query param when the teacher taps "Set Up Test". - Past week: teacher swipes back to a week from last month → checkboxes still toggle (no read-only enforcement on history), but ticking should not retroactively re-show the Chapter Complete popup if it was already shown.
- Same module in two weeks: a module is split across two weeks (planned, then revision) → both checkboxes should be independently togglable; the chapter is "complete" only when both are checked.
- Admin marks plan completed: admin toggles plan to completed before chapters' end dates → Yearly tab shows the Complete pill and switches the timeline to grayed-out.
- Time-zone slippage: a teacher in a +5:30 zone ticks at 11:55 PM local → the week-completion calculation must use local day, not UTC, to decide which day's quest counts.
- Class test deletion: an admin or teacher deletes a published class test linked to a completed week → the next chapter must re-lock; the on-card chip flips back to
Class Test Draft(or shows missing). - Section assignment changes: subject teacher A is replaced by teacher B mid-year → teacher B opens the same
:sectionId/:subjectIdand sees A's prior weekly plans intact; ticks since handover are attributed to B. - Plan refresh after publish: publishing the class test from the linked create page should, on returning to the weekly view, immediately render the card as
Class Test Readywithout a manual reload.
Related
- Class Tests — the per-chapter test that gates progression
- Chapter Tests — broader chapter assessment built on top of completed weekly modules
- Syllabus & Knowledge Base — the source of chapters and modules used here