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.18 -r1.19
--- openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql	5 Jan 2005 17:18:40 -0000	1.18
+++ openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql	5 Jan 2005 21:27:32 -0000	1.19
@@ -496,7 +496,7 @@
 -- TEMPLATES
 ---------------------------------------
                                                                                                                                                              
-create function evaluation__create_folder ()
+create function evaluation__create_template ()
 returns integer as'
 declare
     template_id integer;
@@ -572,4 +572,47 @@
     return null;
 end;' language 'plpgsql';                                                                                                                                   
 
+create function evaluation__delete_template ()
+returns integer as '
+declare
+    v_template_id         cr_templates.template_id%TYPE;
+    v_item_cursor RECORD;
+                                                                                                                                                             
+begin
+                                                                                                                                                             
+    FOR v_item_cursor IN
+        select template_id
+        from   cr_templates, cr_items
+        where  name=''evaluation-tasks-default''
+    LOOP
+        PERFORM content_template__delete(v_item_cursor.template_id);
+    END LOOP;
+                                                                                                                                                             
+    FOR v_item_cursor IN
+        select template_id
+        from   cr_templates, cr_items
+        where  name=''evaluation-tasks-sols-default''
+    LOOP
+        PERFORM content_template__delete(v_item_cursor.template_id);
+    END LOOP;
+                                                                                                                                                             
+    FOR v_item_cursor IN
+        select template_id
+        from   cr_templates, cr_items
+        where  name=''evaluation-answers-default''
+    LOOP
+        PERFORM content_template__delete(v_item_cursor.template_id);
+    END LOOP;
+
+    FOR v_item_cursor IN
+        select template_id
+        from   cr_templates, cr_items
+        where  name=''evaluation-grades-sheets-default''
+    LOOP
+        PERFORM content_template__delete(v_item_cursor.template_id);
+    END LOOP;
+                                                                                                                                                             
+    return 0;
+end;' language 'plpgsql';
+
 \i evaluation-calendar-create.sql
