Index: openacs-4/packages/assessment/www/asm-admin/results-export-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-export-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/asm-admin/results-export-oracle.xql 15 Apr 2005 17:26:46 -0000 1.1 +++ openacs-4/packages/assessment/www/asm-admin/results-export-oracle.xql 18 Apr 2005 11:02:28 -0000 1.2 @@ -2,10 +2,17 @@ oracle8.1.6 - + and s.completed_datetime >= $start_time + + + + + + + and trunc(s.completed_datetime) <= $end_time Index: openacs-4/packages/assessment/www/asm-admin/results-export-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-export-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/asm-admin/results-export-postgresql.xql 15 Apr 2005 17:26:46 -0000 1.1 +++ openacs-4/packages/assessment/www/asm-admin/results-export-postgresql.xql 18 Apr 2005 11:02:28 -0000 1.2 @@ -2,10 +2,17 @@ postgresql7.1 - + and s.completed_datetime >= $start_time + + + + + + + and date_trunc('day', s.completed_datetime) <= $end_time Index: openacs-4/packages/assessment/www/asm-admin/results-export.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-export.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/assessment/www/asm-admin/results-export.tcl 15 Apr 2005 17:26:46 -0000 1.5 +++ openacs-4/packages/assessment/www/asm-admin/results-export.tcl 18 Apr 2005 11:02:28 -0000 1.6 @@ -67,11 +67,14 @@ } } - if {![empty_string_p $start_time] && ![empty_string_p $end_time]} { - set date_sql [db_map restrict_completed_date] - } else { - set date_sql "" + set start_date_sql "" + set end_date_sql "" + if {![empty_string_p $start_time]} { + set start_date_sql [db_map restrict_start_date] } + if {![empty_string_p $end_time]} { + set end_date_sql [db_map restrict_end_date] + } set session_list "" db_foreach all_sessions {} { @@ -107,6 +110,7 @@ } } -after_submit { ns_set put [ad_conn outputheaders] Content-Disposition "attachment;filename=results.csv" - ns_return 200 "text/plain" "$csv_text"} + ns_return 200 "text/plain" "$csv_text" +} ad_return_template Index: openacs-4/packages/assessment/www/asm-admin/results-export.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-export.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/assessment/www/asm-admin/results-export.xql 15 Apr 2005 17:26:46 -0000 1.3 +++ openacs-4/packages/assessment/www/asm-admin/results-export.xql 18 Apr 2005 11:02:28 -0000 1.4 @@ -37,7 +37,8 @@ where s.session_id = sub.session_id and sub.subject_id = p.person_id and sub.subject_id = y.party_id - $date_sql + $start_date_sql + $end_date_sql order by s.session_id