Index: openacs-4/packages/survey/www/admin/question-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/question-add-3.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/survey/www/admin/question-add-3.tcl 18 Sep 2002 12:15:21 -0000 1.2 +++ openacs-4/packages/survey/www/admin/question-add-3.tcl 24 Sep 2002 02:22:25 -0000 1.3 @@ -67,7 +67,12 @@ ad_script_abort } +set already_inserted_p [db_string already_inserted_p {}] +if { $already_inserted_p } { + ad_returnredirect "one?[export_vars survey_id]" + ad_script_abort +} # Generate presentation_options. set presentation_options "" if { $presentation_type == "textbox" } { @@ -124,13 +129,10 @@ } } on_error { - set already_inserted_p [db_string already_inserted_p "select decode(count(*),0,0,1) from survey_questions where question_id = :question_id" ] - - if { !$already_inserted_p } { db_release_unused_handles ad_return_error "Database Error" "
$errmsg
" ad_script_abort - } + }