Skip to content

References: make type match ref_id and obj_id in list GUIs (47391)#11478

Open
schmitz-ilias wants to merge 1 commit intoILIAS-eLearning:trunkfrom
schmitz-ilias:bt-47391-trunk
Open

References: make type match ref_id and obj_id in list GUIs (47391)#11478
schmitz-ilias wants to merge 1 commit intoILIAS-eLearning:trunkfrom
schmitz-ilias:bt-47391-trunk

Conversation

@schmitz-ilias
Copy link
Copy Markdown
Contributor

@schmitz-ilias schmitz-ilias commented Apr 27, 2026

This PR fixes 47391 by making sure that ilObjectListGUI::$ref_id, ilObjectListGUI::$obj_id and ilObjectListGUI::$type of container references match. This seems a bit of a risky change, ilObjectListGUI::$type shows up a lot in ilObjectListGUI, see the ticket for details.

@kergomard, there are no code changes in your components, but this PR mainly concerns how an "interface" of your component should be used, so as far as I'm concerned this is your call to make. Let me know how you want to proceed with this and 47391, I can take of merging and whatnot.

@maalers, you should also have quick look here, ilObjStudyProgrammeReferenceListGUI is also affected. If you have any doubts or questions, let me know!

@kergomard
Copy link
Copy Markdown
Contributor

Thank you very much for the PR @schmitz-ilias !

I would propose for you not to use this approach as this comes at a very high prize: References would not tell the truth about their type in lists. I'm completely sure that will bite you in the behind later on. I would suggest for you to override ilObjectListGui::insertSubscribeCommand() for all reference-types. This should, in my eyes, be provided by the component ContainerReference.

Best,
@kergomard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants