ropensci / ruODK

ruODK: An R Client for the ODK Central API
https://docs.ropensci.org/ruODK/
GNU General Public License v3.0
41 stars 12 forks source link

Update submission_export.R #117

Closed Thaliehln closed 3 years ago

Thaliehln commented 3 years ago

30 Support encryption - Fix #110

I have checked the code following Sham's feedback on the ODK forum and I have found that there is indeed a bug in the way I generated the list of parameters to be passed to the body of the request in l.115-122 in submission_export.R. As the encryption IDs is an integer, R automatically creates all intermediate items when IDs greater than 1... The different tests we conducted were probably on the first encrypted project on ODK Central, and always with encryption ID = 1. Casting the ID as a string seems to make the trick. I have also slightly modified the syntax to have something more elegant.

Also a quick question on the default params: pp = NULL in submission_export params means that it does not should we have pp=get_default_pp() instead? or keep pp=NULL in which case you probably do not need to set pp in ru_settings()

Thaliehln commented 3 years ago

Sorry I had forgotten to commit my changes before sending the pull request. You should now be able to see the change in submission_export.R

florianm commented 3 years ago

Thanks heaps for the PR, @Thaliehln! I've just added some tests and support for the new options to skip media and repeat data.