Index: openacs-4/packages/evaluation-portlet/lib/evaluations-chunk-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/lib/evaluations-chunk-postgresql.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/evaluation-portlet/lib/evaluations-chunk-postgresql.xql 4 Apr 2005 18:23:47 -0000 1.6 +++ openacs-4/packages/evaluation-portlet/lib/evaluations-chunk-postgresql.xql 8 Aug 2006 21:26:44 -0000 1.7 @@ -3,8 +3,58 @@ postgresql7.3 + + + + select et.task_name, + round(et.weight,2) as task_weight, + et.task_id, coalesce(perfect_score,0) as perfect_score, online_p + from evaluation_tasksi et, cr_items cri + where grade_item_id = :grade_item_id + and cri.live_revision = et.task_id + $evaluations_orderby + + + + + + + select ets.solution_id + from evaluation_tasks_sols ets, cr_items cri + where ets.task_item_id = (select task_item_id from evaluation_tasks where task_id=:task_id) + and cri.live_revision = ets.solution_id + + + + + + + + + select et.task_name, + et.task_item_id, + et.weight as t_weight, + eg.weight as g_weight, + round((et.weight*eg.weight)/100,2) as task_weight, + et.number_of_members, + et.online_p, + et.due_date, + et.late_submit_p, + et.task_id, coalesce(perfect_score,0) as perfect_score + from evaluation_grades eg, + evaluation_tasksi et, + cr_items cri + where eg.grade_id = :grade_id + and eg.grade_item_id = et.grade_item_id + and cri.live_revision = et.task_id + $evaluations_orderby + + + + + select coalesce((select etg2.group_id from evaluation_task_groups etg2, evaluation_tasks et2, acs_rels map @@ -16,11 +66,13 @@ where et3.task_id = :task_id -- select evaluation__party_id(:user_id,:task_id) + + select round(ese.grade,2) as grade, ese.evaluation_id, ese.description as comments, @@ -46,14 +98,16 @@ where et3.task_id = :task_id ) -- evaluation__party_id(:user_id,:task_id) + + select ea.data as answer_data, ea.title as answer_title, - ea.answer_id + ea.answer_id,to_char(ea.creation_date,'MM/DD/YYYY HH24:MI') as creation_date from evaluation_answersi ea, cr_items cri where ea.task_item_id = :task_item_id and cri.live_revision = ea.answer_id @@ -73,9 +127,46 @@ from evaluation_tasks et3 where et3.task_id = :task_id ) + -- evaluation__party_id(:user_id,:task_id) + + + + select 1 from dual where :due_date > now() + + + + + + 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 + ) + + --evaluation__party_id(:user_id,:task_id) + + + + +