Index: openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql	31 Mar 2005 11:09:27 -0000	1.13
+++ openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql	27 Oct 2014 16:41:24 -0000	1.14
@@ -2,33 +2,38 @@
 
 \i evaluation-calendar-drop.sql
 
-create function inline_0 ()
-returns integer as'
-declare
+CREATE FUNCTION inline_0 ()
+RETURNS integer AS $$
+DECLARE
   del_rec record;
-begin
+BEGIN
   for del_rec in select item_id from cr_items 
-	where content_type in (''evaluation_grades'', ''evaluation_tasks'', ''evaluation_tasks_sols'', ''evaluation_answers'', ''evaluation_student_evals'', ''evaluation_grades_sheets'')
+	where content_type in ('evaluation_grades', 'evaluation_tasks', 'evaluation_tasks_sols', 'evaluation_answers', 'evaluation_student_evals', 'evaluation_grades_sheets')
   loop 
     PERFORM content_item__delete(del_rec.item_id);
   end loop;
 return 0;
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
+
 select inline_0 ();
 drop function inline_0 ();
 
-create function inline_0 ()
-returns integer as'
-declare
+
+CREATE FUNCTION inline_0 ()
+RETURNS integer AS $$
+DECLARE
   del_rec record;
-begin
+BEGIN
   for del_rec in select item_id from cr_items 
-	where content_type in (''evaluation_grades'', ''evaluation_tasks'', ''evaluation_tasks_sols'', ''evaluation_answers'', ''evaluation_student_evals'', ''evaluation_grades_sheets'')
+	where content_type in ('evaluation_grades', 'evaluation_tasks', 'evaluation_tasks_sols', 'evaluation_answers', 'evaluation_student_evals', 'evaluation_grades_sheets')
   loop 
     PERFORM content_item__delete(del_rec.item_id);
   end loop;
 return 0;
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
+
 select inline_0 ();
 drop function inline_0 ();
 
@@ -48,19 +53,21 @@
 select acs_object_type__drop_type('evaluation_task_group','f');
 select acs_rel_type__drop_type('evaluation_task_group_rel','t');
 
-create function inline_1 ()
-returns integer as'
-begin
-PERFORM acs_object_type__drop_type(''evaluation_grades'',''f'');
-PERFORM acs_object_type__drop_type(''evaluation_tasks'',''f'');
-PERFORM acs_object_type__drop_type(''evaluation_tasks_sols'',''f'');
-PERFORM acs_object_type__drop_type(''evaluation_answers'',''f'');
-PERFORM acs_object_type__drop_type(''evaluation_grades_sheets'',''f'');
-PERFORM acs_object_type__drop_type(''evaluation_student_evals'',''f'');
-PERFORM acs_object_type__drop_type(''evaluation_task_groups'',''f'');
-
+CREATE FUNCTION inline_1 ()
+RETURNS integer AS $$
+DECLARE
+BEGIN
+PERFORM acs_object_type__drop_type('evaluation_grades','f');
+PERFORM acs_object_type__drop_type('evaluation_tasks','f');
+PERFORM acs_object_type__drop_type('evaluation_tasks_sols','f');
+PERFORM acs_object_type__drop_type('evaluation_answers','f');
+PERFORM acs_object_type__drop_type('evaluation_grades_sheets','f');
+PERFORM acs_object_type__drop_type('evaluation_student_evals','f');
+PERFORM acs_object_type__drop_type('evaluation_task_groups','f');
 return 0;
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
+
 select inline_1 ();
 drop function inline_1 ();
 
@@ -102,4 +109,4 @@
 
 select acs_object_type__drop_type('evaluation_task_group_rel','f');
 
-\i evaluation-package-drop.sql
\ No newline at end of file
+\i evaluation-package-drop.sql
