Index: openacs-4/packages/evaluation/lib/evaluations-chunk-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/Attic/evaluations-chunk-postgresql.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/evaluation/lib/evaluations-chunk-postgresql.xql 30 Jul 2004 22:50:07 -0000 1.4
+++ openacs-4/packages/evaluation/lib/evaluations-chunk-postgresql.xql 30 Aug 2004 13:04:31 -0000 1.5
@@ -8,9 +8,9 @@
select et.task_name, et.weight as task_weight,
et.task_id
- from evaluation_tasksi et
+ from evaluation_tasksi et, cr_items cri
where grade_item_id = :grade_item_id
- and content_revision__is_live(et.task_id) = true
+ and cri.live_revision = et.task_id
$evaluations_orderby
@@ -20,28 +20,20 @@
select et.task_name,
- ese.grade,
- ese.description as comments,
- ese.show_student_p,
+ et.task_item_id,
+ et.weight as t_weight,
+ eg.weight as g_weight,
(et.weight*eg.weight)/100 as task_weight,
- (ese.grade*et.weight*eg.weight)/10000 as task_grade,
et.number_of_members,
- et.task_id,
- ea.data as answer_data,
- ea.title as answer_title,
- ea.answer_id
+ et.task_id
from evaluation_grades eg,
- evaluation_tasks et2 left outer join evaluation_student_evalsi ese on (ese.task_item_id = et2.task_item_id and content_revision__is_live(ese.evaluation_id) = true
- and ese.party_id = evaluation__party_id(:user_id,et2.task_id)),
- evaluation_tasks et left outer join evaluation_answersi ea on (ea.task_item_id = et.task_item_id and content_revision__is_live(ea.answer_id) = true
- and ea.party_id = evaluation__party_id(:user_id,et.task_id))
- where eg.grade_item_id = :grade_item_id
+ evaluation_tasksi et,
+ cr_items cri
+ where eg.grade_id = :grade_id
and eg.grade_item_id = et.grade_item_id
- and et.task_id = et2.task_id
- and content_revision__is_live(et.task_id) = true
- and content_revision__is_live(eg.grade_id) = true
+ and cri.live_revision = et.task_id
$evaluations_orderby
-
+
@@ -53,4 +45,33 @@
+
+
+
+ select ese.grade,
+ ese.description as comments,
+ ese.show_student_p,
+ (ese.grade*:t_weight*:g_weight)/10000 as task_grade
+ from evaluation_student_evalsi ese, cr_items cri
+ where ese.task_item_id = :task_item_id
+ and cri.live_revision = ese.evaluation_id
+ and ese.party_id = evaluation__party_id(:user_id,:task_id)
+
+
+
+
+
+
+
+ select ea.data as answer_data,
+ ea.title as answer_title,
+ ea.answer_id
+ from evaluation_answersi ea, cr_items cri
+ where ea.task_item_id = :task_item_id
+ and cri.live_revision = ea.answer_id
+ and ea.party_id = evaluation__party_id(:user_id,:task_id)
+
+
+
+