# Lesson schedule editor ## Workspace Open a record from the [schedule list](/en/docs/lesson-schedules) (`/lesson-schedules/:id`). Rows show teacher, subject/source, educational unit and workload value, and student count. Columns represent the configured weekdays and academic hours for the context. Educational-unit colors come from academic structure settings; the filter shows all or selected weekdays without changing saved data. Narrow screens use cards instead of the wide grid. Select the empty intersection of a row and time slot to create a lesson. An occupied cell displays the classroom or an online indication and opens details and edit/delete actions. Locked content or deleted historical rows cannot be changed through these actions. ## Configure a lesson Choose the row, weekday and slot, such as a programming lecture on Tuesday during the second period. Complete the form: | Field | Rule | |---|---| | Schedule type | Required: Unified (weekly), Counter or Announcer (every other week) | | Online | Marks a remote lesson; removes the classroom requirement | | Branch, building, orientation | Classroom filters; changing a filter clears an incompatible selection | | Classroom | Required for an on-site lesson if the module setting is enabled; deleted classrooms cannot be selected | | Lesson link | Optional URL; if entered, validated for URL format in the UI and active_url on the server | | Period | Optional start and end for this particular slot; if one bound is set, enter the other | Classroom information includes capacity and, with the necessary permissions, an equipment link. The capacity is displayed for the operator to review; displaying it does not automatically distribute students by room size. Online and URL are separate fields: a link alone does not replace the explicit type selection in the current form. ## How dates are generated Select Preview. The server finds the [academic period](/en/docs/academic-period-details) for the profession and schedule context. Individual dates take precedence over defaults. If dates are missing, generation is blocked and a setup link is offered to users with the necessary period access. United lessons check every participating context: if start or end dates differ, first align them. The warning lists missing or mismatched periods. Effective bounds are the intersection of the academic period and optional range in the lesson form. Unified lessons repeat every seven days; Counter and Announcer lessons repeat every 14 days, offset by one week according to the academic period's starting type. The weekday is located relative to the period start. The academic calendar can reschedule a class to its configured target date; non-working days and moves outside the effective range are not generated. Narrower lesson dates restrict generation without changing the alternating-week phase. For example, with the period starting on 07 Sep 2026 as Counter, a Unified Tuesday lesson occurs on 08, 15 and 22 Sep; Counter on 08 and 22 Sep; Announcer on 15 and 29 Sep, assuming no holidays, reschedules or conflicts. A slot range of 21 Sep–31 Oct removes the first two Unified occurrences but retains the alternating-week phase. ## Preview and correct Preview presents a month calendar and occurrence list. Counts distinguish: - **Create** — dates eligible for creation in the journal. - **Existing** — saved days of the lesson being edited without blocking marks. - **Conflict** — occupied teacher or classroom, unavailable teacher by weekday/hour, or restricted branch/building. - **Reserved** — collisions with a pending schedule-change request under reservation policy. - **Locked** — confirmed days or days with grades; normal recalculation preserves them. - **Skipped** — non-working dates, dates outside the period or explicitly excluded. Choose a month and review problematic dates. Preview actions allow adding a date within the bounds, moving or excluding an individual unlocked occurrence, and restoring an exclusion. Changing overrides triggers a fresh preview against current calendars and conflicts. Moving outside the bounds is not supported in this generation flow; revisit the period settings first. Locked dates cannot be moved or excluded through the generator. Review the counts and save. Saving requires an up-to-date preview: if another operator occupies the slot or relevant data changes, the application may report an outdated preview and return a new result. Review the new result before trying again. ## After saving The lesson is stored as a timetable rule, with its eligible dates becoming days in the [grade book](/en/docs/grade-book). Conflicting, reserved and skipped dates are not created. Editing deletes dates no longer in the plan only where they are unconfirmed and have no grades; confirmed or graded days remain. United lessons reference the shared workload assignment and appear in participating schedules. Open the cell and go through preview again to correct its type, location or date range. To change one date after approval, use the designated [grade-book schedule-change workflow](/en/docs/gradebook-schedule-change) where applicable and available to your role. ## Permissions and troubleshooting Actions belong to `lesson-schedule-manage`: `employee-schedules.index/store/update/destroy`; details and previews are bound to corresponding read/create/edit permissions. Scopes are the parent schedule's faculty and profession. Synchronization is `schedules.sync` under `lesson-schedule`. The server blocks structural changes while an approval lock is active. - Teacher row missing: check workload and synchronization. - No matching period: configure the exact context. - All dates skipped: check bounds, holidays, week phase and exclusions. - Cannot select a classroom: check filters, the directory and permissions; compare capacity with group size. - Persistent conflicts: choose a free slot or room, or resolve availability restrictions. See [schedule review](/en/docs/lesson-schedule-view). ## Implementation references - [LessonScheduleItem.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AcademicTimetableManagement/LessonSchedule/components/LessonScheduleItem/App/LessonScheduleItem.tsx) - [index.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AcademicTimetableManagement/LessonSchedule/components/LessonScheduleItem/components/LessonScheduleItemTable/App/index.tsx) - [index.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AcademicTimetableManagement/LessonSchedule/components/LessonScheduleItem/components/LessonScheduleItemTable/components/columns/index.tsx) - [index.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AcademicTimetableManagement/LessonSchedule/components/LessonScheduleItem/components/LessonScheduleItemTable/components/EmployScheduled/index.tsx) - [index.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AcademicTimetableManagement/LessonSchedule/components/LessonScheduleItem/components/LessonScheduleItemTable/components/AddLessonSchedulesModalContent/index.tsx) - [previewUtils.ts](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AcademicTimetableManagement/LessonSchedule/components/LessonScheduleItem/components/LessonScheduleItemTable/components/AddLessonSchedulesModalContent/previewUtils.ts) - [timetableUtils.ts](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AcademicTimetableManagement/LessonSchedule/components/LessonScheduleItem/components/LessonScheduleItemTable/components/AddLessonSchedulesModalContent/timetableUtils.ts) - [api.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/LessonSchedule/routes/api.php) - [StoreEmployeeScheduleRequest.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/LessonSchedule/Http/Requests/StoreEmployeeScheduleRequest.php) - [PreviewEmployeeScheduleRequest.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/LessonSchedule/Http/Requests/PreviewEmployeeScheduleRequest.php) - [ValidatesScheduleLocation.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/LessonSchedule/Http/Requests/ValidatesScheduleLocation.php) - [EmployeeScheduleOccurrencePlanner.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/LessonSchedule/Services/EmployeeScheduleOccurrencePlanner.php) - [EmployeeScheduleService.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/LessonSchedule/Services/EmployeeScheduleService.php) - [UnitedLessonTimetableResolver.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/LessonSchedule/Services/UnitedLessonTimetableResolver.php) - [ScheduleTypes.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/database/seeders/ScheduleTypes.php)