Index: openacs-4/packages/simple-survey/sql/oracle/simple-survey-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/sql/oracle/simple-survey-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/simple-survey/sql/oracle/simple-survey-create.sql 11 Feb 2002 07:10:48 -0000 1.2 +++ openacs-4/packages/simple-survey/sql/oracle/simple-survey-create.sql 15 Mar 2002 05:26:42 -0000 1.3 @@ -129,6 +129,7 @@ constraint survsimp_surv_single_edit_p_ck check(single_editable_p in ('t','f')), type varchar(20), + display_type varchar(20), package_id integer constraint survsimp_package_id_nn not null constraint survsimp_package_id_fk references @@ -328,6 +329,8 @@ single_editable_p in survsimp_surveys.single_editable_p%TYPE default 't', enabled_p in survsimp_surveys.enabled_p%TYPE default 'f', type in survsimp_surveys.type%TYPE default 'general', + display_type in survsimp_surveys.display_type%TYPE + default 'list', package_id in survsimp_surveys.package_id%TYPE, object_type in acs_objects.object_type%TYPE default 'survsimp_survey', creation_date in acs_objects.creation_date%TYPE default sysdate, @@ -355,6 +358,8 @@ single_editable_p in survsimp_surveys.single_editable_p%TYPE default 't', enabled_p in survsimp_surveys.enabled_p%TYPE default 'f', type in survsimp_surveys.type%TYPE default 'general', + display_type in survsimp_surveys.display_type%TYPE + default 'list', package_id in survsimp_surveys.package_id%TYPE, object_type in acs_objects.object_type%TYPE default 'survsimp_survey', creation_date in acs_objects.creation_date%TYPE default sysdate, @@ -375,10 +380,10 @@ ); insert into survsimp_surveys (survey_id, name, short_name, description, description_html_p, - single_response_p, single_editable_p, enabled_p, type, package_id) + single_response_p, single_editable_p, enabled_p, type, display_type, package_id) values (v_survey_id, new.name, new.short_name, new.description, new.description_html_p, - new.single_response_p, new.single_editable_p, new.enabled_p, new.type, new.package_id); + new.single_response_p, new.single_editable_p, new.enabled_p, new.type, new.display_type, new.package_id); return v_survey_id; end new; Index: openacs-4/packages/simple-survey/sql/postgresql/simple-survey-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/sql/postgresql/simple-survey-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simple-survey/sql/postgresql/simple-survey-create.sql 19 Jul 2001 22:40:55 -0000 1.1 +++ openacs-4/packages/simple-survey/sql/postgresql/simple-survey-create.sql 15 Mar 2002 05:26:42 -0000 1.2 @@ -179,7 +179,8 @@ single_editable_p boolean, -- was char(1) -- constraint survsimp_surv_single_edit_p_ck -- check(single_editable_p in ('t','f')), - type varchar(20) + type varchar(20), + display_type varchar(20), ); -- each question can be @@ -421,7 +422,7 @@ -- create or replace package body survsimp_survey -- procedure new -create function survsimp_survey__new (integer,varchar,varchar,text,boolean,boolean,boolean,boolean,varchar,integer,integer) +create function survsimp_survey__new (integer,varchar,varchar,text,boolean,boolean,boolean,boolean,varchar,varchar,integer,integer) returns integer as ' declare new__survey_id alias for $1; -- default null @@ -433,8 +434,9 @@ new__single_editable_p alias for $7; -- default t new__enabled_p alias for $8; -- default f new__type alias for $9; -- default general - new__creation_user alias for $10; -- default null - new__context_id alias for $11; -- default null + new__display_type alias for $10; + new__creation_user alias for $11; -- default null + new__context_id alias for $12; -- default null v_survey_id integer; begin v_survey_id := acs_object__new ( @@ -449,11 +451,11 @@ insert into survsimp_surveys (survey_id, name, short_name, description, description_html_p, single_response_p, single_editable_p, - enabled_p, type) + enabled_p, type, display_type) values (v_survey_id, new__name, new__short_name, new__description, new__description_html_p, new__single_response_p, new__single_editable_p, - new__enabled_p, new__type); + new__enabled_p, new__type, new__display_type); return v_survey_id; Index: openacs-4/packages/simple-survey/tcl/survsimp-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/tcl/survsimp-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/simple-survey/tcl/survsimp-procs.tcl 1 Jul 2001 18:57:49 -0000 1.3 +++ openacs-4/packages/simple-survey/tcl/survsimp-procs.tcl 15 Mar 2002 05:26:42 -0000 1.4 @@ -446,6 +446,25 @@ return $date } + +ad_proc -public survsimp_display_types { +} { + return {list table paragraph} +} + +# added by Ben (far later than the code below, bt_mergepice, OMG) +ad_proc -public survsimp_display_type_select { + {-name "display_type"} + {-value "list"} +} { + set return_html "" + + return $return_html +} proc_doc survsimp_bt_mergepiece {htmlpiece values} { HTMLPIECE is a form usually; VALUES is an ns_set Index: openacs-4/packages/simple-survey/www/admin/one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/www/admin/one.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simple-survey/www/admin/one.adp 25 Feb 2002 20:28:14 -0000 1.1 +++ openacs-4/packages/simple-survey/www/admin/one.adp 15 Mar 2002 05:26:42 -0000 1.2 @@ -7,6 +7,7 @@