ctsit / save_survey_pdf_to_field

A REDCap external module to save a PDF of a survey to a file upload field
Other
0 stars 10 forks source link

Bug: EM resaves survey PDF when save & return is disabled & survey was already previously completed #15

Closed steentje34 closed 4 years ago

steentje34 commented 4 years ago

The redcap_survey_complete hook is called every time a survey is completed. This includes when a survey respondent tries to access a survey that has already been completed before & that has the option 'Save & Return later' disabled (i.e. standard message "Thank you for your interest, but you have already completed this survey." is displayed).

The Save Survey PDF to a Field module tries saving the survey PDF every time the redcap_survey_complete hook is called, even if trying to access a completed survey with "Save & Return Later" disabled. This causes errors, as the module tries saving a PDF while no empty field to save the PDF to exists, which is also not expected as 'Save & Return Later' is disabled. Could this please be fixed?

steentje34 commented 4 years ago

Closing this issue, as this is a bug in REDCap rather than the External Module: https://community.projectredcap.org/questions/80109/redcap-survey-complete-hook-when-is-it-supposed-to.html