Index: openacs-4/packages/survey/www/admin/process-response.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/process-response.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/survey/www/admin/process-response.xql 4 Aug 2004 19:34:15 -0000 1.1.2.1 @@ -0,0 +1,142 @@ + + + + + + select count(*) from survey_responses + where response_id=:new_response_id + + + + + + select creation_user as initial_creation_user_id + from survey_responses, acs_objects + where response_id = :initial_response_id + and survey_responses.response_id = acs_objects.object_id + + + + + + + + select 1 from survey_sections where section_id = :section_id + + + + + + + + + select question_id, question_text, abstract_data_type, presentation_type, required_p + from survey_questions + where section_id = :section_id + and active_p = 't' + order by sort_order + + + + + + + + + select question_id, question_text, abstract_data_type, presentation_type, required_p + from survey_questions + where section_id = :section_id + and active_p = 't' + order by sort_order + + + + + + + + insert into survey_question_responses (response_id, question_id, choice_id) + values (:response_id, :question_id, :response_value) + + + + + + + insert into survey_question_responses (response_id, question_id, choice_id) + values (:response_id, :question_id, :response_value) + + + + + + + insert into survey_question_responses (response_id, question_id, varchar_answer) + values (:response_id, :question_id, :response_value) + + + + + + + insert into survey_question_responses (response_id, question_id, boolean_answer) + values (:response_id, :question_id, :response_value) + + + + + + + insert into survey_question_responses (response_id, question_id, number_answer) + values (:response_id, :question_id, :response_value) + + + + + + + insert into survey_question_responses (response_id, question_id, date_answer) + values (:response_id, :question_id, :response_value) + + + + + + + select type from survey_sections where section_id = :section_id + + + + + + + select name from survey_sections where section_id = :section_id + + + + + + +select + attachment_answer +from + survey_question_responses +where + response_id = :edited_response_id + and question_id = :question_id + + + + + + + + + insert into survey_question_responses + (response_id, question_id, attachment_answer) + values + (:response_id, :question_id, :revision_id) + + + +