Index: openacs-4/packages/evaluation/www/admin/evaluations/student-list-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/student-list-postgresql.xql,v diff -u -r1.10 -r1.11 --- openacs-4/packages/evaluation/www/admin/evaluations/student-list-postgresql.xql 10 Sep 2004 19:16:31 -0000 1.10 +++ openacs-4/packages/evaluation/www/admin/evaluations/student-list-postgresql.xql 12 Nov 2004 01:29:39 -0000 1.11 @@ -6,40 +6,30 @@ - select ese.party_id, + select ev.party_id, case when et.number_of_members = 1 then - (select last_name||', '||first_names from persons where person_id = ese.party_id) + (select last_name||', '||first_names from persons where person_id = ev.party_id) else - (select group_name from groups where group_id = ese.party_id) + (select group_name from groups where group_id = ev.party_id) end as party_name, - round(ese.grade,2) as grade, - ese.last_modified as evaluation_date, + round(ev.grade,2) as grade, + ev.last_modified as evaluation_date, et.online_p, et.due_date, - ese.evaluation_id + ev.evaluation_id from evaluation_tasks et, - evaluation_student_evalsi ese, + evaluation_student_evalsi ev, + $roles_table cr_items cri where et.task_id = :task_id - and et.task_item_id = ese.task_item_id - and cri.live_revision = ese.evaluation_id + and et.task_item_id = ev.task_item_id + $roles_clause + and cri.live_revision = ev.evaluation_id $orderby - - - - select count(party_id) - from evaluation_answers ea, cri_items cri - where ea.task_item_id = :task_item_id - $processed_clause - and cri.live_revision = ea.answer_id - - - - @@ -72,18 +62,6 @@ - - - - select count(*) - from evaluation_student_evals ese, evaluation_tasks et, cr_items cri - where ese.task_item_id = et.task_item_id - and et.task_id = :task_id - and cri.live_revision = ese.evaluation_id - - - - @@ -95,26 +73,28 @@ - select ea.party_id, + select ev.party_id, case when et.number_of_members = 1 then - (select last_name||', '||first_names from persons where person_id = ea.party_id) + (select last_name||', '||first_names from persons where person_id = ev.party_id) else - (select group_name from groups where group_id = ea.party_id) + (select group_name from groups where group_id = ev.party_id) end as party_name, - ea.party_id, - ea.data as answer_data, - ea.title as answer_title, - ea.revision_id, - to_char(ea.last_modified, 'YYYY-MM-DD HH24:MI:SS') as submission_date_ansi, + ev.party_id, + ev.data as answer_data, + ev.title as answer_title, + ev.revision_id, + to_char(ev.last_modified, 'YYYY-MM-DD HH24:MI:SS') as submission_date_ansi, et.due_date, - ea.last_modified as submission_date - from evaluation_answersi ea, + ev.last_modified as submission_date + from evaluation_answersi ev, evaluation_tasks et, + $roles_table cr_items cri - where ea.task_item_id = et.task_item_id + where ev.task_item_id = et.task_item_id and et.task_id = :task_id - and ea.data is not null - and cri.live_revision = ea.answer_id + and ev.data is not null + $roles_clause + and cri.live_revision = ev.answer_id $processed_clause $orderby_wa Index: openacs-4/packages/evaluation/www/admin/evaluations/student-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/student-list.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/evaluation/www/admin/evaluations/student-list.tcl 8 Oct 2004 16:22:20 -0000 1.15 +++ openacs-4/packages/evaluation/www/admin/evaluations/student-list.tcl 12 Nov 2004 01:29:39 -0000 1.16 @@ -42,6 +42,13 @@ set done_students [list] set evaluation_mode "display" +set roles_table "" +set roles_clause "" +if { ![empty_string_p $community_id] && $number_of_members == 1 } { + set roles_table [db_map roles_table_query] + set roles_clause [db_map roles_clause_query] +} + # # working with already evaluated parties # Index: openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql 10 Sep 2004 19:16:31 -0000 1.9 +++ openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql 12 Nov 2004 01:29:39 -0000 1.10 @@ -2,31 +2,30 @@ - - - - select count(*) from evaluation_task_groups where group_id not in ([join $done_students ","]) - - - - and etg.group_id not in ([join $done_students ","]) - - + + - select count(*) from evaluation_task_groups etg, evaluation_tasks et - where etg.task_item_id = et.task_item_id - and et.task_id = :task_id - $not_in_clause - - - + dotlrn_member_rels_approved app, + + + + + + + and app.community_id = :community_id + and app.user_id = ev.party_id + and app.role='student' + + + + where p.person_id not in ([join $done_students ","]) @@ -43,29 +42,6 @@ - - - - select count(*) from persons p - $not_in_clause - - - - - - - - select count(*) - from persons p, - dotlrn_member_rels_approved app - $not_in_clause - and app.community_id = :community_id - and app.user_id = p.person_id - and app.role = 'student' - - - -