# Module Export Builder # Module Export Builder ## Purpose and navigation **Administration → Module Export Builder**, `/content-export-templates`. Create PDF and Excel (XLSX) layouts for particular educational modules. A template controls formatting, columns, additional data and sheets; it does not alter academic plans, workload or grades. Staff run everyday exports from the source module. Each card shows the module, number of templates and whether a default is configured. Open it to go to `/content-export-templates/:moduleKey`. The catalog is language-dependent. | Module | Template key | |---|---| | Student work | `student-work` | | Learning plan | `learning-plan` | | Workload | `workload` | | Lecturer workload | `lecturer-workload` | | Department workload | `department-workload` | | Lesson schedule | `lesson-schedule` | | Baseline data | `baseline-data` | | Academic process schedule | `process-schedule` | | Course assessment criteria | `course-assessment-criteria` | | Grade book | `grade-book` | Department and individual lecturer workload have independent template libraries despite sharing source data and a settings screen. ## List and creation Switch between list and cards. Each template shows name, ID, last update information, applicability, status, default/system badges, history, duplication and permitted actions. Three local applicability filters are available: all; universal (neither degree nor format); by entity (degree and/or format). The last includes only scoped templates: an unset part matches any value. Options come from the loaded templates. Clearing restores all. This filter does not affect actual export selection. Select Add or a starter: blank document or official form. Blank requires a name and opens the editor. Official duplicates an existing non-archived system template (default preferred); unavailable if none exists. Copy asks for a name and opens an independent draft. It is not default; recheck applicability because server duplication does not carry over degree and format. See [template editor](/en/docs/content-export-template-editor). ## Lifecycle | Status | Use | |---|---| | Draft (`draft`) | Preparation or checking; not available for ordinary export. | | Active (`active`) | Eligible for export; activation from the list validates and asks for confirmation. | | Archived (`archived`) | Excluded from normal export; not deleted. | Only an active template may be default. Making it default validates and requests confirmation; the previous default loses that flag. A default cannot be archived or deleted. Archive a non-default before deleting it, or use Archive and delete (two requests; a partial failure can leave it archived). Deletion is soft; the server supports restoring as a draft. Archiving is not the same as the deleted-items bin. ## Applicability and export selection The educational degree and learning format in template properties are **applicability, not role scopes**. Unset criteria are wildcards. For sources that declare record applicability (plan, baseline data, process schedule, lesson schedule, criteria, grade book), active forms are matched without an explicit choice: both fields > one > universal. Within the best specificity the default resolves ambiguity; otherwise a selection is needed. Explicit choices are checked for module and active status. The source export module setting `choose` lets users select (default); `default_only` hides selection and requires a designated default on the general resolution path. In default-only mode a submitted ID cannot override the module default. Record applicability is resolved before this general path in the server service, so test each operational scenario after changing modes. With ordinary mode and no implicit suitable template, the legacy export remains available. Explicit templates conflict with most legacy column/header/footer overrides (the system curriculum has a separate column exception). Student work selects its own template in the source; a mismatched ID is rejected. Selection settings do not grant access to records. ## Settings and libraries The module settings button opens `/content-export-templates/:moduleKey/settings`: header/footer tabs, usage counts and expandable linked templates, add, edit and delete (an in-use partial cannot be deleted). See [reusable headers and footers](/en/docs/content-export-partials). The separately controlled block library is available from its own button: [shared blocks](/en/docs/content-export-snippets). Before editing a shared object, check its usages. ## Permissions and example `ContentExportTemplatesTablePull` covers the catalog, forms, variables, history and preview; the same prefix with `CreateAction` covers creation/copy, `EditAction` modification, validation, status and default, and `DeleteAction` deletion. Settings use independent `ContentExportTemplateSettings` permissions; blocks use `ContentExportSnippets`. Template CRUD itself has no Faculty/Profession/Department scope; record preview and signatory candidate lookup use Faculty, Profession, Department according to the actual model's declared restrictions. Editor rights do not replace export rights in the source module. See [permissions](/en/docs/role-permissions). **Example.** Open Learning plan, duplicate the official form as “Bachelor — full-time”, set degree and format in the editor, configure the table and header, check PDF and XLSX with an accessible full-time plan, save and activate from the list. Do not make it default without checking other applicability combinations. Test the actual export from [learning plan details](/en/docs/learning-plan-details). ## Troubleshooting - No templates: clear the filter, check catalog loading and read permission. - Official starter unavailable: no eligible system starter; use blank or copy an existing form. - Cannot delete: switch the default if needed, then archive and confirm. - 409 conflict: reload the list and check the current version before repeating. - Wrong export layout: verify active status, record applicability, selection mode, source data and export settings. Do not publish an untested form. ## Verified source files - [container/index.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Administration/ContentExportTemplates/container/index.tsx) - [ModuleTemplates/index.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Administration/ContentExportTemplates/ModuleTemplates/index.tsx) - [ScopeFilter.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Administration/ContentExportTemplates/ModuleTemplates/ScopeFilter.tsx) - [StarterScenarios.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Administration/ContentExportTemplates/ModuleTemplates/StarterScenarios.tsx) - [Settings/index.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Administration/ContentExportTemplates/Settings/index.tsx) - [ContentExportModule.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/ContentExportTemplates/Enums/ContentExportModule.php) - [ContentExportTemplateService.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/ContentExportTemplates/Services/ContentExportTemplateService.php) - [ContentExportTemplateMode.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/ContentExportTemplates/Enums/ContentExportTemplateMode.php) - [api.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/ContentExportTemplates/routes/api.php) - [ContentExportService.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/ContentExport/Services/ContentExportService.php)