Would it be possible to add an option to remove (clear) all responses from an
ongoing survey ?
something along the lines of
function survey_delete_responses() {
$nid = arg(1);
// Are you sure ?
$res = db_query ("DELETE * from survey_responses where nid = $nid");
}
p
Comments
Comment #1
shane commentedI would love to see this as well. It's odd that this wasn't a standard feature out of the gate? It'd be nice to be able to select a bunch of survey responses with check boxes, and then select button that says "delete selected". Also, if viewing an individual survey response, have a single button that says "delete response". Also have a button that says "delete all responses".
This module already rocks! Thanks!
Comment #2
seanrHas anyone done this? I think this is a critical need. Unbelievable that it wasn't part of the mdoule from the first version.
Comment #3
Coyote commentedYup. Can't use this module without the ability to delete spurious survey entries or test entries.
Comment #4
tomski commentedThere is a way to delete survey responses by going through mysql. My site is hosted, and I have access to mysql through a phpmyadmin, there I access my database, and then click on the table survey_responses. When I ask to show the responses, you have a list of the responses, the rid number indicates the order in absolute terms. You can ask sql to flush the whole thing or you can select the responses you want to eliminate (the only problem is that beyond the absolute order 1-2-3 etc. I did not find anything else to identify them correctely, but I am not at all a programmer or an expert of mysql, so you may come up with other suggestions). This of course just a temporary turn around, but it can be useful to get rid of the test surveys for example.
Comment #5
wpd commentedhousekeeping: correcting component
Comment #6
bermin commentedWell, it is August now. Anyone come up with an ingenious idea how to do this?
Comment #7
baserunner commentedthis would be very good.
but alternativeley would it be possible to make something like "delete if exported"
So in case you have exported the responses to excel for further treatment, that those responses get deleted in drupal...or at least transfered somehow to a exported table
Comment #8
mcantelon commentedI've created a patch, for the Jan 11 version of the survey module, that allows purging of survey data: http://drupal.org/node/116610
Comment #9
geodaniel commentedMarking this as duplicate as there is a recent patch on the other issue