ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

Test/TestQuestionPool: LOM as tail dependency in export

Open schmitz-ilias opened this issue 6 months ago • 1 comments

This PR replaces almost all usages of the old MetaData classes in Test and TestQuestionPool related to export/import. For everything else, see #7923.

From what I could gather from 28891 and a bit of testing, LOM of Tests and TestQuestionPools is currently directly included in the XML of the Test(QuestionPool) itself, but is not actually imported. When importing Tests, the LOM seems completely unused, and TestQuestionPools only use title and description.

This PR includes LOM as a tail dependency in the exports, and removes it from the XML of the objects themselves. Further, it adds fields for title and description to the XML for TestQuestionPools, and makes sure they are read out on import. Unfortunately, tail dependencies do not apply everywhere. Exports of TestQuestionPools via the question table, and exports of Tests with results of participants sidestep the Export infrastructure somewhat, so this PR will simply remove LOM from those types of exports.

If you prefer consistency between export types, I could also rewrite this PR to only remove the LOM from exports, without adding it back in as a tail dependency. Keeping the LOM for some or all types of exports does not have much value in my opinion: it is currently not imported, and is also not in a format that could be imported in the future.

Be aware that I tested most of these changes in 9, because import/export is currently broken in trunk.

With this PR and #7923, the only usage of old MetaData classes in Tests and TestQuestionPools are ilMD and ilMDSaxParser in ilQuestionPageParser. As far as I can see, the only purpose their inclusion serves is the import of LOM of MediaObjects that might be included in Question Pages. ilMD and ilMDSaxParser are deprecated (as of a few weeks ago), and will be removed with ILIAS 11, but even if they are not replaced in ilQuestionPageParser I think the loss of functionality is bearable. Let me know if you have a strong opinion about this, I will also put it up for discussion in an upcoming JF along with a few similar cases.

Let me know if there is anything you want done differently.

Cheers, @schmitz-ilias

schmitz-ilias avatar Aug 09 '24 16:08 schmitz-ilias