Index: openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.2
+++ openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse-postgresql.xql 30 Jul 2004 22:50:10 -0000 1.3
@@ -14,30 +14,53 @@
- select grade from evaluation_student_evals where party_id = :party_id and task_id = :task_id and content_revision__is_live(evaluation_id) = true
+ select ese.grade
+ from evaluation_student_evals ese, evaluation_tasks et
+ where ese.party_id = :party_id
+ and ese.task_item_id = et.task_item_id
+ and et.task_id = :task_id
+ and content_revision__is_live(ese.evaluation_id) = true
- select 1 from evaluation_student_evalsi where task_id = :task_id and party_id = :party_id and grade = :grade and description = :comments and content_revision__is_live(evaluation_id) = true
+ select 1
+ from evaluation_student_evalsi ese, evaluation_tasks et
+ where ese.task_item_id = et.task_item_id
+ and et.task_id = :task_id
+ and ese.party_id = :party_id
+ and ese.grade = :grade
+ and ese.description = :comments
+ and content_revision__is_live(ese.evaluation_id) = true
- select 1 from evaluation_student_evalsi where task_id = :task_id and party_id = :party_id and grade = :grade and description is null and content_revision__is_live(evaluation_id) = true
+ select 1 from evaluation_student_evalsi ese, evaluation_tasks et
+ where ese.task_item_id = et.task_item_id
+ and et.task_id = :task_id
+ and ese.party_id = :party_id
+ and ese.grade = :grade
+ and ese.description is null
+ and content_revision__is_live(ese.evaluation_id) = true
- select evaluation_id from evaluation_student_evals where task_id = :task_id and party_id = :party_id and content_revision__is_live(evaluation_id) = true
+ select ese.evaluation_id
+ from evaluation_student_evals ese, evaluation_tasks et
+ where ese.task_item_id = et.task_item_id
+ and et.task_id = :task_id
+ and ese.party_id = :party_id
+ and content_revision__is_live(ese.evaluation_id) = true