Skip to content

Fix webform export

theo lem requested to merge fix-webform-export into master

Fixing submissions export function, formerly introduced by !85 (merged).

The problem

The export function was called after the webform submissions we deleted from the database, causing the CSV file to have the right component titles (as these were in the $form object passed to framaforms_node_delete), but no submissions (as these could not be fetched from the database.

What this MR does

This adds the export of submissions as a submit callback for the following forms :

  1. node-delete-confirm (confirmation panel before deleting a form)
  2. user-cancel-confirm-form (confirmation panel before deleting a user)

The callback is placed in the callback queue before the forms are actually deleted, to ensure submissions are still available.

TODO

  • handle the admin option to enable/disable the export of forms
  • also add this export before expired forms are deleted by the framaforms cron (as these require no user action, they don't go through form submit callbacks)
  • clean up CSV file in the export function : user IPs are not anonymized.
  • CHANGELOG
Edited by theo lem

Merge request reports