Hi. I'm not if there exists a pattern of the moodle developers when facing this scenario:
- I have 2 modules (let's call them M1, M2 and M3).
-M3 is new module that has table TM3 with information that can be related to M1 and M2.
-We want to update M1 and M2 in such a way that when a user creates a new instance of M1 or M2 it could create also a M3 instance.
(1) Do I extend M1/M2 forms to include new fields of M3?
(2) In case of (1) is true, Do I have to change the add_instance of M1/M2 to create the new instance of M3 and create the relationship by hand?
(3) Does it make sense to have M3 mod form that is not going to be used?
(4) Would be better if I use the M3 mod form to include it using Ajax in mod forms of M1/M2?
Complex question, I know. Maybe someone could give me some light to see better
Thanks in advance.