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 -N -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/survey/www/admin/process-response.tcl 7 Aug 2014 07:11:47 -0000 1.5.2.1 +++ openacs-4/packages/survey/www/admin/process-response.tcl 10 Sep 2014 10:31:10 -0000 1.5.2.2 @@ -30,7 +30,7 @@ } } - check_questions -requires { section_id:integer } { + check_questions -requires { section_id } { set question_info_list [db_list_of_lists survey_question_info_list { select question_id, question_text, abstract_data_type, presentation_type, required_p @@ -43,7 +43,7 @@ ## Validate input. set questions_with_missing_responses [list] - + foreach question $question_info_list { set question_id [lindex $question 0] set question_text [lindex $question 1] @@ -68,11 +68,21 @@ } } } - + if { $abstract_data_type eq "date" } { - if [catch { set response_to_question($question_id) [validate_ad_dateentrywidget "" response_to_question.$question_id [ns_getform]]} errmsg] { - ad_complain "$errmsg: Please make sure your dates are valid." + foreach {name value} [ns_set array [ns_getform]] { + if {[regexp "^response_to_question\[.\]$question_id\[.\](.*)\$" $name _ part]} { + set date_value($part) $value + } } + set ok [ad_page_contract_filter_proc_date "date" date_value] + if {$ok} { + set response_to_question($question_id) [ns_buildsqldate $date_value(month) \ + $date_value(day) \ + $date_value(year)] + } else { + ad_complain "Please make sure your dates are valid." + } } if { ([info exists response_to_question($question_id)] && $response_to_question($question_id) ne "") } {