Index: openacs-4/contrib/packages/survey/survey.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/Attic/survey.info,v diff -u -N -r1.5 -r1.6 --- openacs-4/contrib/packages/survey/survey.info 13 Jan 2005 13:54:38 -0000 1.5 +++ openacs-4/contrib/packages/survey/survey.info 26 Mar 2005 18:17:22 -0000 1.6 @@ -7,21 +7,23 @@ f f - + Dave Bauer Luke Pond Malte Sussdorff New version of survey package for dotLRN/OpenACS 5.0 dotLRN New version of survey package for dotLRN/OpenACS 5.0. This version supports branching and sections, uses ad_form templates but so far is not internationalized. Upgrade scripts are available for Oracle only (at the moment). - + 1 + + Index: openacs-4/contrib/packages/survey/sql/postgresql/survey-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/sql/postgresql/Attic/survey-package-create.sql,v diff -u -N -r1.6 -r1.7 --- openacs-4/contrib/packages/survey/sql/postgresql/survey-package-create.sql 31 Jan 2005 15:10:47 -0000 1.6 +++ openacs-4/contrib/packages/survey/sql/postgresql/survey-package-create.sql 26 Mar 2005 18:17:22 -0000 1.7 @@ -15,7 +15,7 @@ new__type alias for $9; -- default general new__display_type alias for $10; new__package_id alias for $11; - new__public_p alias for $12; -- default t + new__public_p alias for $12; -- default t new__creation_user alias for $13; -- default null new__context_id alias for $14; -- default null v_survey_id integer; @@ -26,7 +26,10 @@ now(), new__creation_user, null, - new__context_id + new__context_id, + ''t'', + new__name, + new__package_id ); insert into surveys @@ -110,14 +113,20 @@ new__context_id alias for $12; -- default null new__pretty_id alias for $13; v_section_id integer; + v_package_id integer; begin + select package_id into v_package_id from surveys where survey_id = new__survey_id; + v_section_id := acs_object__new ( new__section_id, ''survey_section'', now(), new__creation_user, null, - new__context_id + new__context_id, + ''t'', + new__name, + v_package_id ); insert into survey_sections @@ -181,7 +190,10 @@ now(), new__creation_user, null, - new__context_id + new__context_id, + ''t'', + new__question_text, + null ); insert into survey_predefined_questions @@ -214,14 +226,20 @@ new__creation_user alias for $15; -- default null new__context_id alias for $16; -- default null v_question_id integer; + v_package_id integer; begin + select package_id into v_package_id from acs_objects where object_id = new__section_id; + v_question_id := acs_object__new ( new__question_id, ''survey_question'', now(), new__creation_user, null, - new__context_id + new__context_id, + ''t'', + new__question_text, + v_package_id ); insert into survey_questions @@ -262,14 +280,20 @@ new__context_id alias for $16; -- default null new__pretty_id alias for $17; v_question_id integer; + v_package_id integer; begin + select package_id into v_package_id from acs_objects where object_id = new__section_id; + v_question_id := acs_object__new ( new__question_id, ''survey_question'', now(), new__creation_user, null, - new__context_id + new__context_id, + ''t'', + new__question_text, + v_package_id ); insert into survey_questions @@ -324,14 +348,20 @@ new__context_id alias for $7; -- default null new__initial_response_id alias for $8; -- default null v_response_id integer; + v_package_id integer; begin + select package_id into v_package_id from surveys where survey_id = new__survey_id; + v_response_id := acs_object__new ( new__response_id, ''survey_response'', now(), new__creation_user, new__creation_ip, - new__context_id + new__context_id, + ''t'', + new__title, + v_package_id ); insert into survey_responses Index: openacs-4/contrib/packages/survey/sql/postgresql/upgrade/upgrade-5.2.0d1-5.2.0d2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/sql/postgresql/upgrade/Attic/upgrade-5.2.0d1-5.2.0d2.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/survey/sql/postgresql/upgrade/upgrade-5.2.0d1-5.2.0d2.sql 26 Mar 2005 18:17:22 -0000 1.1 @@ -0,0 +1,280 @@ +-- API for survey objects +select define_function_args('survey__new','survey_id,name,description,description_html_p;f,single_response_p;f,editable_p;f,enabled_p;f,single_section_p;t,type;general,display_type,package_id,public_p,creation_user,context_id'); + +create or replace function survey__new (integer,varchar,text,boolean,boolean,boolean,boolean,boolean,varchar,varchar,integer,boolean,integer,integer) +returns integer as ' +declare + new__survey_id alias for $1; -- default null + new__name alias for $2; + new__description alias for $3; + new__description_html_p alias for $4; -- default f + new__single_response_p alias for $5; -- default f + new__editable_p alias for $6; -- default t + new__enabled_p alias for $7; -- default f + new__single_section_p alias for $8; -- default t + new__type alias for $9; -- default general + new__display_type alias for $10; + new__package_id alias for $11; + new__public_p alias for $12; -- default t + new__creation_user alias for $13; -- default null + new__context_id alias for $14; -- default null + v_survey_id integer; +begin + v_survey_id := acs_object__new ( + new__survey_id, + ''survey'', + now(), + new__creation_user, + null, + new__context_id, + ''t'', + new__name, + new__package_id + ); + + insert into surveys + (survey_id, name, description, + description_html_p, single_response_p, editable_p, + enabled_p, single_section_p, type, display_type, package_id, public_p) + values + (v_survey_id, new__name, new__description, + new__description_html_p, new__single_response_p, new__editable_p, + new__enabled_p, new__single_section_p, new__type, new__display_type, new__package_id, new__public_p); + + return v_survey_id; + +end;' language 'plpgsql'; + + + +-- API for survey_section objects +select define_function_args('survey_section__new','section_id,survey_id,name,description,description_html_p;f,sort_key;0,branch_p;f,branched_p;f,block_section_p;f,page_break_p;t,creation_user,context_id,pretty_id'); +create or replace function survey_section__new (integer,integer,varchar,text,boolean,integer,boolean,boolean,boolean,boolean,integer,integer,integer) +returns integer as ' +declare + new__section_id alias for $1; -- default null + new__survey_id alias for $2; -- default null + new__name alias for $3; -- default null + new__description alias for $4; -- default null + new__description_html_p alias for $5; -- default f + new__sort_key alias for $6; -- default 0 + new__branch_p alias for $7; -- default f + new__branched_p alias for $8; -- default f + new__block_section_p alias for $9; -- default f + new__page_break_p alias for $10; -- default t + new__creation_user alias for $11; -- default null + new__context_id alias for $12; -- default null + new__pretty_id alias for $13; + v_section_id integer; + v_package_id integer; +begin + select package_id into v_package_id from surveys where survey_id = new__survey_id; + + v_section_id := acs_object__new ( + new__section_id, + ''survey_section'', + now(), + new__creation_user, + null, + new__context_id, + ''t'', + new__name, + v_package_id + ); + + insert into survey_sections + (section_id, survey_id, name, description, description_html_p, sort_key, branch_p, branched_p, page_break_p, block_section_p,pretty_id) + values + (v_section_id, new__survey_id, new__name, new__description, new__description_html_p, new__sort_key, new__branch_p, new__branched_p, new__page_break_p, new__block_section_p, new__pretty_id); + + return v_section_id; + +end;' language 'plpgsql'; + +-- API for predefined questions + +create or replace function survey_predefined_question__new (integer,text,varchar,varchar,varchar,varchar,boolean,varchar,varchar,text,varchar,varchar,varchar,integer,integer) +returns integer as ' +declare + new__predefined_question_id alias for $1; -- default null + new__question_text alias for $2; -- default null + new__abstract_data_type alias for $3; -- default null + new__presentation_type alias for $4; -- default null + new__presentation_options alias for $5; -- default null + new__presentation_alignment alias for $6; -- default below + new__question_html_p alias for $7; -- default f + new__summary_type alias for $8; + new__action_type alias for $9; -- default null + new__tcl alias for $10; -- default null + new__table_name alias for $11; -- default null + new__column_name alias for $12; -- default null + new__key_name alias for $13; -- default null + new__creation_user alias for $14; -- default null + new__context_id alias for $15; -- default null + v_predefined_question_id survey_predefined_questions.predefined_question_id%TYPE; +begin + v_predefined_question_id := acs_object__new ( + new__predefined_question_id, + ''survey_predefined_question'', + now(), + new__creation_user, + null, + new__context_id, + ''t'', + new__question_text, + null + ); + + insert into survey_predefined_questions + (predefined_question_id,question_text,abstract_data_type,presentation_type,presentation_options,presentation_alignment,question_html_p,summary_type,action_type,tcl,table_name,column_name,key_name) + values + (v_predefined_question_id,new__question_text,new__abstract_data_type,new__presentation_type,new__presentation_options,new__presentation_alignment,new__question_html_p,new__summary_type,new__action_type,new__tcl,new__table_name,new__column_name,new__key_name); + + return v_predefined_question_id; + +end;' language 'plpgsql'; + +-- API for Survey questions +create or replace function survey_question__new (integer,integer,integer,text,varchar,boolean,boolean,varchar,varchar,varchar,boolean,varchar,varchar,integer,integer,integer) +returns integer as ' +declare + new__question_id alias for $1; -- default null + new__section_id alias for $2; -- default null + new__sort_order alias for $3; -- default null + new__question_text alias for $4; -- default null + new__abstract_data_type alias for $5; -- default null + new__required_p alias for $6; -- default t + new__active_p alias for $7; -- default + new__presentation_type alias for $8; -- default null + new__presentation_options alias for $9; -- default null + new__presentation_alignment alias for $10; -- default below + new__question_html_p alias for $11; -- default f + new__summary_type alias for $12; + new__answer_description alias for $13; + new__predefined_question_id alias for $14; -- default null + new__creation_user alias for $15; -- default null + new__context_id alias for $16; -- default null + v_question_id integer; + v_package_id integer; +begin + select package_id into v_package_id from acs_objects where object_id = new__section_id; + + v_question_id := acs_object__new ( + new__question_id, + ''survey_question'', + now(), + new__creation_user, + null, + new__context_id, + ''t'', + new__question_text, + v_package_id + ); + + insert into survey_questions + (question_id, section_id, sort_order, question_text, + abstract_data_type, required_p, active_p, + presentation_type, presentation_options, + presentation_alignment, predefined_question_id) + values + (v_question_id, new__section_id, new__sort_order, new__question_text, + new__abstract_data_type, new__required_p, new__active_p, + new__presentation_type, new__presentation_options, + new__presentation_alignment, new__predefined_question_id); + + return v_question_id; + +end;' language 'plpgsql'; + + +select define_function_args('survey_question__new','question_id,section_id,sort_order,question_text,abstract_data_type,required_p;t,active_p,presentation_type,presentation_options,presentation_alignment;below,question_html_p;f,summary_type,answer_description,predefined_qustion_id,creation_user,context_id,pretty_id'); +create or replace function survey_question__new (integer,integer,integer,text,varchar,boolean,boolean,varchar,varchar,varchar,boolean,varchar,varchar,integer,integer,integer,integer) +returns integer as ' +declare + new__question_id alias for $1; -- default null + new__section_id alias for $2; -- default null + new__sort_order alias for $3; -- default null + new__question_text alias for $4; -- default null + new__abstract_data_type alias for $5; -- default null + new__required_p alias for $6; -- default t + new__active_p alias for $7; -- default + new__presentation_type alias for $8; -- default null + new__presentation_options alias for $9; -- default null + new__presentation_alignment alias for $10; -- default below + new__question_html_p alias for $11; -- default f + new__summary_type alias for $12; + new__answer_description alias for $13; + new__predefined_question_id alias for $14; -- default null + new__creation_user alias for $15; -- default null + new__context_id alias for $16; -- default null + new__pretty_id alias for $17; + v_question_id integer; + v_package_id integer; +begin + select package_id into v_package_id from acs_objects where object_id = new__section_id; + + v_question_id := acs_object__new ( + new__question_id, + ''survey_question'', + now(), + new__creation_user, + null, + new__context_id, + ''t'', + new__question_text, + v_package_id + ); + + insert into survey_questions + (question_id, section_id, sort_order, question_text, + abstract_data_type, required_p, active_p, + presentation_type, presentation_options, + presentation_alignment, predefined_question_id,pretty_id) + values + (v_question_id, new__section_id, new__sort_order, new__question_text, + new__abstract_data_type, new__required_p, new__active_p, + new__presentation_type, new__presentation_options, + new__presentation_alignment, new__predefined_question_id,new__pretty_id); + + return v_question_id; + +end;' language 'plpgsql'; + +-- API for survey responses + +create or replace function survey_response__new(integer,integer,varchar,boolean,integer,varchar,integer,integer) +returns integer as ' +declare + new__response_id alias for $1; -- default null + new__survey_id alias for $2; -- default null + new__title alias for $3; -- default null + new__notify_on_comment_p alias for $4; -- default f + new__creation_user alias for $5; -- default null + new__creation_ip alias for $6; -- default null + new__context_id alias for $7; -- default null + new__initial_response_id alias for $8; -- default null + v_response_id integer; + v_package_id integer; +begin + select package_id into v_package_id from surveys where survey_id = new__survey_id; + + v_response_id := acs_object__new ( + new__response_id, + ''survey_response'', + now(), + new__creation_user, + new__creation_ip, + new__context_id, + ''t'', + new__title, + v_package_id + ); + + insert into survey_responses + (response_id, survey_id, title, notify_on_comment_p, initial_response_id) + values + (v_response_id, new__survey_id, new__title, new__notify_on_comment_p, new__initial_response_id); + + return v_response_id; + +end;' language 'plpgsql'; Index: openacs-4/contrib/packages/survey/tcl/survey-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/tcl/Attic/survey-install-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/survey/tcl/survey-install-procs.tcl 26 Mar 2005 18:17:22 -0000 1.1 @@ -0,0 +1,105 @@ +ad_library { + Setup procedures for survey + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + @arch-tag: 1ed1eb73-3cbf-463e-bb0c-d798c81bc9f0 + @cvs-id $Id: survey-install-procs.tcl,v 1.1 2005/03/26 18:17:22 jeffd Exp $ +} + +namespace eval ::survey::install {} + +ad_proc -public ::survey::install::package_install { +} { + Procedure sets up survey package details that need to be run once + when the package is initially installed. + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + + @return + + @error +} { + survey::install::register_search_sc +} + + +ad_proc -private survey::install::register_search_sc { +} { + Setup search service contract + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-07-26 + + @return + + @error +} { + + foreach spec { + { + name "survey" + aliases { + datasource survey::search::survey::datasource + url survey::search::survey::url + } + contract_name {FtsContentProvider} + owner "survey" + } + { + name "survey_section" + aliases { + datasource survey::search::section::datasource + url survey::search::section::url + } + contract_name {FtsContentProvider} + owner "survey" + } + { + name "survey_question" + aliases { + datasource survey::search::question::datasource + url survey::search::question::url + } + contract_name {FtsContentProvider} + owner "survey" + } + } { + acs_sc::impl::new_from_spec -spec $spec + } +} + +ad_proc -private ::survey::install::unregister_search_sc { +} { + Remove service contacts for uninstall + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + + @return + + @error +} { + foreach contract {survey survey_section survey_question} { + acs_sc::impl::delete \ + -contract_name FtsContentProvider \ + -impl_name $contract + } +} + +ad_proc -public ::survey::install::package_uninstall { +} { + Removes dependent objects that would prevent uninstall + that are not handled in the drop script. + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + + @return + + @error +} { + survey::install::unregister_search_sc +} + Index: openacs-4/contrib/packages/survey/tcl/survey-search-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/tcl/Attic/survey-search-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/survey/tcl/survey-search-procs.tcl 26 Mar 2005 18:17:22 -0000 1.1 @@ -0,0 +1,193 @@ +ad_library { + Search service contract implementations + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + @arch-tag: 05727441-9392-4d97-923b-bc5cf53a0b3d + @cvs-id $Id: survey-search-procs.tcl,v 1.1 2005/03/26 18:17:22 jeffd Exp $ +} + +namespace eval ::survey::search {} +namespace eval ::survey::search::survey {} +namespace eval ::survey::search::section {} +namespace eval ::survey::search::question {} + +ad_proc -public ::survey::search::survey::datasource { + object_id +} { + Provide datasource for FtsContentProvider service contract + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + + @param object_id + + @return + + @error +} { + + db_1row get_survey { + select o.object_id, + s.name as title, + s.description, + s.name || ' ' || s.description as content, + o.last_modified as pubdate, + 'text/plain' as mime, + 'text' as storage_type, + '' as keywords + from surveys s, acs_objects o + where s.survey_id=:object_id + and s.survey_id=o.object_id + } -column_array datasource + + return [array get datasource] +} + +ad_proc -public ::survey::search::survey::url { + object_id +} { + Generate URL for search service contract + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + + @param object_id + + @return + + @error +} { + set package_id [db_string get_package_id "select package_id from surveys where survey_id=:object_id"] + + array set sn [site_node::get_from_object_id -object_id $package_id] + + return "[export_vars -base $sn(url)/one-survey {{survey_id $object_id}}]" +} + + +ad_proc -public ::survey::search::section::datasource { + object_id +} { + Provide datasource for FtsContentProvider service contract + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + + @param object_id + + @return + + @error +} { + + set url [survey::search::survey::url $object_id] + db_1row get_survey_section { + select o.object_id, + s.name as title, + s.description, + o.last_modified as pubdate, + 'text/plain' as mime, + 'text' as storage_type, + '' as keywords, + (select email from acs_users_all where user_id = o.creation_user) as email + from survey_sections s, acs_objects o + where s.section_id=:object_id + and s.section_id=o.object_id} -column_array datasource + + return [list object_id $object_id \ + title $title \ + description $description \ + content "$title $description" \ + pubdate $pubdate \ + mime text/plain \ + storage_type text \ + keywords {} \ + syndication [list \ + link "[ad_url]$url" \ + description $title \ + author email \ + category Survey \ + guid "[ad_url]/o/$object_id" \ + pubDate $pubdate \ + ] ] \ + ] +} + +ad_proc -public ::survey::search::section::url { + object_id +} { + Generate URL for search service contract + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + + @param object_id is a section_id + + @return + + @error +} { + db_1row get_package_survey_ids { + select s.package_id, s.survey_id + from survey_sections ss, surveys s + where s.survey_id=ss.survey_id + and ss.section_id=:object_id + } + array set sn [site_node::get_from_object_id -object_id $package_id] + return "[export_vars -base $sn(url)admin/one {survey_id}]\#$object_id" +} + + +ad_proc -public ::survey::search::question::datasource { + object_id +} { + Provide datasource for FtsContentProvider service contract + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + + @param object_id is a question_id + + @return +} { + + db_1row get_survey_question {select o.object_id, + sq.question_text as title, + sq.question_text as description, + sq.question_text as content, + o.last_modified as pubdate, + 'text/plain' as mime, + 'text' as storage_type, + '' as keywords + from survey_questions sq, acs_objects o + where sq.question_id=:object_id + and sq.question_id=o.object_id} -column_array datasource + return [array get datasource] +} + +ad_proc -public ::survey::search::question::url { + object_id +} { + Generate URL for search service contract + + @author Dave Bauer (dave@thedesignexperience.org) + @creation-date 2004-09-17 + + @param object_id + + @return + + @error +} { + db_1row get_package_and_survey_ids { + select s.survey_id, s.package_id + from survey_questions sq, survey_sections ss, surveys s + where s.survey_id=ss.survey_id + and ss.section_id=sq.section_id + and sq.question_id=:object_id} + + array set sn [site_node::get_from_object_id -object_id $package_id] + + return "[export_vars -base $sn(url)admin/one {survey_id}]\#$object_id" +} Index: openacs-4/contrib/packages/survey/www/one-survey-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/Attic/one-survey-oracle.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/survey/www/one-survey-oracle.xql 19 Sep 2003 16:48:03 -0000 1.1 +++ openacs-4/contrib/packages/survey/www/one-survey-oracle.xql 26 Mar 2005 18:17:22 -0000 1.2 @@ -6,7 +6,7 @@ -select s.survey_id, s.name, s.editable_p, s.single_response_p, +select s.survey_id, s.name, s.editable_p, s.single_response_p, s.description, sr.response_id, sr.creation_date from surveys s ,(select survey_id, response_id, creation_date from survey_responses_latest Index: openacs-4/contrib/packages/survey/www/one-survey-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/Attic/one-survey-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/survey/www/one-survey-postgresql.xql 19 Sep 2003 16:48:03 -0000 1.1 +++ openacs-4/contrib/packages/survey/www/one-survey-postgresql.xql 26 Mar 2005 18:17:22 -0000 1.2 @@ -6,7 +6,7 @@ -select s.survey_id, s.name, s.editable_p, s.single_response_p, +select s.survey_id, s.name, s.editable_p, s.description, s.single_response_p, sr.response_id, sr.creation_date from surveys s left outer join (select survey_id, response_id, creation_date Index: openacs-4/contrib/packages/survey/www/one-survey.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/Attic/one-survey.adp,v diff -u -N -r1.3 -r1.4 --- openacs-4/contrib/packages/survey/www/one-survey.adp 16 Mar 2005 12:26:31 -0000 1.3 +++ openacs-4/contrib/packages/survey/www/one-survey.adp 26 Mar 2005 18:17:22 -0000 1.4 @@ -1,32 +1,34 @@ -#survey.Surveys# -@context;noquote@ -

Admin

-
    - - -
  • @survey_details.name@ - Answer Survey - Answer Survey -
  • - + #survey.Surveys# + @context;noquote@ + @survey_id@ +

    Admin

    +
      + +
    • @survey_details.name@

      + Answer Survey + Answer Survey +

      @survey_details.description@

      +
    • + +

      Past responses

      -
        -
      • Previous response on: @survey_details.creation_date@ - View Response - - Edit Response +
          +
        • Answered on @survey_details.creation_date@ + View Response + + Edit Response
        • -
        +
      -
      -
      - -
    +
    +
    +
+ Index: openacs-4/contrib/packages/survey/www/one-survey.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/Attic/one-survey.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/contrib/packages/survey/www/one-survey.tcl 16 Mar 2005 12:26:31 -0000 1.3 +++ openacs-4/contrib/packages/survey/www/one-survey.tcl 26 Mar 2005 18:17:22 -0000 1.4 @@ -23,7 +23,9 @@ set admin_p [ad_permission_p $survey_id admin] -db_multirow survey_details get_survey_details {} +db_multirow survey_details get_survey_details {} { + set creation_date [lc_time_fmt $creation_date "%x %X"] +} ad_return_template Index: openacs-4/contrib/packages/survey/www/admin/one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/one.adp,v diff -u -N -r1.5 -r1.6 --- openacs-4/contrib/packages/survey/www/admin/one.adp 23 Mar 2005 22:23:40 -0000 1.5 +++ openacs-4/contrib/packages/survey/www/admin/one.adp 26 Mar 2005 18:17:23 -0000 1.6 @@ -1,235 +1,223 @@ -@survey_id;noquote@ + @survey_id;noquote@ -One Survey: @survey_info.name_unquoted;noquote@ -@context;noquote@ + One Survey: @survey_info.name_unquoted;noquote@ + @context;noquote@ + @survey_id@ -

#survey.Created_by# @survey_info.creator_name@#survey._on_creation_date#

+

#survey.Created_by# @survey_info.creator_name@#survey._on_creation_date#

- - - - - +
#survey.This_survey_is# - @survey_info.enabled_display@ - @survey_info.enabled_display@ - . - @toggle_enabled_text@ -
+ + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - <% # removed Display types, we use styles now - # - # - # - # - %> - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - -
#survey.This_survey_is# + @survey_info.enabled_display@ + @survey_info.enabled_display@ + . - @toggle_enabled_text@ +
#survey.Survey_Name#

- #survey.Description#

- - Preview - - - Edit - - @survey_info.name;noquote@

- @survey_info.description;noquote@ -

#survey.View_Responses# - #survey.By_user# | - #survey.Summary# | - #survey.lt_CSV_file_with_anonymo# | - #survey.lt_CSV_file_without_anon# -
#survey.Import_Responses# - - #survey.lt_Import_responses_from# - - -
#survey.Sectioning# - - #survey.lt_Survey_is_not_section# #survey.Make_sectioned# ] - - - #survey.lt_Survey_is_sectioned_-# #survey.lt_Compress_to_single_se# ] - -
#survey.Status_Bar# - [ - #survey.No_Status_Bar# - #survey.No_Status_Bar# - | - #survey.Blue# - #survey.Blue# - | - #survey.Red# - #survey.Red# - | - #survey.Green# - #survey.Green# - | - #survey.Yellow# - #survey.Yellow# - ] -
#survey.Survey_Name#

+ #survey.Description#

+ + Preview + + + Edit + + @survey_info.name;noquote@

+ @survey_info.description;noquote@ +

#survey.View_Responses# + #survey.By_user# | + #survey.Summary# | + #survey.lt_CSV_file_with_anonymo# | + #survey.lt_CSV_file_without_anon# +
#survey.Import_Responses# + + #survey.lt_Import_responses_from# + + +
#survey.Sectioning# + + #survey.lt_Survey_is_not_section# #survey.Make_sectioned# ] + + + #survey.lt_Survey_is_sectioned_-# #survey.lt_Compress_to_single_se# ] + +
#survey.Status_Bar# + [ + #survey.No_Status_Bar# + #survey.No_Status_Bar# + | + #survey.Blue# + #survey.Blue# + | + #survey.Red# + #survey.Red# + | + #survey.Green# + #survey.Green# + | + #survey.Yellow# + #survey.Yellow# + ] +
- #survey.Style# - - -
- #survey.Response_Options# - @survey_info.single_response_display@ - [ - @response_limit_toggle@ ] -
- #survey.lt_Users_may_edit_their_# - #survey.lt_Users_may_not_edit_th# - [ - #survey.make# - #survey.non-# - #survey.editable# - ] -
#survey.Display_Options# @survey_info.display_type@ - - # - # - # [@survey_display_types:item@] - # - # - #
#survey.Accessibility# - #survey.Public# - #survey.Not_public# - [#survey.Toggle#] -
#survey.Email_Options#@notification_chunk;noquote@
+ #survey.Style# + + +
#survey.Send_bulk_mail# #survey.lt_regarding_this_survey#
Report CreationManage Report
-
#survey.Extreme_Actions# - #survey.Delete_this_survey# #survey.lt_-_Removes_all_questio#
- #survey.Copy_this_survey# #survey.lt_-_Lets_you_use_this_s# -
+ + + #survey.Response_Options# + + @survey_info.single_response_display@ - [ + @response_limit_toggle@ ] + + -
+ + + #survey.lt_Users_may_edit_their_# + #survey.lt_Users_may_not_edit_th# - [ + #survey.make# + #survey.non-# + #survey.editable# + ] + + - - - @sections.name@ - (@sections.section_pretty_id@) - EditDelete - @sections.branch_text;noquote@ - -
  #survey.Questions# + + #survey.Accessibility# + + #survey.Public# + #survey.Not_public# - [#survey.Toggle#] + + - - - - - - + + + - - - - + + - + + + + + + + + + + + +
#survey.add_new_question#
#survey.Email_Options#@notification_chunk;noquote@
#survey.Send_bulk_mail# #survey.lt_regarding_this_survey#
Report CreationManage Report
+
#survey.Extreme_Actions# + #survey.Delete_this_survey# #survey.lt_-_Removes_all_questio#
+ #survey.Copy_this_survey# #survey.lt_-_Lets_you_use_this_s# +
- @sections.rownum@. (@sections.question_pretty_id@) +
- -Edit + + + @sections.name@ + (@sections.section_pretty_id@) + EditDelete + @sections.branch_text;noquote@ + +
  #survey.Questions# -#survey.inactive# -Copy -Add New -Move Down -Move UpDelete + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + -
#survey.add_new_question#
-
@sections.question_text;noquote@ - - -@formgroup.widget;noquote@ @formgroup.label;noquote@ - - - - - -
-
#survey.No_Questions#
#survey.add_new_question#
-
-
-#survey.add_new_section# + @sections.rownum@. (@sections.question_pretty_id@) + + Edit + #survey.inactive# + Copy + Add New + Move Down + Move UpDelete + + + + + + + + +
@sections.question_text;noquote@ + + + @formgroup.widget;noquote@ @formgroup.label;noquote@ + + + + + +
+ + + #survey.No_Questions# + + + + + + + + + #survey.add_new_question# + + +
+
+ #survey.add_new_section# + +