Open EdoStorm96 opened 2 weeks ago
I would say I have adressed all you comments. I have also made it the case, that a consentform for adults gets required if the study has adults and the stuff for children, if a study has children. These being interdependant did not make much sense, although we will check with Desiree on this.
Woopee, there we are. While closely reading along the master instruction and this page I've implemented all the possible attachment kinds into the new attachment system. While writing up the different kinds was doable ... the logic for when certain slots are to be added with the right desiredness was quite a pain and led me down deep paths of the portal's architecture. The bulk of the action happens in the
StudyAttachmentChecker
. I am not sure if this is the most elegant solution for implementing all this logic ... But it becoming somewhat of a mess was unavoidable ... But I'm open to tips for improvements! I think the best way to understand all this is to keep the document/email with the master instruction close at hand.Checking whether a study features recordings is especially annoying due to #733... I was also struggling a bit with making sure the other of a pair becomes optional when one is present. The wishes for this are also quite specific, so I could not find a nice way to generalize this behavior.
I added some pretty extensive descriptions taken from the page linked to above. These are currently not used, but might come in handy later.
I though I would also tackle translations, so I did this for the whole attachments branch.
Finally I implemented the attachments page into the general flow of the form, so now the back and forward buttons work correctly ... As of the current state of the portal this requires a form, so I added an empty form for enabling this.
Sorry for the big commits, (6654c4a42259e739f5f5a84af57af6091447d93e & ba2ddfdd3181e1aacddb07f9e546b1b4b5febec9) but it just made most sense as a whole imo.