Index: openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-admin-portlet-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-admin-portlet-create.sql 19 Jun 2005 06:05:06 -0000 1.1 +++ openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-admin-portlet-create.sql 24 Jun 2005 09:15:34 -0000 1.2 @@ -6,7 +6,7 @@ begin ds_id := portal_datasource__new( ''dotlrn_attendance_admin_portlet'', -- name - ''Displays the dotlrn_attendance_admin'' -- description + ''Displays the Attendance Admin'' -- description ); -- 4 defaults procs Index: openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-admin-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-admin-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-admin-portlet-drop.sql 24 Jun 2005 09:15:34 -0000 1.1 @@ -0,0 +1,86 @@ +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id into ds_id + from portal_datasources + where name = ''dotlrn_attendance_admin_portlet''; + + if not found then + raise exception ''No datasource_id found here '',ds_id ; + ds_id := null; + end if; + + + if ds_id is NOT null then + perform portal_datasource__delete(ds_id); + end if; + +return 0; + +end;' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + +-- create the implementation +select acs_sc_impl__delete ( + 'portal_datasource', + 'dotlrn_attendance_admin_portlet' +); + +-- add all the hooks +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'dotlrn_attendance_admin_portlet', + 'GetMyName' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'dotlrn_attendance_admin_portlet', + 'GetPrettyName' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'dotlrn_attendance_admin_portlet', + 'Link' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'dotlrn_attendance_admin_portlet', + 'AddSelfToPage' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'dotlrn_attendance_admin_portlet', + 'Show' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'dotlrn_attendance_admin_portlet', + 'Edit' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'dotlrn_attendance_admin_portlet', + 'RemoveSelfFromPage' +); + +-- Add the binding +select acs_sc_binding__delete( + 'portal_datasource', + 'dotlrn_attendance_admin_portlet' +); + + + + Index: openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-drop.sql 31 May 2005 22:03:56 -0000 1.1 +++ openacs-4/packages/dotlrn-attendance/sql/postgresql/dotlrn-attendance-drop.sql 24 Jun 2005 09:15:34 -0000 1.2 @@ -98,3 +98,5 @@ 'dotlrn_applet', 'dotlrn_attendance' ); + +\i dotlrn-attendance-admin-portlet-drop.sql \ No newline at end of file Index: openacs-4/packages/dotlrn-attendance/tcl/dotlrn-attendance-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-attendance/tcl/dotlrn-attendance-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn-attendance/tcl/dotlrn-attendance-procs.tcl 19 Jun 2005 06:05:06 -0000 1.2 +++ openacs-4/packages/dotlrn-attendance/tcl/dotlrn-attendance-procs.tcl 24 Jun 2005 09:15:34 -0000 1.3 @@ -175,15 +175,15 @@ } { Clone this applet's content from the old community to the new one } { - ns_log notice "Cloning: [applet_key]" - set new_package_id [add_applet_to_community $new_community_id] - set old_package_id [dotlrn_community::get_applet_package_id \ - -community_id $old_community_id \ - -applet_key [applet_key] - ] - - db_exec_plsql call_attendance_clone {} - return $new_package_id + # ns_log notice "Cloning: [applet_key]" + # set new_package_id [add_applet_to_community $new_community_id] + # set old_package_id [dotlrn_community::get_applet_package_id \ + # -community_id $old_community_id \ + # -applet_key [applet_key] + #] + # db_exec_plsql call_attendance_clone {} + # return $new_package_id + add_applet_to_community $new_community_id } ad_proc -public change_event_handler {