Index: openacs-4/packages/assessment/www/session-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/session-oracle.xql,v
diff -u -r1.3 -r1.3.8.1
--- openacs-4/packages/assessment/www/session-oracle.xql 1 Dec 2008 16:57:02 -0000 1.3
+++ openacs-4/packages/assessment/www/session-oracle.xql 5 Oct 2021 09:51:36 -0000 1.3.8.1
@@ -12,19 +12,4 @@
-
-
- select * from (select max(o.creation_date), s.session_id
- from as_sessions s,
- acs_objects o,
- cr_revisions cr
- where s.subject_id=:user_id
- and s.assessment_id in (select revision_id from cr_revisions where item_id= :assessment_id)
- and o.object_id = cr.item_id
- and s.session_id = cr.revision_id
- group by assessment_id, subject_id, session_id)
- where rownum=1
-
-
-
Index: openacs-4/packages/assessment/www/session-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/session-postgresql.xql,v
diff -u -r1.2 -r1.2.8.1
--- openacs-4/packages/assessment/www/session-postgresql.xql 1 Dec 2008 16:57:02 -0000 1.2
+++ openacs-4/packages/assessment/www/session-postgresql.xql 5 Oct 2021 09:51:36 -0000 1.2.8.1
@@ -12,19 +12,4 @@
-
-
- select max(o.creation_date), s.session_id
- from as_sessions s,
- acs_objects o,
- cr_revisions cr
- where s.subject_id=:user_id
- and s.assessment_id in (select revision_id from cr_revisions where item_id= :assessment_id)
- and o.object_id = cr.item_id
- and s.session_id = cr.revision_id
- group by assessment_id, subject_id, session_id
- limit 1
-
-
-
Index: openacs-4/packages/assessment/www/session.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/session.tcl,v
diff -u -r1.44 -r1.44.2.1
--- openacs-4/packages/assessment/www/session.tcl 29 Jun 2018 17:27:18 -0000 1.44
+++ openacs-4/packages/assessment/www/session.tcl 5 Oct 2021 09:51:37 -0000 1.44.2.1
@@ -23,7 +23,18 @@
ad_script_abort
}
#find the latest session
- if {![db_0or1row get_latest_session "" -column_array latest_session]} {
+ if {![db_0or1row get_latest_session {
+ select max(o.creation_date), s.session_id
+ from as_sessions s,
+ acs_objects o,
+ cr_revisions cr
+ where s.subject_id=:user_id
+ and s.assessment_id in (select revision_id from cr_revisions where item_id= :assessment_id)
+ and o.object_id = cr.item_id
+ and s.session_id = cr.revision_id
+ group by assessment_id, subject_id, session_id
+ fetch first 1 rows only
+ } -column_array latest_session]} {
ad_return_complaint 1 "You have not completed this assessment yet."
ad_script_abort
}