Index: openacs-4/contrib/packages/survey/www/respond.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/Attic/respond.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/contrib/packages/survey/www/respond.tcl 19 Sep 2003 16:48:03 -0000 1.1 +++ openacs-4/contrib/packages/survey/www/respond.tcl 13 Jan 2004 19:44:14 -0000 1.1.2.1 @@ -15,7 +15,7 @@ survey_id:integer,notnull {section_ids:integer,multiple 0} {response_id:integer 0} - return_url:optional + {return_url:optional index} {edit_p "f"} } -validate { survey_exists -requires {survey_id} { Index: openacs-4/contrib/packages/survey/www/admin/predefined-question-ae-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/predefined-question-ae-2.tcl,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/contrib/packages/survey/www/admin/predefined-question-ae-2.tcl 23 Oct 2003 06:22:26 -0000 1.2 +++ openacs-4/contrib/packages/survey/www/admin/predefined-question-ae-2.tcl 13 Jan 2004 19:43:04 -0000 1.2.2.1 @@ -26,13 +26,13 @@ {presentation_type_new:text(hidden) {value $presentation_type}} {presentation_type:text(hidden) {value $presentation_type}} {question_text_inform:text(inform) {label "Question"} {html {rows 5 cols 70}} {value $question_text}} -} -select_query { - select abstract_data_type,presentation_options,presentation_alignment,summary_type,action_type,tcl,table_name,column_name,key_name from survey_predefined_questions where predefined_question_id=:predefined_question_id + } if {[info exist predefined_question_id]} { # get choices set valid_responses "" + set choice_id_to_update_list [list] db_foreach survey_question_valid_responses "" { lappend choice_id_to_update_list $choice_id append valid_responses "$label\n" @@ -50,17 +50,14 @@ {abstract_data_type:text(select) {label "Type of Response"} {options {{"Short Text" shorttext} {Text text} {Boolean boolean} {Number number} {Integer integer}}} } - } -select_query { - select * from survey_predefined_questions where predefined_question_id=:predefined_question_id + } } textarea { ad_form -extend -name predef -form { {presentation:text(inform) {label "Presentation Type"} {value "Essay Answer"}} {textarea_size:text(select) {options {{Small small} {Medium medium} {Large large}}} {label "Size"}} {abstract_data_type:text(hidden) {value "text"}} - } -select_query { - select * from survey_predefined_questions where predefined_question_id=:predefined_question_id } } "radio" - @@ -73,8 +70,6 @@ {valid_responses:text(textarea) {label "For Multiple Choice
Enter a List of Valid Responses
(enter one choice per line)"} {html {rows 10 cols 50}} {value $valid_responses}} - } -select_query { - select * from survey_predefined_questions where predefined_question_id=:predefined_question_id } -validate { {valid_responses {$abstract_data_type!="choice" || ![empty_string_p $valid_responses]} "You did not enter a set of valid responses"} } @@ -85,8 +80,6 @@ {presentation:text(inform) {label "Presentation Type"} {value "Multiple Choice"}} {valid_responses:text(textarea) {label "Valid Resposnes (enter one choice per line)"} {html {rows 10 cols 50}}} {abstract_data_type:text(hidden) {value "choice"}} - } -select_query { - select * from survey_predefined_questions where predefined_question_id=:predefined_question_id } -validate { {valid_responses {$abstract_data_type!="choice" || ![empty_string_p $valid_responses]} "You did not enter a set of valid responses"} } @@ -95,16 +88,12 @@ ad_form -extend -name predef -form { {presentation:text(inform) {label "Presentation Type"} {value "Date Answer"}} {abstract_data_type:text(hidden) {value date}} - } -select_query { - select * from survey_predefined_questions where predefined_question_id=:predefined_question_id } } "upload_file" { ad_form -extend -name predef -form { {presentation:text(inform) {label "Presentation Type"} {value "Attachment Answer"}} {abstract_data_type:text(hidden) {value blob}} - } -select_query { - select * from survey_predefined_questions where predefined_question_id=:predefined_question_id } } }