Index: openacs-4/contrib/packages/survey/tcl/survey-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/tcl/Attic/survey-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/survey/tcl/survey-procs.tcl 13 Jan 2005 13:54:39 -0000 1.5 +++ openacs-4/contrib/packages/survey/tcl/survey-procs.tcl 31 Jan 2005 19:24:13 -0000 1.6 @@ -869,7 +869,7 @@ db_foreach get_question_data_types {} { lappend question_id_list $question_id - regsub -all {"} $question_text {""} question_text + regsub -all \" $question_text {""} question_text append headline ",\"$question_text" append headline "\"" set question_data_type($question_id) $abstract_data_type @@ -1498,7 +1498,11 @@ form question_id {response_id ""} -} {Adds the question to the form. the form has to be created by ad_form or with template::form::create. The form variable is of the form \"response_to_question.\$question_id} { +} { + Adds the question to the form. the form has to be created by ad_form + or with template::form::create. The form variable is of the form + response_to_question.\$question_id +} { if {![empty_string_p $response_id]} { set edit_previous_response_p "t" @@ -1540,7 +1544,7 @@ db_foreach prev_response_query_predef {} { incr count - if {$presentation_type == "checkbox" || $presentation_type == "checkbox_text} { + if {$presentation_type == "checkbox" || $presentation_type == "checkbox_text"} { set selected_choices($choice_id) "t" } } if_no_rows { @@ -1628,14 +1632,9 @@ } } + set optional_p [expr { ! $required_p } ] + # add the form elements, depending on the presentation type -ns_log notice " -DB -------------------------------------------------------------------------------- -DB DAVE debugging procedure survey_question_add_to_form -DB -------------------------------------------------------------------------------- -DB optional_p = '${optional_p}' -DB question_id = '${question_id}' -DB --------------------------------------------------------------------------------" switch -- $presentation_type { "upload_file" { template::element::create $form $element_name \