Index: openacs-4/packages/evaluation/lib/tasks-chunk-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/Attic/tasks-chunk-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/lib/tasks-chunk-oracle.xql 7 Apr 2005 11:26:58 -0000 1.3 +++ openacs-4/packages/evaluation/lib/tasks-chunk-oracle.xql 22 Nov 2017 11:33:32 -0000 1.4 @@ -3,66 +3,6 @@ oracle8.1.6 - - - select et.task_name, et.number_of_members, et.task_id, - to_char(et.due_date,'YYYY-MM-DD HH24:MI:SS') as due_date_ansi, - et.online_p, - et.late_submit_p, - et.task_item_id, - et.item_id, - et.requires_grade_p, et.description, et.grade_item_id, - nvl(round(cr.content_length/1024,0),0) as content_length, - cr.filename as task_data, - crmt.label as pretty_mime_type, - cr.title as task_title, - et.task_id as revision_id - from cr_revisions cr, - evaluation_tasksi et, - cr_items cri, - cr_mime_types crmt - where cr.revision_id = et.revision_id - and et.grade_item_id = :grade_item_id - and cri.live_revision = et.task_id - and et.mime_type = crmt.mime_type - $assignments_orderby - - - - - - select et.task_name, et.number_of_members, et.task_id, - to_char(et.due_date,'YYYY-MM-DD HH24:MI:SS') as due_date_ansi, - et.online_p, - et.late_submit_p, - et.item_id, - et.task_item_id, - et.due_date, - et.requires_grade_p, et.description, et.grade_item_id, - cr.title as task_title, - cr.filename task_data, - et.task_id as revision_id, - nvl(round(cr.content_length/1024,0),0) as content_length, - et.late_submit_p, - crmt.label as pretty_mime_type - from cr_revisions cr, - evaluation_tasksi et, - cr_items cri, - cr_mime_types crmt - where cr.revision_id = et.revision_id - and grade_item_id = :grade_item_id - and cri.live_revision = et.task_id - and et.mime_type = crmt.mime_type - $assignments_orderby - - - - - - select 1 from dual where :due_date_ansi > to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') - - - select evaluation.party_id(:user_id,:task_id) from dual Index: openacs-4/packages/evaluation/lib/tasks-chunk-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/Attic/tasks-chunk-postgresql.xql,v diff -u -r1.14 -r1.15 --- openacs-4/packages/evaluation/lib/tasks-chunk-postgresql.xql 31 Mar 2005 11:09:27 -0000 1.14 +++ openacs-4/packages/evaluation/lib/tasks-chunk-postgresql.xql 22 Nov 2017 11:33:32 -0000 1.15 @@ -3,34 +3,6 @@ postgresql7.3 - - - - select et.task_name, et.number_of_members, et.task_id, - to_char(et.due_date,'YYYY-MM-DD HH24:MI:SS') as due_date_ansi, - et.online_p, - et.late_submit_p, - et.task_item_id, - et.item_id, - et.requires_grade_p, et.description, et.grade_item_id, - coalesce(round(cr.content_length/1024,0),0) as content_length, - et.data as task_data, - crmt.label as pretty_mime_type, - cr.title as task_title, - et.task_id as revision_id - from cr_revisions cr, - evaluation_tasksi et, - cr_items cri, - cr_mime_types crmt - where cr.revision_id = et.revision_id - and et.grade_item_id = :grade_item_id - and cri.live_revision = et.task_id - and et.mime_type = crmt.mime_type - $assignments_orderby - - - - Index: openacs-4/packages/evaluation/lib/tasks-chunk.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/tasks-chunk.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/lib/tasks-chunk.xql 31 Mar 2005 11:09:27 -0000 1.1 +++ openacs-4/packages/evaluation/lib/tasks-chunk.xql 22 Nov 2017 11:33:32 -0000 1.2 @@ -20,5 +20,114 @@ + + + select et.task_name, et.number_of_members, et.task_id, + to_char(et.due_date,'YYYY-MM-DD HH24:MI:SS') as due_date_ansi, + et.online_p, + et.late_submit_p, + et.task_item_id, + et.item_id, + et.requires_grade_p, et.description, et.grade_item_id, + coalesce(round(cr.content_length/1024,0),0) as content_length, + et.data as task_data, + crmt.label as pretty_mime_type, + cr.title as task_title, + et.task_id as revision_id + from cr_revisions cr, + evaluation_tasksi et, + cr_items cri, + cr_mime_types crmt + where cr.revision_id = et.revision_id + and et.grade_item_id = :grade_item_id + and cri.live_revision = et.task_id + and et.mime_type = crmt.mime_type + $assignments_orderby + + + + + + + + select et.task_name, et.number_of_members, et.task_id, + to_char(et.due_date,'YYYY-MM-DD HH24:MI:SS') as due_date_ansi, + et.online_p, + et.late_submit_p, + et.item_id, + et.task_item_id, + et.due_date, + et.requires_grade_p, et.description, et.grade_item_id, + cr.title as task_title, + et.data as task_data, + et.task_id as revision_id, + coalesce(round(cr.content_length/1024,0),0) as content_length, + et.late_submit_p, + crmt.label as pretty_mime_type + from cr_revisions cr, + evaluation_tasksi et, + cr_items cri, + cr_mime_types crmt + where cr.revision_id = et.revision_id + and grade_item_id = :grade_item_id + and cri.live_revision = et.task_id + and et.mime_type = crmt.mime_type + $assignments_orderby + + + + + + + + select 1 from dual where :due_date > current_timestamp + + + + + + + + select coalesce((select etg2.group_id from evaluation_task_groups etg2, + evaluation_tasks et2, + acs_rels map + where map.object_id_one = etg2.group_id + and map.object_id_two = :user_id + and etg2.task_item_id = et2.task_item_id + and et2.task_id = :task_id),0) + from evaluation_tasks et3 + where et3.task_id = :task_id + + + + + + + + select ea.answer_id + from evaluation_answers ea, cr_items cri + where ea.task_item_id = :task_item_id + and cri.live_revision = ea.answer_id + and ea.party_id = + ( select + CASE + WHEN et3.number_of_members = 1 THEN :user_id + ELSE + (select etg2.group_id from evaluation_task_groups etg2, + evaluation_tasks et2, + acs_rels map + where map.object_id_one = etg2.group_id + and map.object_id_two = :user_id + and etg2.task_item_id = et2.task_item_id + and et2.task_id = :task_id) + END as nom + from evaluation_tasks et3 + where et3.task_id = :task_id + ) + + + + +