# Teaching hour allocation ## Open a workload Open **Learning Management → Workload** and select the department's record. The detail route is `/workload/item/:id`. Check the academic year, department, degree and learning format, which determine the source selection. See [creating a workload](/en/docs/workload). The detail page contains Lesson Allocation and [Teaching Load](/en/docs/workload-teaching-load). The latter assigns work according to norms; Lesson Allocation distributes subjects and their calculated hours. The selected tab is remembered in the browser session. ## Data and columns On Lesson Allocation, find the subject using search and the course, semester, profession and other available filters. Rows are grouped by semester. Expand a subject to inspect and assign educators. You can expand or collapse all rows. | Column block | Meaning | | --- | --- | | Subject and profession | Linked learning-plan rows, including constituent groups for united subjects. | | Students from baseline / distributed | Planned count and count from enrollment or distribution; the two can differ. | | Educational units | Quantities of streams, groups and subgroups or equivalents from baseline or special-group configuration. | | Teaching formats | Plan hours and weekly values, calculated hours for allocation. | | Assessment types, standards, components | Values calculated under current rules and learning-plan components. | | Totals | Hours and allocation result. Check which unit and teaching format each row represents. | ## Student counts and group types - Ordinary subject: planned values come from [baseline data](/en/docs/baseline-data-details) for the year, semester, profession and course. The actual overall count is based on student enrollment. Distribution by ordinary unit number uses general academic group membership, while students without group assignments can still contribute to the overall count. - [Elective subject](/en/docs/elective-subjects): the system considers students selecting the particular subject and subject-specific group assignments. Zero selections is a meaningful count for a configured elective. Custom groups use their own instance numbers. - [United subject](/en/docs/united-lessons): the count takes account of the category, constituent academic groups and distribution into named groups and instances. Correct composition in the source united subject. - [Virtual groups](/en/docs/virtual-group-attachments): educator rows refer to virtual groups, their instance numbers and eligible teaching formats. A valid virtual attachment cannot be replaced by an ordinary academic unit. See [virtual group student distribution](/en/docs/virtual-group-students). The header’s baseline count sums constituent group counts for united subjects (elective blocks take precedence over ordinary baseline blocks), uses the saved elective block count for an individual elective, otherwise the ordinary baseline. For new ordinary rows, autofill first checks a manual source value and then the actual group number. A configured source with no assignment gives zero. For an unconfigured source, the next choices are exact general-unit membership and then evenly split actual or baseline totals (for example, 10 students across three units gives 4, 3, 3). Configured source counts, including manual overrides, refer to the specific group number. An explicitly entered zero remains meaningful. For unconfigured sources the UI may estimate values for new rows; these are estimates and should be checked. An ordinary row's student count can be editable. Where a special source determines the count, correct it in the source module, reload the workload and verify calculation. ## Assign an educator 1. Expand the subject or select Assign. Depending on its configuration, prepared empty rows represent educational units, virtual groups or named groups. 2. Choose an educator from the available department staff for the workload year, the educational unit and its instance number. Special groups use their own number, subject to the configured group count. 3. Fill editable student count and allocated hours. Each saved row supports at most one teaching format. The same unit may have separate rows for different teaching formats. Assessment, coefficient and component hours may also be entered. If teaching language is enabled, choose the language; an empty language means the institution's default teaching language. 4. Save the row or use Save all. New rows require an educator, a unit or special-group association, and at least one positive allocated value. Check field errors and inspect saved assignments after reloading. **Example.** Computer Programming, course year 2, has two practical groups. Assign educator A to group 1 and educator B to group 2. Enter each group's number, student count and practical work hours. If A also teaches lectures, create a separate row for the lecture with the appropriate educational unit. Save and compare the sums with calculated hours. Unassign deletes the educator's assignment while the source subject stays in the workload. Edit an existing row to change staff or hours. If source learning-plan hours are wrong, correct the learning plan and review [recalculation](/en/docs/workload-recalculation). ## Distribution modes and manual rows The detail settings provide automatic filling modes for new rows. Saved values are not automatically redistributed. Existing saved hours and manually changed draft values are subtracted from the calculated total, and the positive remainder is allocated. | Mode | Behavior | | --- | --- | | none | Automatic distribution disabled. | | max_to_one | The first eligible new row receives the remainder; others receive zero. | | even | The remainder is distributed evenly among eligible rows using the field's precision. | For example, with 10 assessment hours and 4 already saved, the remaining 6 can be filled as 6 and 0 in max_to_one, or 3 and 3 in even. Changing mode can redistribute manually filled unsaved values. Check the fields before saving. Weekly teaching values are matched to eligible formats/units. The `department_workload_manual_rows_enabled` setting disables automatic blank-row creation for ordinary units. When enabled, add assignment rows manually. Saved assignments remain, and special-group rows retain their source configuration. See [workload settings](/en/docs/workload-settings). Column orientation changes the table layout. ## Access, locking and export The page route belongs to `workload`; assignment actions belong to `wl-lesson-allocation`. Workload, assignment and document-export routes support the `department` scope based on the workload's department. | Operation | Required permissions | | --- | --- | | Open record | `employee-workloads.show`; navigation from the list checks at least one of `educator-workloads.index` or `employee-workload-norms.index`. | | Read allocation | `educator-workloads.index`; the LessonAllocationPull group also requests reference data for formats, assessment types, educational units and their settings, calculation rules and employees. | | Assign/edit | `educator-workloads.store`, `educator-workloads.update` respectively (UI action visibility checks either). | | Unassign | `educator-workloads.destroy` | | Save multiple rows | `educator-workloads.bulk` is bound to `educator-workloads.index`; the server checks row action permissions. | | Manage settings | `workload.settings` | | Export active tab | `employee-workloads.export`; column catalog is bound to it. | Approval status and, when available, change history are displayed. A content lock prevents assignment changes; server operations enforce the lock. Special content-edit access granted by the workflow is also taken into account. The record export follows the currently active tab. Open the required tab, select document parameters and download the result. For row errors compare workload year, department, source subjects, teaching format, group student count, hour totals, permissions and approval lock. ## Implementation references - [WorkloadItem.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/LearningManagement/Workload/components/WorkloadItem/App/WorkloadItem.tsx) - [WorkloadItemPages.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/LearningManagement/Workload/components/WorkloadItem/WorkloadItemPages/tabPages/WorkloadItemPages.tsx) - [LessonAllocationTable.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/LearningManagement/Workload/components/WorkloadItem/WorkloadItemPages/LessonAllocation/components/LessonAllocationTable/App/LessonAllocationTable.tsx) - [WorkloadEducation.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/LearningManagement/Workload/components/WorkloadItem/WorkloadItemPages/LessonAllocation/components/LessonAllocationTable/components/WorkloadEducation/App/WorkloadEducation.tsx) - [getManualStudentCount.ts](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/LearningManagement/Workload/components/WorkloadItem/WorkloadItemPages/LessonAllocation/components/LessonAllocationTable/utils/getManualStudentCount.ts) - [StudentCountCell.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/LearningManagement/Workload/components/WorkloadItem/WorkloadItemPages/LessonAllocation/components/LessonAllocationTable/columns/components/StudentCountCell.tsx) - [useDepartmentWorkloadManualRows.ts](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/LearningManagement/Workload/hooks/useDepartmentWorkloadManualRows.ts) - [useWorkloadDistributionMode.ts](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/LearningManagement/Workload/hooks/useWorkloadDistributionMode.ts) - [permissionActionMap.json](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/public/permissionActionMap.json) - [api.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/EmployeeWorkload/routes/api.php) - [api.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/EducatorWorkload/routes/api.php) - [EducatorWorkloadRequest.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/EducatorWorkload/Http/Requests/EducatorWorkloadRequest.php) - [WorkloadStudentCountService.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/EmployeeWorkload/Services/WorkloadStudentCountService.php) - [WorkloadSubjectCalculationService.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/WorkloadSubject/Services/WorkloadSubjectCalculationService.php) - [api.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/ContentExport/routes/api.php) - [getStudentCount.ts](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/LearningManagement/Workload/components/WorkloadItem/WorkloadItemPages/LessonAllocation/components/LessonAllocationTable/utils/getStudentCount.ts)