Index: openacs-4/packages/survey/www/process-response.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/process-response.tcl,v diff -u -r1.17.2.3 -r1.17.2.4 --- openacs-4/packages/survey/www/process-response.tcl 9 Feb 2020 16:10:31 -0000 1.17.2.3 +++ openacs-4/packages/survey/www/process-response.tcl 23 Mar 2021 13:36:24 -0000 1.17.2.4 @@ -191,16 +191,12 @@ # Deal with multiple responses. set checked_responses $response_to_question($question_id) foreach response_value $checked_responses { - if { $response_value eq "" } { - set response_value [db_null] - } - db_dml survey_question_response_checkbox_insert "insert into survey_question_responses (response_id, question_id, choice_id) values (:response_id, :question_id, :response_value)" } } else { - if { $response_value eq "" || [lindex $response_value 0] eq "" } { - set response_value [db_null] + if { [lindex $response_value 0] eq "" } { + set response_value "" } db_dml survey_question_response_choice_insert "insert into survey_question_responses (response_id, question_id, choice_id) @@ -212,37 +208,23 @@ values (:response_id, :question_id, :response_value)" } "boolean" { - if { $response_value eq "" } { - set response_value [db_null] - } db_dml survey_question_response_boolean_insert "insert into survey_question_responses (response_id, question_id, boolean_answer) values (:response_id, :question_id, :response_value)" } "integer" - "number" { - if { $response_value eq "" } { - set response_value [db_null] - } db_dml survey_question_response_integer_insert "insert into survey_question_responses (response_id, question_id, number_answer) values (:response_id, :question_id, :response_value)" } "text" { - if { $response_value eq "" } { - set response_value [db_null] - } - db_dml survey_question_response_text_insert " insert into survey_question_responses (response_id, question_id, clob_answer) values (:response_id, :question_id, empty_clob()) returning clob_answer into :1" -clobs [list $response_value] } "date" { - if { $response_value eq "" } { - set response_value [db_null] - } - db_dml survey_question_response_date_insert "insert into survey_question_responses (response_id, question_id, date_answer) values (:response_id, :question_id, :response_value)" } Index: openacs-4/packages/survey/www/admin/process-response.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/process-response.tcl,v diff -u -r1.7.2.3 -r1.7.2.4 --- openacs-4/packages/survey/www/admin/process-response.tcl 9 Feb 2020 16:10:31 -0000 1.7.2.3 +++ openacs-4/packages/survey/www/admin/process-response.tcl 23 Mar 2021 13:36:24 -0000 1.7.2.4 @@ -216,16 +216,12 @@ # Deal with multiple responses. set checked_responses $response_to_question($question_id) foreach response_value $checked_responses { - if { $response_value eq "" } { - set response_value [db_null] - } - db_dml survey_question_response_checkbox_insert "insert into survey_question_responses (response_id, question_id, choice_id) values (:response_id, :question_id, :response_value)" } } else { - if { $response_value eq "" || [lindex $response_value 0] eq "" } { - set response_value [db_null] + if { [lindex $response_value 0] eq "" } { + set response_value "" } db_dml survey_question_response_choice_insert "insert into survey_question_responses (response_id, question_id, choice_id) @@ -237,37 +233,22 @@ values (:response_id, :question_id, :response_value)" } "boolean" { - if { $response_value eq "" } { - set response_value [db_null] - } - db_dml survey_question_response_boolean_insert "insert into survey_question_responses (response_id, question_id, boolean_answer) values (:response_id, :question_id, :response_value)" } "integer" - "number" { - if { $response_value eq "" } { - set response_value [db_null] - } db_dml survey_question_response_integer_insert "insert into survey_question_responses (response_id, question_id, number_answer) values (:response_id, :question_id, :response_value)" } "text" { - if { $response_value eq "" } { - set response_value [db_null] - } - db_dml survey_question_response_text_insert " insert into survey_question_responses (response_id, question_id, clob_answer) values (:response_id, :question_id, empty_clob()) returning clob_answer into :1" -clobs [list $response_value] } "date" { - if { $response_value eq "" } { - set response_value [db_null] - } - db_dml survey_question_response_date_insert "insert into survey_question_responses (response_id, question_id, date_answer) values (:response_id, :question_id, :response_value)" }