Skip to content

Draft: T&A Export/Import Refactoring#11673

Open
lukas-heinrich wants to merge 43 commits into
ILIAS-eLearning:trunkfrom
lukas-heinrich:ta/12/abdanon-test-export-file
Open

Draft: T&A Export/Import Refactoring#11673
lukas-heinrich wants to merge 43 commits into
ILIAS-eLearning:trunkfrom
lukas-heinrich:ta/12/abdanon-test-export-file

Conversation

@lukas-heinrich

@lukas-heinrich lukas-heinrich commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Hi everyone,

this PR concerns the refactoring of export/import in the Test and TestQuestionPool components.

Objective

This refactoring reintegrates the test export into the intended export process of ILIAS. In detail, the PR pursues the following objectives:

  • The export works both for the current structure and after the migration to the answer types.
  • A clear separation of responsibilities makes it possible to add further export options and formats in the future without having to modify the entire export process.
  • The export of the Test component is migrated into the structure and interfaces of the global export component. This avoids the parallel infrastructure that previously existed.
  • After integration into the ILIAS core, the previous export format will continue to be supported for at least one major version. To this end, compatibility between the previous and the new format is established.

Core idea

The export process is divided into two clearly separated responsibilities:

  1. Gathering all content and metadata required for the export. This data initially exists in different forms (for example as data objects, nested array structures, or exports from other components) and is transferred into an independent, simplified structure that is decoupled from the specific export option.
  2. These data structures are then converted into the respective target format and persisted in one or more files.

This separation ensures that the export can be implemented independently of the output format, so that not every exportoption needs to build its own process.

The complete concept, including more detailed explanations, is attached here:
Konzeption_ Test Export.pdf

Note: This PR is currently still in an internal review process and is not yet final. Bug fixes and cleanup work will be added incrementally. We nevertheless welcome any comments and feedback.

This commit was created from various other commits across multiple branches. These were combined to simplify the merge process and to separate the foundation from the implementations in the Questions and Test components.
…etach calls

Stream::detach() nullifies uri and _mode, which made
ReattachableStream unable to reopen the resource afterwards.
Override detach() to store both values before the parent
clears them, so assertStreamAttached() can reliably reattach.
@lukas-heinrich lukas-heinrich changed the title Draft: T&A Abandon Test Export File Draft: T&A Export/Import Refactoring Jun 15, 2026
@thojou thojou self-assigned this Jun 15, 2026
@thojou thojou added improvement php Pull requests that update Php code labels Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants