Index: openacs-4/packages/survey/tcl/survey-notification-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/tcl/survey-notification-procs.tcl,v diff -u -r1.2.22.1 -r1.2.22.2 --- openacs-4/packages/survey/tcl/survey-notification-procs.tcl 22 Oct 2019 07:54:50 -0000 1.2.22.1 +++ openacs-4/packages/survey/tcl/survey-notification-procs.tcl 17 Dec 2019 16:28:44 -0000 1.2.22.2 @@ -14,6 +14,8 @@ ad_proc -public survey::notification::get_url { object_id } { + Return the URL to supplied survey object to be used in notifications +} { set package_id [db_string get_package_id {}] set package_url [site_node::get_url_from_object_id -object_id $package_id] return "${package_url}admin/one?survey_id=$object_id" @@ -22,5 +24,6 @@ ad_proc -public survey::notification::process_reply { reply_id } { - -} \ No newline at end of file + This proc is an empty stub +} { +} Index: openacs-4/packages/survey/tcl/survey-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/tcl/survey-procs-oracle.xql,v diff -u -r1.3 -r1.3.22.1 --- openacs-4/packages/survey/tcl/survey-procs-oracle.xql 30 Nov 2002 17:50:15 -0000 1.3 +++ openacs-4/packages/survey/tcl/survey-procs-oracle.xql 17 Dec 2019 16:28:44 -0000 1.3.22.1 @@ -3,7 +3,7 @@ oracle8.1.6 - + begin @@ -26,13 +26,13 @@ - + select survey_choice_id_sequence.nextval as choice_id from dual - + select count(distinct survey_response.initial_user_id(response_id)) from @@ -42,7 +42,7 @@ - + begin :1 := survey.new ( @@ -64,7 +64,7 @@ - + begin :1 := survey_section.new ( @@ -79,7 +79,7 @@ - + select r.initial_response_id, r.responding_user_id, r.response_id, u.first_names || ' ' || u.last_name as user_name, Index: openacs-4/packages/survey/tcl/survey-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/tcl/survey-procs-postgresql.xql,v diff -u -r1.7 -r1.7.22.1 --- openacs-4/packages/survey/tcl/survey-procs-postgresql.xql 17 May 2003 12:30:26 -0000 1.7 +++ openacs-4/packages/survey/tcl/survey-procs-postgresql.xql 17 Dec 2019 16:28:44 -0000 1.7.22.1 @@ -3,7 +3,7 @@ postgresql7.1 - + SELECT survey_question__new ( NULL, @@ -22,13 +22,13 @@ - + select survey_choice_id_sequence.nextval as choice_id - + select count(distinct survey_response__initial_user_id(response_id)) from @@ -38,7 +38,7 @@ - + select r.initial_response_id, r.responding_user_id, r.response_id, u.first_names || ' ' || u.last_name as user_name, @@ -54,7 +54,7 @@ - + select count(distinct survey_response__initial_user_id(response_id)) from @@ -63,7 +63,7 @@ - + select survey__new ( NULL, @@ -83,7 +83,7 @@ - + select survey_section__new ( NULL, Index: openacs-4/packages/survey/tcl/survey-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/tcl/survey-procs.tcl,v diff -u -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/survey/tcl/survey-procs.tcl 17 Dec 2019 14:56:34 -0000 1.14.2.1 +++ openacs-4/packages/survey/tcl/survey-procs.tcl 17 Dec 2019 16:28:44 -0000 1.14.2.2 @@ -3,7 +3,7 @@ ad_library { Support procs for simple survey module, most important being - survey_question_display which generates a question widget based + survey::display_question which generates a question widget based on data retrieved from database. @author philg@mit.edu on @@ -14,7 +14,26 @@ } -ad_proc -public get_survey_info { +namespace eval survey {} + +ad_proc -deprecated get_survey_info args { + creates a Tcl array variable named "survey_info" in the caller's environment, + which contains key/value pairs for all properties of the requested survey. + + If survey_id is passed in, and it's a single-section survey, the + section_id will also be looked up and returned in the survey_info array. + + @author luke@museatech.net + @creation-date 2002-07-24 + + DEPRECATED: does not comply with OpenACS naming convention + + @see survey::get_info +} { + return [survey::get_info {*}$args] +} + +ad_proc -public survey::get_info { {-survey_id ""} {-section_id ""} } { @@ -55,8 +74,18 @@ } } +ad_proc -deprecated survey_question_display args { + Returns a string of HTML to display for a question, suitable for embedding in a form. + The form variable is of the form \"response_to_question.\$question_id -ad_proc -public survey_question_display { + DEPRECATED: does not comply with OpenACS naming convention + + @see survey::display_question +} { + return [survey::display_question {*}$args] +} + +ad_proc -public survey::display_question { question_id {response_id ""} } { @@ -258,11 +287,27 @@ return $good_text } -ad_proc -public survey_answer_summary_display {response_id {html_p 1}} { +ad_proc -deprecated survey_answer_summary_display args { Returns a string with the questions and answers. If html_p =t, the format will be html. Otherwise, it will be text. If a list of category_ids is provided, the questions will be limited to that set of categories. + + DEPRECATED: does not comply with OpenACS naming convention + + @see survey::display_answer_summary } { + return [survey::display_answer_summary {*}$args] +} + +ad_proc -public survey::display_answer_summary { + response_id + {html_p 1} +} { + Returns a string with the questions and answers. If html_p =t, the + format will be html. Otherwise, it will be text. If a list of + category_ids is provided, the questions will be limited to that + set of categories. +} { set return_string "" set question_id_previous "" @@ -300,7 +345,7 @@ } if {$boolean_answer ne ""} { - append return_string [survey_decode_boolean_answer -response $boolean_answer -question_id $question_id] + append return_string [survey::decode_boolean_answer -response $boolean_answer -question_id $question_id] } @@ -317,8 +362,20 @@ } +ad_proc -deprecated survey_get_score args { + Returns the score of the user's most recent response to a survey -ad_proc -public survey_get_score {section_id user_id} { + DEPRECATED: does not comply with OpenACS naming convention + + @see survey::get_score +} { + return [survey::get_score {*}$args] +} + +ad_proc -public survey::get_score { + section_id + user_id +} { Returns the score of the user's most recent response to a survey } { @@ -334,17 +391,36 @@ } -ad_proc -public survey_display_types { +ad_proc -deprecated survey_display_types {} { + DEPRECATED: does not comply with OpenACS naming convention + + @see survey::display_types } { + return [survey::display_types] +} + +ad_proc -public survey::display_types {} { + Return the list of display types +} { return {list table paragraph} } -ad_proc -public survey_question_copy { +ad_proc -deprecated survey_question_copy args { + copies a question within the same survey + DEPRECATED: does not comply with OpenACS naming convention + + @see survey::copy_question +} { + return [survey::copy_question {*}$args] +} + +ad_proc -public survey::copy_question { {-new_section_id ""} {-question_id:required} -} { copies a question within the same survey } { + Copies a question within the same survey +} { set user_id [ad_conn user_id] db_1row get_question_details {} if {$new_section_id ne ""} { @@ -371,17 +447,31 @@ return $new_question_id } -ad_proc survey_copy { - {-survey_id:required} - {-package_id ""} - {-new_name ""} -} { + +ad_proc -deprecated survey_copy args { copies a survey, copying all questions, but not responses is package_id is specific it copies they survey to another survey package instance, otherwise it copies the survey to the same package instance + + DEPRECATED: does not comply with OpenACS naming convention + + @see survey::copy } { + return [survey::copy {*}$args] +} +ad_proc -public survey::copy { + {-survey_id:required} + {-package_id ""} + {-new_name ""} +} { + Copies a survey, copying all questions, but not responses. Is + package_id is specific, it copies the survey to another survey + package instance, otherwise it copies the survey to the same + package instance. +} { + if {$package_id eq ""} { set package_id [ad_conn package_id] } @@ -405,20 +495,32 @@ } db_foreach get_questions {} { - survey_question_copy -new_section_id $new_section_ids($section_id) -question_id $question_id + survey::copy_question -new_section_id $new_section_ids($section_id) -question_id $question_id } return $new_survey_id } -ad_proc -public survey_do_notifications { - {-response_id ""} -} { process notifications when someone responds to a survey +ad_proc -deprecated survey_do_notifications args { + process notifications when someone responds to a survey or edits a response + + DEPRECATED: does not comply with OpenACS naming convention + + @see survey::do_notifications } { + return [survey::do_notifications {*}$args] +} +ad_proc -public survey::do_notifications { + {-response_id ""} +} { + Process notifications when someone responds to a survey or edits a + response. +} { + set survey_id [db_string get_survey_id_from_response {}] - get_survey_info -survey_id $survey_id + survey::get_info -survey_id $survey_id set survey_name $survey_info(name) set subject "[_ survey.Response_to] $survey_name" set community_name {} @@ -499,12 +601,28 @@ } -ad_proc survey_decode_boolean_answer { +ad_proc -deprecated survey_decode_boolean_answer args { + takes t/f value from a boolean_answer column and + decodes it based on the presentation_options of the question + + @author Dave Bauer + + @param -response text value of response to be decoded + @param -question_id question_id of question response is from + + DEPRECATED: does not comply with OpenACS naming convention + + @see survey::decode_boolean_answer +} { + return [survey::decode_boolean_answer {*}$args] +} + +ad_proc -public survey::decode_boolean_answer { {-response:required} {-question_id:required} } { - takes t/f value from a boolean_answer column and - decodes it based on the presentation_options of the question + Takes t/f value from a boolean_answer column and decodes it based + on the presentation_options of the question. @author Dave Bauer Index: openacs-4/packages/survey/tcl/survey-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/tcl/survey-procs.xql,v diff -u -r1.5 -r1.5.16.1 --- openacs-4/packages/survey/tcl/survey-procs.xql 13 Jan 2005 13:58:45 -0000 1.5 +++ openacs-4/packages/survey/tcl/survey-procs.xql 17 Dec 2019 16:28:44 -0000 1.5.16.1 @@ -1,7 +1,7 @@ - + select count(*) from dotlrn_member_rels_full where rel_type='dotlrn_member_rel' @@ -10,23 +10,23 @@ - + select min(section_id) as section_id from survey_sections where survey_id = :survey_id - + select survey_id from survey_sections where section_id = :section_id - + select s.*, o.creation_user, o.creation_date, p.first_names || ' ' || p.last_name as creator_name, @@ -42,7 +42,7 @@ - + select choice_id, @@ -59,7 +59,7 @@ - + select choice_id, @@ -76,7 +76,7 @@ - + select @@ -99,7 +99,7 @@ - + select choice_id, label from survey_question_choices @@ -109,7 +109,7 @@ - + select choice_id, label from survey_question_choices @@ -119,7 +119,7 @@ - + select * from survey_question_choices where question_id = :question_id @@ -142,22 +142,22 @@ - + select * from survey_questions where question_id=:question_id - + update survey_questions set question_text = :question_text where question_id = :new_question_id - + update survey_questions set sort_order = sort_order + 1 @@ -166,14 +166,14 @@ - + select * from survey_question_choices where question_id=:old_question_id - + insert into survey_question_choices (choice_id, question_id, label, numeric_value, sort_order) @@ -183,28 +183,28 @@ - + select survey_id from survey_responses where response_id=:response_id - + select count(*) from survey_responses_latest where survey_id=:survey_id - + select count(*) from party_approved_member_map where party_id=:segment_id - + select sort_order, question_text, question_id from survey_questions @@ -215,7 +215,7 @@ - + select survey_id, @@ -232,20 +232,20 @@ - + update survey_sections set description=:description where section_id=:new_section_id - + select section_id from survey_sections where survey_id=:survey_id - + select question_id from survey_questions where section_id in (select section_id from survey_sections @@ -288,7 +288,7 @@ - + select presentation_options from survey_questions Index: openacs-4/packages/survey/www/one-respondent.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/one-respondent.tcl,v diff -u -r1.11 -r1.11.2.1 --- openacs-4/packages/survey/www/one-respondent.tcl 30 Sep 2017 18:12:52 -0000 1.11 +++ openacs-4/packages/survey/www/one-respondent.tcl 17 Dec 2019 16:28:44 -0000 1.11.2.1 @@ -32,7 +32,7 @@ set user_id [ad_conn user_id] -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id set survey_name $survey_info(name) set description $survey_info(description) 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.1 -r1.17.2.2 --- openacs-4/packages/survey/www/process-response.tcl 12 Apr 2019 21:30:24 -0000 1.17.2.1 +++ openacs-4/packages/survey/www/process-response.tcl 17 Dec 2019 16:28:44 -0000 1.17.2.2 @@ -143,7 +143,7 @@ set user_id [ad_conn user_id] -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id set type $survey_info(type) set survey_id $survey_info(survey_id) set survey_name $survey_info(name) @@ -285,7 +285,7 @@ } } -survey_do_notifications -response_id $response_id +survey::do_notifications -response_id $response_id } Index: openacs-4/packages/survey/www/respond.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/respond.tcl,v diff -u -r1.13 -r1.13.2.1 --- openacs-4/packages/survey/www/respond.tcl 26 Apr 2018 08:56:38 -0000 1.13 +++ openacs-4/packages/survey/www/respond.tcl 17 Dec 2019 16:28:44 -0000 1.13.2.1 @@ -23,7 +23,7 @@ } set user_id [auth::require_login] set number_of_responses [db_string count_responses {}] - get_survey_info -survey_id $survey_id + survey::get_info -survey_id $survey_id set single_section_p $survey_info(single_section_p) if {$section_id==0 && $single_section_p=="t"} { set section_id $survey_info(section_id) @@ -67,7 +67,7 @@ } } -# build a list containing the HTML (generated with survey_question_display) for each question +# build a list containing the HTML (generated with survey::display_question) for each question set rownum 0 # for double-click protection set new_response_id [db_nextval acs_object_id_seq] @@ -76,7 +76,7 @@ db_foreach survey_sections {} { db_foreach question_ids_select {} { - lappend questions [survey_question_display $question_id $response_id] + lappend questions [survey::display_question $question_id $response_id] } # return_url is used for infoshare - if it is set Index: openacs-4/packages/survey/www/admin/description-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/description-edit.tcl,v diff -u -r1.8 -r1.8.4.1 --- openacs-4/packages/survey/www/admin/description-edit.tcl 27 Jun 2015 20:46:15 -0000 1.8 +++ openacs-4/packages/survey/www/admin/description-edit.tcl 17 Dec 2019 16:28:44 -0000 1.8.4.1 @@ -22,7 +22,7 @@ {options {{"[_ survey.Preformatted_Text]" "pre"} {"HTML" "html"} {"[_ survey.Plain_Text]" "plain"}}}} } -edit_request { - get_survey_info -survey_id $survey_id + survey::get_info -survey_id $survey_id set survey_name $survey_info(name) set description $survey_info(description) set description_html_p $survey_info(description_html_p) Index: openacs-4/packages/survey/www/admin/modify-responses-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/modify-responses-2.tcl,v diff -u -r1.4 -r1.4.4.1 --- openacs-4/packages/survey/www/admin/modify-responses-2.tcl 27 Jun 2015 20:46:15 -0000 1.4 +++ openacs-4/packages/survey/www/admin/modify-responses-2.tcl 17 Dec 2019 16:28:44 -0000 1.4.4.1 @@ -44,7 +44,7 @@ db_release_unused_handles -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_id $survey_info(survey_id) ad_returnredirect [export_vars -base one {survey_id}] Index: openacs-4/packages/survey/www/admin/modify-responses.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/modify-responses.tcl,v diff -u -r1.5 -r1.5.4.1 --- openacs-4/packages/survey/www/admin/modify-responses.tcl 27 Jun 2015 20:46:15 -0000 1.5 +++ openacs-4/packages/survey/www/admin/modify-responses.tcl 17 Dec 2019 16:28:44 -0000 1.5.4.1 @@ -17,7 +17,7 @@ permission::require_permission -object_id $section_id -privilege survey_modify_question -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_id $survey_info(survey_id) set survey_name [db_string survey_name_from_id "select name from survey_sections where section_id=:section_id" ] Index: openacs-4/packages/survey/www/admin/name-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/name-edit.tcl,v diff -u -r1.8 -r1.8.4.1 --- openacs-4/packages/survey/www/admin/name-edit.tcl 27 Jun 2015 20:46:15 -0000 1.8 +++ openacs-4/packages/survey/www/admin/name-edit.tcl 17 Dec 2019 16:28:44 -0000 1.8.4.1 @@ -15,7 +15,7 @@ {description:html ""} } -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id set survey_name "$survey_info(name)" permission::require_permission -object_id $survey_id -privilege survey_modify_survey @@ -35,7 +35,7 @@ "[_ survey.lt_Survey_Name_must_be_l]" } } -edit_request { - get_survey_info -survey_id $survey_id + survey::get_info -survey_id $survey_id set name "$survey_info(name)" set description "$survey_info(description)" set description_html_p "$survey_info(description_html_p)" Index: openacs-4/packages/survey/www/admin/one-respondent.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/one-respondent.tcl,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/survey/www/admin/one-respondent.tcl 21 Jan 2018 00:39:44 -0000 1.9 +++ openacs-4/packages/survey/www/admin/one-respondent.tcl 17 Dec 2019 16:28:44 -0000 1.9.2.1 @@ -17,7 +17,7 @@ permission::require_permission -object_id $survey_id -privilege survey_admin_survey -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id set survey_name $survey_info(name) set description $survey_info(description) set description_html_p $survey_info(description_html_p) Index: openacs-4/packages/survey/www/admin/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/one.tcl,v diff -u -r1.13 -r1.13.2.1 --- openacs-4/packages/survey/www/admin/one.tcl 30 Sep 2017 18:12:53 -0000 1.13 +++ openacs-4/packages/survey/www/admin/one.tcl 17 Dec 2019 16:28:44 -0000 1.13.2.1 @@ -20,7 +20,7 @@ permission::require_permission -object_id $package_id -privilege survey_admin_survey # Get the survey information. -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id if {![info exists survey_info(survey_id)]} { ad_return_complaint 1 "[_ survey.lt_Requested_survey_does]" ad_script_abort @@ -62,7 +62,7 @@ # Display Type (ben) # provide list survey_display_types to adp process with -set survey_display_types [survey_display_types] +set survey_display_types [survey::display_types] # Questions summary. @@ -73,7 +73,7 @@ db_multirow -extend { question_display question_modify_url question_copy_url question_add_url question_delete_url question_swap_down_url question_swap_up_url } questions survey_questions "" { - set question_display [survey_question_display $question_id] + set question_display [survey::display_question $question_id] set question_modify_url [export_vars -base question-modify {{question_id $question_id} section_id survey_id}] set question_copy_url [export_vars -base question-copy {{question_id $question_id} {sort_order $sort_order}}] set question_add_url [export_vars -base question-add {section_id {after $sort_order}}] 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.1 -r1.7.2.2 --- openacs-4/packages/survey/www/admin/process-response.tcl 12 Apr 2019 21:30:24 -0000 1.7.2.1 +++ openacs-4/packages/survey/www/admin/process-response.tcl 17 Dec 2019 16:28:44 -0000 1.7.2.2 @@ -153,7 +153,7 @@ set user_id [ad_conn user_id] -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id set type $survey_info(type) set survey_id $survey_info(survey_id) set survey_name $survey_info(name) Index: openacs-4/packages/survey/www/admin/question-active-toggle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/question-active-toggle.tcl,v diff -u -r1.4 -r1.4.4.1 --- openacs-4/packages/survey/www/admin/question-active-toggle.tcl 27 Jun 2015 20:46:15 -0000 1.4 +++ openacs-4/packages/survey/www/admin/question-active-toggle.tcl 17 Dec 2019 16:28:44 -0000 1.4.4.1 @@ -21,7 +21,7 @@ and question_id = :question_id" db_release_unused_handles -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_id $survey_info(survey_id) ad_returnredirect [export_vars -base one {survey_id}] Index: openacs-4/packages/survey/www/admin/question-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/question-add-2.tcl,v diff -u -r1.8 -r1.8.4.1 --- openacs-4/packages/survey/www/admin/question-add-2.tcl 27 Jun 2015 20:46:15 -0000 1.8 +++ openacs-4/packages/survey/www/admin/question-add-2.tcl 17 Dec 2019 16:28:44 -0000 1.8.4.1 @@ -33,7 +33,7 @@ permission::require_permission -object_id $package_id -privilege survey_create_question set question_id [db_nextval acs_object_id_seq] -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id if {![info exists survey_info(survey_id)]} { ad_return_complaint 1 "[_ survey.lt_Requested_survey_does]" Index: openacs-4/packages/survey/www/admin/question-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/question-add-3.tcl,v diff -u -r1.9 -r1.9.4.1 --- openacs-4/packages/survey/www/admin/question-add-3.tcl 27 Jun 2015 20:46:15 -0000 1.9 +++ openacs-4/packages/survey/www/admin/question-add-3.tcl 17 Dec 2019 16:28:44 -0000 1.9.4.1 @@ -41,7 +41,7 @@ set package_id [ad_conn package_id] set user_id [ad_conn user_id] permission::require_permission -object_id $package_id -privilege survey_create_question -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id if {![info exists survey_info(survey_id)]} { ad_return_complaint 1 "[_ survey.lt_Requested_survey_does]" Index: openacs-4/packages/survey/www/admin/question-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/question-add.tcl,v diff -u -r1.8.4.1 -r1.8.4.2 --- openacs-4/packages/survey/www/admin/question-add.tcl 22 Oct 2019 07:54:50 -0000 1.8.4.1 +++ openacs-4/packages/survey/www/admin/question-add.tcl 17 Dec 2019 16:28:44 -0000 1.8.4.2 @@ -19,7 +19,7 @@ set user_id [ad_conn user_id] permission::require_permission -object_id $package_id -privilege survey_create_question -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id ad_form -name create_question -action question-add-2 -export { after } -form { question_id:key @@ -41,7 +41,7 @@ -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_id $survey_info(survey_id) set context [list [list [export_vars -base one {survey_id}] $survey_info(name)] "[_ survey.Add_A_Question]"] Index: openacs-4/packages/survey/www/admin/question-copy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/question-copy.tcl,v diff -u -r1.4 -r1.4.4.1 --- openacs-4/packages/survey/www/admin/question-copy.tcl 27 Jun 2015 20:46:15 -0000 1.4 +++ openacs-4/packages/survey/www/admin/question-copy.tcl 17 Dec 2019 16:28:44 -0000 1.4.4.1 @@ -13,9 +13,9 @@ permission::require_permission -object_id $package_id -privilege survey_create_question set section_id [db_string get_section_id_from_question {}] -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_id $survey_info(survey_id) -set new_question_id [survey_question_copy -question_id $question_id] +set new_question_id [survey::copy_question -question_id $question_id] incr sort_order ad_returnredirect "[export_vars -base one survey_id]&#$sort_order" Index: openacs-4/packages/survey/www/admin/question-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/question-delete.tcl,v diff -u -r1.8 -r1.8.4.1 --- openacs-4/packages/survey/www/admin/question-delete.tcl 27 Jun 2015 20:46:15 -0000 1.8 +++ openacs-4/packages/survey/www/admin/question-delete.tcl 17 Dec 2019 16:28:44 -0000 1.8.4.1 @@ -19,7 +19,7 @@ db_1row section_id_from_question_id "" -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_id $survey_info(survey_id) set n_responses [db_string survey_number_responses {} ] Index: openacs-4/packages/survey/www/admin/question-modify-text.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/question-modify-text.tcl,v diff -u -r1.7 -r1.7.4.1 --- openacs-4/packages/survey/www/admin/question-modify-text.tcl 27 Jun 2015 20:46:15 -0000 1.7 +++ openacs-4/packages/survey/www/admin/question-modify-text.tcl 17 Dec 2019 16:28:44 -0000 1.7.4.1 @@ -18,7 +18,7 @@ permission::require_permission -object_id $section_id -privilege survey_modify_question -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_name $survey_info(name) set survey_id $survey_info(survey_id) Index: openacs-4/packages/survey/www/admin/question-modify.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/question-modify.tcl,v diff -u -r1.6 -r1.6.4.1 --- openacs-4/packages/survey/www/admin/question-modify.tcl 27 Oct 2014 16:41:58 -0000 1.6 +++ openacs-4/packages/survey/www/admin/question-modify.tcl 17 Dec 2019 16:28:44 -0000 1.6.4.1 @@ -18,7 +18,7 @@ {sort_order ""} } -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_name $survey_info(name) set survey_id $survey_info(survey_id) permission::require_permission -object_id $survey_id -privilege survey_modify_question Index: openacs-4/packages/survey/www/admin/question-required-toggle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/question-required-toggle.tcl,v diff -u -r1.5 -r1.5.4.1 --- openacs-4/packages/survey/www/admin/question-required-toggle.tcl 27 Jun 2015 20:46:15 -0000 1.5 +++ openacs-4/packages/survey/www/admin/question-required-toggle.tcl 17 Dec 2019 16:28:44 -0000 1.5.4.1 @@ -26,7 +26,7 @@ and question_id = :question_id" db_release_unused_handles -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_id $survey_info(survey_id) ad_returnredirect [export_vars -base one {survey_id}] Index: openacs-4/packages/survey/www/admin/respond.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/respond.tcl,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/survey/www/admin/respond.tcl 22 Oct 2019 07:54:50 -0000 1.8.2.1 +++ openacs-4/packages/survey/www/admin/respond.tcl 17 Dec 2019 16:28:44 -0000 1.8.2.2 @@ -40,7 +40,7 @@ permission::require_permission -object_id $survey_id -privilege survey_admin_survey -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id set survey_name $survey_info(name) set description $survey_info(description) set type $survey_info(type) @@ -68,7 +68,7 @@ set button_label "Modify previous response" db_1row get_initial_response "" -# build a list containing the HTML (generated with survey_question_display) for each question +# build a list containing the HTML (generated with survey::display_question) for each question set rownum 0 # for double-click protection set new_response_id [db_nextval acs_object_id_seq] @@ -77,7 +77,7 @@ db_foreach survey_sections {} { db_foreach question_ids_select {} { - lappend questions [survey_question_display $question_id $response_id] + lappend questions [survey::display_question $question_id $response_id] } # survey will return to survey_url if it exists Index: openacs-4/packages/survey/www/admin/respondents.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/respondents.tcl,v diff -u -r1.12 -r1.12.2.1 --- openacs-4/packages/survey/www/admin/respondents.tcl 7 Aug 2017 23:48:29 -0000 1.12 +++ openacs-4/packages/survey/www/admin/respondents.tcl 17 Dec 2019 16:28:44 -0000 1.12.2.1 @@ -23,7 +23,7 @@ # the entire group. -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id set survey_name $survey_info(name) set doc(title) [_ survey.Respondents] Index: openacs-4/packages/survey/www/admin/response-drill-down.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/response-drill-down.tcl,v diff -u -r1.7 -r1.7.2.1 --- openacs-4/packages/survey/www/admin/response-drill-down.tcl 21 Jan 2018 00:39:44 -0000 1.7 +++ openacs-4/packages/survey/www/admin/response-drill-down.tcl 17 Dec 2019 16:28:44 -0000 1.7.2.1 @@ -26,7 +26,7 @@ # which it is part set question_exists_p [db_0or1row get_question_text ""] -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_name $survey_info(name) set survey_id $survey_info(survey_id) Index: openacs-4/packages/survey/www/admin/responses-export.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/responses-export.tcl,v diff -u -r1.13.4.1 -r1.13.4.2 --- openacs-4/packages/survey/www/admin/responses-export.tcl 16 Dec 2019 17:14:38 -0000 1.13.4.1 +++ openacs-4/packages/survey/www/admin/responses-export.tcl 17 Dec 2019 16:28:44 -0000 1.13.4.2 @@ -22,7 +22,7 @@ set n_responses [db_string get_n_responses {}] ns_log notice "DAVEB: n_responses=$n_responses" if {$n_responses==0} { - get_survey_info -survey_id $survey_id + survey::get_info -survey_id $survey_id set context [list [list [export_vars -base one {survey_id}] $survey_info(name)] "[_ survey.CSV_Export]"] ad_return_template "no-responses" return @@ -118,7 +118,7 @@ } # decode boolean answers if {$question_data_type($question_id)=="boolean"} { - set response_value [survey_decode_boolean_answer -response $response_value -question_id $question_id] + set response_value [survey::decode_boolean_answer -response $response_value -question_id $question_id] } if {$question_data_type($question_id)=="blob"} { set response_value [db_string get_filename {} -default ""] Index: openacs-4/packages/survey/www/admin/responses.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/responses.tcl,v diff -u -r1.8 -r1.8.4.1 --- openacs-4/packages/survey/www/admin/responses.tcl 27 Jun 2015 20:46:16 -0000 1.8 +++ openacs-4/packages/survey/www/admin/responses.tcl 17 Dec 2019 16:28:44 -0000 1.8.4.1 @@ -22,7 +22,7 @@ # nstrug - 12/9/2000 # Summarise scored responses for all users -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id set survey_name $survey_info(name) set type $survey_info(type) @@ -51,7 +51,7 @@ "boolean" { db_foreach survey_boolean_summary "" { - append results "[survey_decode_boolean_answer -response $boolean_answer -question_id $question_id]: $n_responses
\n" + append results "[survey::decode_boolean_answer -response $boolean_answer -question_id $question_id]: $n_responses
\n" } } "integer" - Index: openacs-4/packages/survey/www/admin/send-mail.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/send-mail.tcl,v diff -u -r1.7 -r1.7.4.1 --- openacs-4/packages/survey/www/admin/send-mail.tcl 27 Oct 2014 16:41:58 -0000 1.7 +++ openacs-4/packages/survey/www/admin/send-mail.tcl 17 Dec 2019 16:28:44 -0000 1.7.4.1 @@ -20,7 +20,7 @@ permission::require_permission -object_id $survey_id -privilege survey_admin_survey -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id set survey_name $survey_info(name) db_1row select_sender_info {} set dotlrn_installed_p [apm_package_installed_p dotlrn] Index: openacs-4/packages/survey/www/admin/survey-category-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/survey-category-add.tcl,v diff -u -r1.4 -r1.4.4.1 --- openacs-4/packages/survey/www/admin/survey-category-add.tcl 27 Jun 2015 20:46:16 -0000 1.4 +++ openacs-4/packages/survey/www/admin/survey-category-add.tcl 17 Dec 2019 16:28:44 -0000 1.4.4.1 @@ -38,7 +38,7 @@ } -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_id $survey_info(survey_id) ad_returnredirect [export_vars -base one {survey_id}] Index: openacs-4/packages/survey/www/admin/survey-copy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/survey-copy.tcl,v diff -u -r1.7.4.1 -r1.7.4.2 --- openacs-4/packages/survey/www/admin/survey-copy.tcl 17 Dec 2019 15:20:54 -0000 1.7.4.1 +++ openacs-4/packages/survey/www/admin/survey-copy.tcl 17 Dec 2019 16:28:44 -0000 1.7.4.2 @@ -13,7 +13,10 @@ set user_id [ad_conn user_id] permission::require_permission -object_id $package_id -privilege survey_create_question -db_1row get_survey_info {} +db_1row get_survey_info { + select * from surveys + where survey_id = :survey_id +} set title_name $name set name "[_ survey.Copy_of] $name" @@ -24,7 +27,7 @@ {survey_id:text(hidden) {value $survey_id}} } -on_submit { - set new_survey_id [survey_copy -survey_id $survey_id -new_name $name] + set new_survey_id [survey::copy -survey_id $survey_id -new_name $name] set survey_id $new_survey_id Fisheye: Tag 1.1.26.1 refers to a dead (removed) revision in file `openacs-4/packages/survey/www/admin/survey-copy.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/survey/www/admin/survey-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/survey-delete.tcl,v diff -u -r1.7 -r1.7.4.1 --- openacs-4/packages/survey/www/admin/survey-delete.tcl 27 Jun 2015 20:46:16 -0000 1.7 +++ openacs-4/packages/survey/www/admin/survey-delete.tcl 17 Dec 2019 16:28:44 -0000 1.7.4.1 @@ -16,7 +16,7 @@ set package_id [ad_conn package_id] permission::require_permission -object_id $package_id -privilege survey_admin_survey -get_survey_info -survey_id $survey_id +survey::get_info -survey_id $survey_id set questions_count "" set responses_count "" Index: openacs-4/packages/survey/www/admin/survey-display-type-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/survey-display-type-edit.tcl,v diff -u -r1.4 -r1.4.4.1 --- openacs-4/packages/survey/www/admin/survey-display-type-edit.tcl 27 Jun 2015 20:46:16 -0000 1.4 +++ openacs-4/packages/survey/www/admin/survey-display-type-edit.tcl 17 Dec 2019 16:28:44 -0000 1.4.4.1 @@ -12,7 +12,7 @@ permission::require_permission -object_id $survey_id -privilege survey_admin_survey -if {[lsearch [survey_display_types] $display_type] > -1} { +if {[lsearch [survey::display_types] $display_type] > -1} { db_dml survey_display_type_edit "" } Index: openacs-4/packages/survey/www/admin/survey-preview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/survey-preview.tcl,v diff -u -r1.10 -r1.10.2.1 --- openacs-4/packages/survey/www/admin/survey-preview.tcl 26 Apr 2018 08:56:38 -0000 1.10 +++ openacs-4/packages/survey/www/admin/survey-preview.tcl 17 Dec 2019 16:28:44 -0000 1.10.2.1 @@ -34,7 +34,7 @@ permission::require_permission -object_id $survey_id -privilege survey_take_survey - get_survey_info -survey_id $survey_id + survey::get_info -survey_id $survey_id set name $survey_info(name) set description $survey_info(description) set description_html_p $survey_info(description_html_p) @@ -49,15 +49,15 @@ set context [list "[_ survey.Preview] $name"] -# build a list containing the HTML (generated with survey_question_display) for each question +# build a list containing the HTML (generated with survey::display_question) for each question set rownum 0 set questions {} db_foreach survey_sections {} { db_foreach question_ids_select {} { - lappend questions [survey_question_display $question_id] + lappend questions [survey::display_question $question_id] } Index: openacs-4/packages/survey/www/admin/view-text-responses.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/view-text-responses.tcl,v diff -u -r1.6 -r1.6.4.1 --- openacs-4/packages/survey/www/admin/view-text-responses.tcl 27 Jun 2015 20:46:16 -0000 1.6 +++ openacs-4/packages/survey/www/admin/view-text-responses.tcl 17 Dec 2019 16:28:44 -0000 1.6.4.1 @@ -17,7 +17,7 @@ db_1row one_question "" -get_survey_info -section_id $section_id +survey::get_info -section_id $section_id set survey_name $survey_info(name) set survey_id $survey_info(survey_id)