Index: openacs-4/packages/survey/www/admin/responses-export.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/responses-export.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/survey/www/admin/responses-export.tcl 16 Sep 2002 00:00:24 -0000 1.1 +++ openacs-4/packages/survey/www/admin/responses-export.tcl 23 Nov 2002 05:18:16 -0000 1.2 @@ -19,6 +19,15 @@ set package_id [ad_conn package_id] ad_require_permission $package_id survey_admin_survey +set n_responses [db_string get_n_responses {}] +ns_log notice "DAVEB: n_responses=$n_responses" +if {$n_responses==0} { + get_survey_info -survey_id $survey_id + set context_bar [ad_context_bar [list "one?[export_url_vars survey_id]" $survey_info(name)] "CSV Export"] + ad_return_template "no-responses" + return +} + set question_id_list [list] set responses_table survey_responses