Index: openacs-4/packages/assessment/www/sessions-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/sessions-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/www/sessions-oracle.xql 22 Dec 2004 20:52:17 -0000 1.2 +++ openacs-4/packages/assessment/www/sessions-oracle.xql 28 Dec 2004 19:04:59 -0000 1.3 @@ -5,29 +5,29 @@ - SELECT s.session_id, s.name, s.title, s.completed_datetime, s.percent_score, + SELECT s.session_id, s.completed_datetime, s.percent_score, p.first_names || ' ' || p.last_name AS subject_name, - a.title AS assessment_name, s.subject_id - FROM as_sessionsx s, as_assessmentsx a, persons p - WHERE s.assessment_id = :assessment_rev_id - AND s.assessment_id = a.assessment_id + r.title AS assessment_name, s.subject_id + FROM as_sessions s, cr_revisions r, persons p + WHERE s.assessment_id = r.revision_id AND s.subject_id = p.person_id + AND s.subject_id = :subject_id + AND r.item_id = :assessment_id ORDER BY s.completed_datetime desc, s.creation_datetime desc - + - SELECT s.session_id, s.name, s.title, s.completed_datetime, s.percent_score, + SELECT s.session_id, s.completed_datetime, s.percent_score, p.first_names || ' ' || p.last_name AS subject_name, - a.title AS assessment_name, s.subject_id - FROM as_sessionsx s, as_assessmentsx a, persons p - WHERE s.assessment_id = :assessment_rev_id - AND s.assessment_id = a.assessment_id + r.title AS assessment_name, s.subject_id + FROM as_sessions s, cr_revisions r, persons p + WHERE s.assessment_id = r.revision_id AND s.subject_id = p.person_id - AND s.subject_id = :subject_id + AND r.item_id = :assessment_id ORDER BY s.completed_datetime desc, s.creation_datetime desc - + Index: openacs-4/packages/assessment/www/sessions-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/sessions-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/assessment/www/sessions-postgresql.xql 22 Dec 2004 20:52:17 -0000 1.4 +++ openacs-4/packages/assessment/www/sessions-postgresql.xql 28 Dec 2004 19:04:59 -0000 1.5 @@ -5,25 +5,27 @@ - SELECT s.session_id, s.name, s.title, s.completed_datetime, s.percent_score, + SELECT s.session_id, s.completed_datetime, s.percent_score, p.first_names || ' ' || p.last_name AS subject_name, - a.title AS assessment_name, s.subject_id - FROM as_sessionsx s INNER JOIN as_assessmentsx a USING (assessment_id) - INNER JOIN persons p ON (s.subject_id = p.person_id) - WHERE s.assessment_id = :assessment_rev_id + r.title AS assessment_name, s.subject_id + FROM as_sessions s, cr_revisions r, persons p + WHERE s.assessment_id = r.revision_id + AND s.subject_id = p.person_id AND s.subject_id = :subject_id + AND r.item_id = :assessment_id ORDER BY s.completed_datetime desc, s.creation_datetime desc - SELECT s.session_id, s.name, s.title, s.completed_datetime, s.percent_score, + SELECT s.session_id, s.completed_datetime, s.percent_score, p.first_names || ' ' || p.last_name AS subject_name, - a.title AS assessment_name, s.subject_id - FROM as_sessionsx s INNER JOIN as_assessmentsx a USING (assessment_id) - INNER JOIN persons p ON (s.subject_id = p.person_id) - WHERE s.assessment_id = :assessment_rev_id + r.title AS assessment_name, s.subject_id + FROM as_sessions s, cr_revisions r, persons p + WHERE s.assessment_id = r.revision_id + AND s.subject_id = p.person_id + AND r.item_id = :assessment_id ORDER BY s.completed_datetime desc, s.creation_datetime desc