Index: openacs-4/packages/dotlrn-evaluation/tcl/dotlrn-evaluation-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-evaluation/tcl/dotlrn-evaluation-procs-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn-evaluation/tcl/dotlrn-evaluation-procs-postgresql.xql 8 Jul 2004 19:30:46 -0000 1.2 +++ openacs-4/packages/dotlrn-evaluation/tcl/dotlrn-evaluation-procs-postgresql.xql 8 Aug 2006 21:26:34 -0000 1.3 @@ -3,15 +3,38 @@ postgresql7.1 - + + + select eg.grade_name, eg.grade_plural_name, eg.comments, eg.weight, eg.grade_item_id + from acs_objects o, evaluation_grades eg,cr_items ci,cr_revisions cr + where o.object_id = ci.item_id + and cr.revision_id=eg.grade_id + and ci.item_id=cr.item_id + and cr.revision_id=ci.live_revision + and o.context_id =:old_package_id + + + - select evaluation__clone ( - :old_package_id, - :new_package_id - ); + select et.task_name,cr.description,et.weight, et.number_of_members, et.online_p, ci.storage_type, et.due_date, et.late_submit_p, et.requires_grade_p, cr.title, cr.mime_type, et.estimated_time, et.forums_related_p,et.points, et.relative_weight, et.perfect_score,(ci.live_revision = cr.revision_id) as live_p from evaluation_tasks et,cr_revisions cr,cr_items ci, acs_objects o where grade_item_id = :grade_item_id and cr.revision_id=task_id and cr.item_id=ci.item_id and object_id=ci.item_id order by task_item_id + + + + update evaluation_tasks set points=:points, relative_weight=:relative_weight, perfect_score= :perfect_score,forums_related_p=:forums_related_p where task_id=:task_revision_id; + + + + + + delete from evaluation_grades where grade_id in (select eg.grade_id from acs_objects o, evaluation_grades eg,cr_items ci,cr_revisions cr where o.object_id = ci.item_id and cr.revision_id=eg.grade_id and ci.item_id=cr.item_id and cr.revision_id=ci.live_revision and o.context_id = :new_package_id); + + + + +