# Virtual group catalog ## When to create a template Open **Learning Management → Virtual groups** (`/virtual-groups`). The Virtual groups tab holds the shared catalog. If several subjects have two lecture streams and four practical subgroups, define the arrangement once. Each subject then needs its own [attachment](/en/docs/virtual-group-attachments) and [student assignments](/en/docs/virtual-group-students). ## Fill in the template 1. Select **Create virtual group**. Enter a descriptive name such as “Lectures and practicals” in at least one language. 2. Add a unit called “Stream”. Enter **2** for the count, **60** for capacity per instance and select the Lecture teaching type. 3. Add a “Subgroup” unit. Set its count to **4**, capacity to **30**, and teaching type to Practical. Within this structure, a teaching type can belong to only one unit. 4. Optionally enter a translated name and a calculation headcount for individual numbers. For subgroup 1, for example, enter “Morning” and **24**. 5. Save. Search the catalog by template or unit name. Check the units and the number of linked subjects. A newly created template has zero linked subjects. ## Read the fields | Field | Effect | | --- | --- | | Count | Determines the available instance numbers. With count 2, a student can take number 1 or 2 in this unit. | | Capacity | Limits actual assignments separately for each number. An empty capacity on the template leaves the unit without a limit. | | Calculation headcount | Supplies an initial value for workload calculations for one number. Zero is an explicit value. Entering a headcount does not enroll students. | | Instance name | Appears when a translation exists for the interface language. A new instance without a translation uses the unit label with a number when there are multiple instances. | ## Access and changes to templates in use The catalog is shared. Its routes have no faculty or profession scope of their own. Viewing requires `virtual-groups`. Creating, editing and deleting require the corresponding `virtual-groups-manage` actions. Buttons depend on the individual action grants. The teaching-type selector reads the list through `teaching-types.index`. Check the linked-subject count before changing a template. Reducing the count validates numbers already used by assignments, workload rows, bulletins and schedules. Capacity must accommodate the actual membership of the fullest instance. An attached template cannot be deleted. To change a single subject, edit [its attachment](/en/docs/virtual-group-attachments). ## Implementation references - `front/src/admin/src/pages/LearningManagement/VirtualGroups/index.tsx` - `front/src/admin/src/pages/LearningManagement/VirtualGroups/GroupFieldsEditor.tsx` - [UpdateVirtualGroupDivisionRequest.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/VirtualGroup/Http/Requests/UpdateVirtualGroupDivisionRequest.php) - [VirtualGroupService.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/VirtualGroup/Services/VirtualGroupService.php) - [api.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/VirtualGroup/routes/api.php)