ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

IRSS Migration of Posting Files

Open chfsx opened this issue 2 years ago • 2 comments

Hello @mjansenDatabay

In this PR we propose drop-in replacement migration of files that can be uploaded in a forum post. To make the changes in the forum as non-invasive as possible (and still support migrated and also non-migrated files) we have two implementations of ilFileDataForum for this. Of course this can be completely rebuilt e.g. with ILIAS 10 if you want to. Then the migration has to be done and you don't have to support non-migrated files anymore.

Thanks for your commitment to look at this PR in such a straightforward way with no additional funding. We can always discuss this PR in a meeting as well and I can explain every detail to you, if needed.

The following is included in this PR:

The Migration:

  • Extension of the existing ilForumSetupAgent to provide the new migration: https://github.com/ILIAS-eLearning/ILIAS/compare/trunk...srsolutionsag:ILIAS:feature/9/irss-forum-files?expand=1#diff-9219530cd42a76dc616e94e3c14f622b9efe90578c7c824f46485123aabc38f9
  • A Stakeholder for this kind of files: https://github.com/ILIAS-eLearning/ILIAS/compare/trunk...srsolutionsag:ILIAS:feature/9/irss-forum-files?expand=1#diff-2d8c7f9e0e7cbb0ab50da8eb7423b148e121ea7f1b6e79e2200ee8e036eeacf7
  • A DatabaseUpdateStep to create a new rcid (Resource Collection ID) column for Porums posts: https://github.com/ILIAS-eLearning/ILIAS/compare/trunk...srsolutionsag:ILIAS:feature/9/irss-forum-files?expand=1#diff-aa21b895a57fe6d892d5cf6bb6140be03a7742b979488fa19c7cefa718107dab
  • The actual Migration: https://github.com/ILIAS-eLearning/ILIAS/compare/trunk...srsolutionsag:ILIAS:feature/9/irss-forum-files?expand=1#diff-a9aaac5aa5be3dcb596c6843dfcee096f1eb68f2aa332de5f68e1497a723be49

Migration moves all files of a post to the IRSS using a regex pattern: https://github.com/ILIAS-eLearning/ILIAS/compare/trunk...srsolutionsag:ILIAS:feature/9/irss-forum-files?expand=1#diff-a9aaac5aa5be3dcb596c6843dfcee096f1eb68f2aa332de5f68e1497a723be49R79 Thereby the md5-hash of the filename is used as revision title, because the whole ilFileDataForum is designed for it: https://github.com/ILIAS-eLearning/ILIAS/compare/trunk...srsolutionsag:ILIAS:feature/9/irss-forum-files?expand=1#diff-a9aaac5aa5be3dcb596c6843dfcee096f1eb68f2aa332de5f68e1497a723be49R128

Special cases:

  • Moving files from posting drafts currently needs a somewhat special solution: https://github.com/ILIAS-eLearning/ILIAS/compare/trunk...srsolutionsag:ILIAS:feature/9/irss-forum-files?expand=1#diff-6b8f50962e1366270847be0933555fb3c655e43b0638dcbcb874a6b43e408913R132
  • Import/Export is also adjusted, but if necessary it could be solved easier. With this variant here, however, import/exports are done exactly as before and export files remain compatible.
  • Posts that are not migrated yet have a '-' as rcid, see https://github.com/ILIAS-eLearning/ILIAS/compare/trunk...srsolutionsag:ILIAS:feature/9/irss-forum-files?expand=1#diff-acc679d8a92156d1c1bfcdbbb7b3aeb96ff6d4a3eaf4550210b744595e22d5ceR55

If you have any questions, feel free to contact me. Thank you very much!

chfsx avatar Sep 30 '22 15:09 chfsx

The documentation of Migrations is based on your case as well: https://github.com/ILIAS-eLearning/ILIAS/blob/trunk/Services/ResourceStorage/MIGRATIONS.md

chfsx avatar Sep 30 '22 15:09 chfsx

And the docu of the here used ResourceCollections has been updated: https://github.com/ILIAS-eLearning/ILIAS/blob/trunk/src/ResourceStorage/README.md#collections

chfsx avatar Sep 30 '22 15:09 chfsx

@chfsx Thank you very much. I will take care of this if my vacation/COVID stack is a bit more empty :-).

mjansenDatabay avatar Oct 14 '22 06:10 mjansenDatabay

Hi @mjansenDatabay I rebased the PR to avoid conflicts, if there is anything I can do or help feel free to contact me!

chfsx avatar Dec 02 '22 09:12 chfsx

Hi @chfsx, I will merge this this after I have worked through my stack of TODOs, which is huge due to 2 vacations + COVID :-) in the last 2 months. No worries, this will be merged :-)!

mjansenDatabay avatar Dec 02 '22 10:12 mjansenDatabay