Index: openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql,v diff -u -r1.14 -r1.15 --- openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql 24 Aug 2004 22:40:30 -0000 1.14 +++ openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql 25 Aug 2004 18:17:36 -0000 1.15 @@ -291,7 +291,7 @@ v_id := p_item_id; end if; - v_item_id := content_item__new( + select coalesce((select content_item__new( p_name, -- name v_parent_id, -- parent_id v_id, -- item_id @@ -308,7 +308,7 @@ p_nls_language, -- nls_language p_text, -- text p_storage_type -- storage_type - ); + ) where not exists (select 1 from cr_items where item_id = v_id)),0) into v_item_id; return v_item_id; end; Index: openacs-4/packages/evaluation/tcl/evaluation-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/tcl/evaluation-procs-postgresql.xql,v diff -u -r1.14 -r1.15 --- openacs-4/packages/evaluation/tcl/evaluation-procs-postgresql.xql 13 Aug 2004 17:09:54 -0000 1.14 +++ openacs-4/packages/evaluation/tcl/evaluation-procs-postgresql.xql 25 Aug 2004 18:17:37 -0000 1.15 @@ -89,7 +89,7 @@ - select coalesce((select evaluation__new_item ( + select evaluation__new_item ( :item_id, --item_id :item_name, null, --locale @@ -105,8 +105,7 @@ :storage_type, --storage_type 'content_item', -- item_subtype 'evaluation_tasks' -- content_type - ) - where not exists (select 1 from cr_items where item_id = :item_id)),0) + ); @@ -344,7 +343,7 @@ :storage_type, --storage_type 'content_item', -- item_subtype 'evaluation_student_evals' -- content_type - ) where not exists (select 1 from cr_items where item_id = :item_id); + ); Index: openacs-4/packages/evaluation/www/answer-add-edit-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/answer-add-edit-postgresql.xql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/evaluation/www/answer-add-edit-postgresql.xql 24 Aug 2004 22:40:30 -0000 1.7 +++ openacs-4/packages/evaluation/www/answer-add-edit-postgresql.xql 25 Aug 2004 18:17:37 -0000 1.8 @@ -22,7 +22,7 @@ - + select answer_id