Index: openacs-4/packages/survey/survey.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/survey.info,v
diff -u -r1.11.2.1 -r1.11.2.2
--- openacs-4/packages/survey/survey.info 9 Aug 2004 04:49:27 -0000 1.11.2.1
+++ openacs-4/packages/survey/survey.info 24 Aug 2004 21:42:32 -0000 1.11.2.2
@@ -7,7 +7,7 @@
f
f
-
+
Dave Bauer
Luke Pond
User defined surveys with reporting.
Index: openacs-4/packages/survey/sql/oracle/survey-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/sql/oracle/survey-package-create.sql,v
diff -u -r1.5 -r1.5.2.1
--- openacs-4/packages/survey/sql/oracle/survey-package-create.sql 11 Dec 2003 21:40:14 -0000 1.5
+++ openacs-4/packages/survey/sql/oracle/survey-package-create.sql 24 Aug 2004 21:42:32 -0000 1.5.2.1
@@ -468,9 +468,11 @@
-- this view contains only the most recently edited version
-- of each survey response.
+
create or replace view survey_responses_latest as
-select sr.*, o.creation_date,
- o.creation_user as initial_user_id
+select sr.*, o.creation_date,
+ o.creation_user,
+ survey_response.initial_user_id(sr.response_id) as initial_user_id
from survey_responses sr,
acs_objects o,
(select max(response_id) as response_id
Index: openacs-4/packages/survey/www/admin/respondents.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/respondents.xql,v
diff -u -r1.1 -r1.1.8.1
--- openacs-4/packages/survey/www/admin/respondents.xql 16 Sep 2002 00:00:24 -0000 1.1
+++ openacs-4/packages/survey/www/admin/respondents.xql 24 Aug 2004 21:42:33 -0000 1.1.8.1
@@ -3,22 +3,24 @@
+
select persons.first_names, persons.last_name,
- acs_objects.creation_user as user_id,
+ initial_user_id as user_id,
parties.email
from survey_responses_latest s,
persons,
parties,
acs_objects
where s.survey_id=:survey_id
and s.response_id = acs_objects.object_id
- and acs_objects.creation_user = persons.person_id
+ and initial_user_id = persons.person_id
and persons.person_id = parties.party_id
- group by acs_objects.creation_user,
+ group by initial_user_id,
parties.email,
persons.first_names,
persons.last_name
[ad_order_by_from_sort_spec $orderby $table_def]
+
Index: openacs-4/packages/survey/www/admin/view-text-responses-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/view-text-responses-oracle.xql,v
diff -u -r1.2 -r1.2.4.1
--- openacs-4/packages/survey/www/admin/view-text-responses-oracle.xql 23 Nov 2002 05:18:16 -0000 1.2
+++ openacs-4/packages/survey/www/admin/view-text-responses-oracle.xql 24 Aug 2004 21:42:33 -0000 1.2.4.1
@@ -4,21 +4,22 @@
- select
- $column_name as response,
- person.name(o.creation_user) as respondent_name,
- o.creation_date as submission_date,
- o.creation_user,
- o.creation_ip as ip_address
- from
- survey_responses r,
- survey_question_responses qr,
- acs_objects o
- where
- qr.response_id = r.response_id
- and qr.question_id = :question_id
- and o.object_id = qr.response_id
- order by submission_date
+ select
+ $column_name as response,
+ person.name(initial_user_id) as respondent_name,
+ o.creation_date as submission_date,
+ o.creation_user,
+ o.creation_ip as ip_address
+ from
+ survey_responses_latest r,
+ survey_question_responses qr,
+ acs_objects o
+ where
+ qr.response_id = r.response_id
+ and qr.question_id = :question_id
+ and o.object_id = initial_user_id
+ order by submission_date
+