[FIX] HTMLLearningModule #48169: Copy files when copying an HTML lear… - #11865
Open
faborg wants to merge 1 commit into
Open
[FIX] HTMLLearningModule #48169: Copy files when copying an HTML lear…#11865faborg wants to merge 1 commit into
faborg wants to merge 1 commit into
Conversation
…ning module https://mantis.ilias.de/view.php?id=48169 Since ILIAS 10 the files of an HTML learning module are no longer stored in data/<client>/lm_data/lm_<id> but in an IRSS container resource referenced by file_based_lm.rid. ilHTLMMigration moves the files there and removes the legacy directory. ilObjFileBasedLM::cloneObject() was not adapted and still copied the legacy directory only. For migrated modules that directory is gone, so the copy kept the empty container resource created by ilObjFileBasedLM::create() and ended up without any files. Changes in ilObjFileBasedLM: - Add cloneContainerResource(), which removes the empty container resource of the target object and replaces its RID with a clone of the source container (ContainerManager::clone()). This mirrors the way MediaObjects and content styles already clone their containers. - Call it from cloneObject(); the subsequent update() persists the new RID together with the start file. - Keep the legacy populateByDirectoy() call, but only when the data directory actually exists, so installations that have not run the migration yet still copy their content.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ning module
https://mantis.ilias.de/view.php?id=48169
Since ILIAS 10 the files of an HTML learning module are no longer stored in data//lm_data/lm_ but in an IRSS container resource referenced by file_based_lm.rid. ilHTLMMigration moves the files there and removes the legacy directory.
ilObjFileBasedLM::cloneObject() was not adapted and still copied the legacy directory only. For migrated modules that directory is gone, so the copy kept the empty container resource created by ilObjFileBasedLM::create() and ended up without any files.
Changes in ilObjFileBasedLM: