Index: openacs-4/packages/dotlrn/dotlrn.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v diff -u -r1.101 -r1.102 --- openacs-4/packages/dotlrn/dotlrn.info 26 Jul 2002 21:14:59 -0000 1.101 +++ openacs-4/packages/dotlrn/dotlrn.info 31 Jul 2002 21:18:31 -0000 1.102 @@ -169,6 +169,7 @@ + @@ -195,6 +196,7 @@ + @@ -462,39 +464,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/dotlrn/sql/oracle/applet-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/applet-sc-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/sql/oracle/applet-sc-create.sql 24 May 2002 01:58:45 -0000 1.5 +++ openacs-4/packages/dotlrn/sql/oracle/applet-sc-create.sql 31 Jul 2002 21:18:32 -0000 1.6 @@ -19,84 +19,88 @@ -- -- started October 1st, 2001 -- we remember September 11th --- +-- +-- -- This is the service contract for dotLRN applets. A dotlrn applet MUST -- have AT LEAST the procs (with the proper arguments) defined below to work --- as a dotlrn applet. See the short explanation of what the proc is about below +-- as a dotlrn applet. See the short explanation of what the proc is about +-- below. +-- declare - sc_dotlrn_contract integer; - foo integer; + sc_dotlrn_contract integer; + foo integer; begin - sc_dotlrn_contract := acs_sc_contract.new ( + + sc_dotlrn_contract := acs_sc_contract.new( contract_name => 'dotlrn_applet', contract_desc => 'dotLRN Applet contract' ); - + -- GetPrettyName: A simple proc to return the pretty name of the applet - foo := acs_sc_msg_type.new ( + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.GetPrettyName.InputType', msg_type_spec => '' ); - - foo := acs_sc_msg_type.new ( + + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.GetPrettyName.OutputType', msg_type_spec => 'pretty_name:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'GetPrettyName', - 'Get the pretty name of the applet', - 't', -- not cacheable - 0, -- n_args - 'dotlrn_applet.GetPrettyName.InputType', - 'dotlrn_applet.GetPrettyName.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'GetPrettyName', + operation_desc => 'Get the pretty name of the applet', + operation_iscachable_p => 't', + operation_nargs => 0, + operation_inputtype => 'dotlrn_applet.GetPrettyName.InputType', + operation_outputtype => 'dotlrn_applet.GetPrettyName.OutputType' ); - - -- AddApplet: Adds the applet to dotlrn (used for one-time initialization) + + -- AddApplet: Adds the applet to dotlrn(used for one-time initialization) -- Call in the the dotlrn-init sequence foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.AddApplet.InputType', msg_type_spec => '' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.AddApplet.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'AddApplet', - 'Add the Applet to dotlrn - used for one-time initialization', - 'f', -- not cacheable - 0, -- n_args - 'dotlrn_applet.AddApplet.InputType', - 'dotlrn_applet.AddApplet.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'AddApplet', + operation_desc => 'Add the Applet to dotlrn - used for one-time initialization', + operation_iscachable_p => 'f', + operation_nargs => 0, + operation_inputtype => 'dotlrn_applet.AddApplet.InputType', + operation_outputtype => 'dotlrn_applet.AddApplet.OutputType' ); - - -- RemoveApplet: Removes the applet from dotlrn (used for one-time destroy) + + -- RemoveApplet: Removes the applet from dotlrn(used for one-time destroy) -- ** Not yet implimented ** foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.RemoveApplet.InputType', msg_type_spec => '' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.RemoveApplet.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'RemoveApplet', - 'Remove the applet', - 'f', -- not cacheable - 0, -- n_args - 'dotlrn_applet.RemoveApplet.InputType', - 'dotlrn_applet.RemoveApplet.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'RemoveApplet', + operation_desc => 'Remove the applet', + operation_iscachable_p => 'f', + operation_nargs => 0, + operation_inputtype => 'dotlrn_applet.RemoveApplet.InputType', + operation_outputtype => 'dotlrn_applet.RemoveApplet.OutputType' ); -- AddAppletToCommunity: Adds the applet to a community @@ -106,112 +110,112 @@ msg_type_name => 'dotlrn_applet.AddAppletToCommunity.InputType', msg_type_spec => 'community_id:integer' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.AddAppletToCommunity.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'AddAppletToCommunity', - 'Add the Applet to a specific dotlrn community', - 'f', -- not cacheable - 1, -- n_args - 'dotlrn_applet.AddAppletToCommunity.InputType', - 'dotlrn_applet.AddAppletToCommunity.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'AddAppletToCommunity', + operation_desc => 'Add the Applet to a specific dotlrn community', + operation_iscachable_p => 'f', + operation_nargs => 1, + operation_inputtype => 'dotlrn_applet.AddAppletToCommunity.InputType', + operation_outputtype => 'dotlrn_applet.AddAppletToCommunity.OutputType' ); - + -- RemoveAppletFromCommunity: Removes the applet from a community -- Called at community delete time. Deleting applets before that time -- ** not implimented yet ** foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.RemoveAppletFromCommunity.InputType', msg_type_spec => 'community_id:integer' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.RemoveAppletFromCommunity.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'RemoveAppletFromCommunity', - 'Remove the applet from a given community', - 'f', -- not cacheable - 1, -- n_args - 'dotlrn_applet.RemoveAppletFromCommunity.InputType', - 'dotlrn_applet.RemoveAppletFromCommunity.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'RemoveAppletFromCommunity', + operation_desc => 'Remove the applet from a given community', + operation_iscachable_p => 'f', + operation_nargs => 1, + operation_inputtype => 'dotlrn_applet.RemoveAppletFromCommunity.InputType', + operation_outputtype => 'dotlrn_applet.RemoveAppletFromCommunity.OutputType' ); - + -- AddUser: used for user-specific one time stuff - -- Called when a user is added as a dotlrn user. An example: + -- Called when a user is added as a dotlrn user. An example: -- dotlrn-calendar will create a personal calendar for the new user. foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.AddUser.InputType', msg_type_spec => 'user_id:integer' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.AddUser.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'AddUser', - 'Add a user to dotlrn, used for user-specific one-time init', - 'f', -- not cacheable - 1, -- n_args - 'dotlrn_applet.AddUser.InputType', - 'dotlrn_applet.AddUser.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'AddUser', + operation_desc => 'Add a user to dotlrn, used for user-specific one-time init', + operation_iscachable_p => 'f', + operation_nargs => 1, + operation_inputtype => 'dotlrn_applet.AddUser.InputType', + operation_outputtype => 'dotlrn_applet.AddUser.OutputType' ); - + -- RemoveUser: used for user-specific one time stuff -- Just like AddUser above, but when we delete a dotlrn user -- Example: dotlrn-calendar would delete the user's personal calendar foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.RemoveUser.InputType', msg_type_spec => 'user_id:integer' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.RemoveUser.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'RemoveUser', - 'Remove a user from dotlrn', - 'f', -- not cacheable - 1, -- n_args - 'dotlrn_applet.RemoveUser.InputType', - 'dotlrn_applet.RemoveUser.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'RemoveUser', + operation_desc => 'Remove a user from dotlrn', + operation_iscachable_p => 'f', + operation_nargs => 1, + operation_inputtype => 'dotlrn_applet.RemoveUser.InputType', + operation_outputtype => 'dotlrn_applet.RemoveUser.OutputType' ); - - -- AddUserToCommunity: Adds a user to the a specfic dotlrn community. - -- An example of this is to make the community's calendar items + + -- AddUserToCommunity: Adds a user to the a specfic dotlrn community. + -- An example of this is to make the community's calendar items -- visable on user's personal calendar foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.AddUserToCommunity.InputType', msg_type_spec => 'community_id:integer,user_id:integer' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.AddUserToCommunity.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'AddUserToCommunity', - 'Add a user to a community', - 'f', -- not cacheable - 2, -- n_args - 'dotlrn_applet.AddUserToCommunity.InputType', - 'dotlrn_applet.AddUserToCommunity.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'AddUserToCommunity', + operation_desc => 'Add a user to a community', + operation_iscachable_p => 'f', + operation_nargs => 2, + operation_inputtype => 'dotlrn_applet.AddUserToCommunity.InputType', + operation_outputtype => 'dotlrn_applet.AddUserToCommunity.OutputType' ); -- RemoveUserFromCommunity: Removes a user from a specfic dotlrn @@ -220,86 +224,105 @@ msg_type_name => 'dotlrn_applet.RemoveUserFromCommunity.InputType', msg_type_spec => 'community_id:integer,user_id:integer' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.RemoveUserFromCommunity.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'RemoveUserFromCommunity', - 'Remove a user from a community, applet does appropriate cleanup', - 'f', -- not cacheable - 2, -- n_args - 'dotlrn_applet.RemoveUserFromCommunity.InputType', - 'dotlrn_applet.RemoveUserFromCommunity.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'RemoveUserFromCommunity', + operation_desc => 'Remove a user from a community, applet does appropriate cleanup', + operation_iscachable_p => 'f', + operation_nargs => 2, + operation_inputtype => 'dotlrn_applet.RemoveUserFromCommunity.InputType', + operation_outputtype => 'dotlrn_applet.RemoveUserFromCommunity.OutputType' ); - + -- AddPortlet: Adds the underlying portlet to the given portal foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.AddPortlet.InputType', msg_type_spec => 'portal_id:integer' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.AddPortlet.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'AddPortlet', - 'Adds the underlying portlet to the portal specified', - 'f', -- not cacheable - 1, -- n_args - 'dotlrn_applet.AddPortlet.InputType', - 'dotlrn_applet.AddPortlet.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'AddPortlet', + operation_desc => 'Adds the underlying portlet to the portal specified', + operation_iscachable_p => 'f', + operation_nargs => 1, + operation_inputtype => 'dotlrn_applet.AddPortlet.InputType', + operation_outputtype => 'dotlrn_applet.AddPortlet.OutputType' ); - + -- RemovePortlet: the remove corollary of above foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.RemovePortlet.InputType', msg_type_spec => 'portal_id:integer,args:string' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.RemovePortlet.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'RemovePortlet', - 'Removes the underlying portlet from the given portal', - 'f', -- not cacheable - 2, -- n_args - 'dotlrn_applet.RemovePortlet.InputType', - 'dotlrn_applet.RemovePortlet.OutputType' + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'RemovePortlet', + operation_desc => 'Removes the underlying portlet from the given portal', + operation_iscachable_p => 'f', + operation_nargs => 2, + operation_inputtype => 'dotlrn_applet.RemovePortlet.InputType', + operation_outputtype => 'dotlrn_applet.RemovePortlet.OutputType' ); - -- Clone: Attack of the Clones! + -- Clone: Attack of the Clones! foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.Clone.InputType', msg_type_spec => 'old_community_id:integer,new_community_id:integer' ); - + foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.Clone.OutputType', msg_type_spec => 'success_p:boolean,error_message:string' ); - - foo := acs_sc_operation.new ( - 'dotlrn_applet', - 'Clone', - 'Clone this applets content from the old to the new community', - 'f', -- not cacheable - 2, -- n_args - 'dotlrn_applet.Clone.InputType', - 'dotlrn_applet.Clone.OutputType' - ); - + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'Clone', + operation_desc => 'Clone this applets content from the old to the new community', + operation_iscachable_p => 'f', + operation_nargs => 2, + operation_inputtype => 'dotlrn_applet.Clone.InputType', + operation_outputtype => 'dotlrn_applet.Clone.OutputType' + ); + + foo := acs_sc_msg_type.new( + msg_type_name => 'dotlrn_applet.ChangeEventHandler.InputType', + msg_type_spec => 'community_id:integer,event:string,old_value:string,new_value:string' + ); + + foo := acs_sc_msg_type.new( + msg_type_name => 'dotlrn_applet.ChangeEventHandler.OutputType', + msg_type_spec => 'success_p:boolean,error_message:string' + ); + + foo := acs_sc_operation.new( + contract_name => 'dotlrn_applet', + operation_name => 'ChangeEventHandler', + operation_desc => 'Handles changes to communities', + operation_iscachable_p => 'f', + operation_nargs => 4, + operation_inputtype => 'dotlrn_applet.ChangeEventHandler.InputType', + operation_outputtype => 'dotlrn_applet.ChangeEventHandler.OutputType' + ); + end; / show errors Index: openacs-4/packages/dotlrn/sql/oracle/applet-sc-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/applet-sc-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/oracle/applet-sc-drop.sql 30 May 2002 22:04:58 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/oracle/applet-sc-drop.sql 31 Jul 2002 21:18:32 -0000 1.2 @@ -180,6 +180,19 @@ msg_type_name => 'dotlrn_applet.Clone.OutputType' ); + acs_sc_operation.delete( + contract_name => 'dotlrn_applet', + operation_name => 'ChangeEventHandler' + ); + + acs_sc_msg_type.delete( + msg_type_name => 'dotlrn_applet.ChangeEventHandler.InputType' + ); + + acs_sc_msg_type.delete( + msg_type_name => 'dotlrn_applet.ChangeEventHandler.OutputType' + ); + acs_sc_contract.delete( contract_name => 'dotlrn_applet' ); Index: openacs-4/packages/dotlrn/sql/postgresql/applet-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/applet-sc-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/postgresql/applet-sc-create.sql 8 Jul 2002 21:04:16 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/postgresql/applet-sc-create.sql 31 Jul 2002 21:18:32 -0000 1.2 @@ -25,6 +25,7 @@ -- we remember September 11th -- +-- -- This is the service contract for dotLRN applets. A dotlrn applet MUST -- have AT LEAST the procs (with the proper arguments) defined below to work -- as a dotlrn applet. @@ -35,52 +36,53 @@ create function inline_0() returns integer as ' begin - perform acs_sc_contract__new ( - ''dotlrn_applet'', - ''dotLRN Applet contract'' - ); - -- Get a pretty name - perform acs_sc_msg_type__new ( - ''dotlrn_applet.GetPrettyName.InputType'', - '''' - ); + perform acs_sc_contract__new ( + ''dotlrn_applet'', + ''dotLRN Applet contract'' + ); - perform acs_sc_msg_type__new ( - ''dotlrn_applet.GetPrettyName.OutputType'', - ''pretty_name:string'' - ); + -- Get a pretty name + perform acs_sc_msg_type__new ( + ''dotlrn_applet.GetPrettyName.InputType'', + '''' + ); - perform acs_sc_operation__new ( - ''dotlrn_applet'', - ''GetPrettyName'', - ''Get the pretty name of the applet'', - ''t'', -- not cacheable - 0, -- n_args - ''dotlrn_applet.GetPrettyName.InputType'', - ''dotlrn_applet.GetPrettyName.OutputType'' - ); + perform acs_sc_msg_type__new ( + ''dotlrn_applet.GetPrettyName.OutputType'', + ''pretty_name:string'' + ); - -- Add the applet to dotlrn (used for one-time initialization) - perform acs_sc_msg_type__new( - ''dotlrn_applet.AddApplet.InputType'', - '''' - ); + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''GetPrettyName'', + ''Get the pretty name of the applet'', + ''t'', + 0, + ''dotlrn_applet.GetPrettyName.InputType'', + ''dotlrn_applet.GetPrettyName.OutputType'' + ); - perform acs_sc_msg_type__new( - ''dotlrn_applet.AddApplet.OutputType'', - ''success_p:boolean,error_message:string'' - ); + -- Add the applet to dotlrn (used for one-time initialization) + perform acs_sc_msg_type__new( + ''dotlrn_applet.AddApplet.InputType'', + '''' + ); + + perform acs_sc_msg_type__new( + ''dotlrn_applet.AddApplet.OutputType'', + ''success_p:boolean,error_message:string'' + ); - perform acs_sc_operation__new ( - ''dotlrn_applet'', - ''AddApplet'', - ''Add the Applet to dotlrn - used for one-time initialization'', - ''f'', -- not cacheable - 0, -- n_args - ''dotlrn_applet.AddApplet.InputType'', - ''dotlrn_applet.AddApplet.OutputType'' - ); + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''AddApplet'', + ''Add the Applet to dotlrn - used for one-time initialization'', + ''f'', + 0, + ''dotlrn_applet.AddApplet.InputType'', + ''dotlrn_applet.AddApplet.OutputType'' + ); -- RemoveApplet: Removes the applet from dotlrn (used for one-time destroy) -- ** Not yet implimented ** @@ -98,82 +100,81 @@ ''dotlrn_applet'', ''RemoveApplet'', ''Remove the applet'', - ''f'', -- not cacheable - 0, -- n_args + ''f'', + 0, ''dotlrn_applet.RemoveApplet.InputType'', ''dotlrn_applet.RemoveApplet.OutputType'' ); - -- Add the applet to a community - -- Called at community creation time. Adding applets after creation time - -- is ** not implimented yet ** - perform acs_sc_msg_type__new( - ''dotlrn_applet.AddAppletToCommunity.InputType'', - ''community_id:integer'' - ); + -- Add the applet to a community + -- Called at community creation time. Adding applets after creation time + -- is ** not implimented yet ** + perform acs_sc_msg_type__new( + ''dotlrn_applet.AddAppletToCommunity.InputType'', + ''community_id:integer'' + ); - perform acs_sc_msg_type__new( - ''dotlrn_applet.AddAppletToCommunity.OutputType'', - ''success_p:boolean,error_message:string'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.AddAppletToCommunity.OutputType'', + ''success_p:boolean,error_message:string'' + ); - perform acs_sc_operation__new ( - ''dotlrn_applet'', - ''AddAppletToCommunity'', - ''Add the Applet to a specific dotlrn community'', - ''f'', -- not cacheable - 1, -- n_args - ''dotlrn_applet.AddAppletToCommunity.InputType'', - ''dotlrn_applet.AddAppletToCommunity.OutputType'' - ); + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''AddAppletToCommunity'', + ''Add the Applet to a specific dotlrn community'', + ''f'', + 1, + ''dotlrn_applet.AddAppletToCommunity.InputType'', + ''dotlrn_applet.AddAppletToCommunity.OutputType'' + ); - -- RemoveAppletFromCommunity: Removes the appletl from a community - -- Called at community delete time. Deleting applets before that time - -- ** not implimented yet ** - perform acs_sc_msg_type__new( - ''dotlrn_applet.RemoveAppletFromCommunity.InputType'', - ''community_id:integer'' - ); + -- RemoveAppletFromCommunity: Removes the appletl from a community + -- Called at community delete time. Deleting applets before that time + -- ** not implimented yet ** + perform acs_sc_msg_type__new( + ''dotlrn_applet.RemoveAppletFromCommunity.InputType'', + ''community_id:integer'' + ); - perform acs_sc_msg_type__new( - ''dotlrn_applet.RemoveAppletFromCommunity.OutputType'', - ''success_p:boolean,error_message:string'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.RemoveAppletFromCommunity.OutputType'', + ''success_p:boolean,error_message:string'' + ); - perform acs_sc_operation__new ( - ''dotlrn_applet'', - ''RemoveAppletFromCommunity'', - ''Remove the applet from a given community'', - ''f'', -- not cacheable - 1, -- n_args - ''dotlrn_applet.RemoveAppletFromCommunity.InputType'', - ''dotlrn_applet.RemoveAppletFromCommunity.OutputType'' - ); + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''RemoveAppletFromCommunity'', + ''Remove the applet from a given community'', + ''f'', + 1, + ''dotlrn_applet.RemoveAppletFromCommunity.InputType'', + ''dotlrn_applet.RemoveAppletFromCommunity.OutputType'' + ); - -- add a user to dotlrn (used for user-specific one time stuff) - -- Called when a user is added as a dotlrn user. An example: - -- dotlrn-calendar will create a personal calendar for the new user. - perform acs_sc_msg_type__new( - ''dotlrn_applet.AddUser.InputType'', - ''user_id:integer'' - ); + -- add a user to dotlrn (used for user-specific one time stuff) + -- Called when a user is added as a dotlrn user. An example: + -- dotlrn-calendar will create a personal calendar for the new user. + perform acs_sc_msg_type__new( + ''dotlrn_applet.AddUser.InputType'', + ''user_id:integer'' + ); - perform acs_sc_msg_type__new( - ''dotlrn_applet.AddUser.OutputType'', - ''success_p:boolean,error_message:string'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.AddUser.OutputType'', + ''success_p:boolean,error_message:string'' + ); - perform acs_sc_operation__new ( - ''dotlrn_applet'', - ''AddUser'', - ''Add a user to dotlrn, used for user-specific one-time init'', - ''f'', -- not cacheable - 1, -- n_args - ''dotlrn_applet.AddUser.InputType'', - ''dotlrn_applet.AddUser.OutputType'' - ); + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''AddUser'', + ''Add a user to dotlrn, used for user-specific one-time init'', + ''f'', + 1, + ''dotlrn_applet.AddUser.InputType'', + ''dotlrn_applet.AddUser.OutputType'' + ); - -- RemoveUser: used for user-specific one time stuff -- Just like AddUser above, but when we delete a dotlrn user -- Example: dotlrn-calendar would delete the user''s personal calendar @@ -191,122 +192,142 @@ ''dotlrn_applet'', ''RemoveUser'', ''Remove a user from dotlrn'', - ''f'', -- not cacheable - 1, -- n_args + ''f'', + 1, ''dotlrn_applet.RemoveUser.InputType'', ''dotlrn_applet.RemoveUser.OutputType'' ); -- AddUserToCommunity: Adds a user to the a specfic dotlrn community. -- An example of this is to make the community''s calendar items -- visable on user''s personal calendar - perform acs_sc_msg_type__new( - ''dotlrn_applet.AddUserToCommunity.InputType'', - ''community_id:integer,user_id:integer'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.AddUserToCommunity.InputType'', + ''community_id:integer,user_id:integer'' + ); - perform acs_sc_msg_type__new( - ''dotlrn_applet.AddUserToCommunity.OutputType'', - ''success_p:boolean,error_message:string'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.AddUserToCommunity.OutputType'', + ''success_p:boolean,error_message:string'' + ); - perform acs_sc_operation__new ( - ''dotlrn_applet'', - ''AddUserToCommunity'', - ''Add a user to a community'', - ''f'', -- not cacheable - 2, -- n_args - ''dotlrn_applet.AddUserToCommunity.InputType'', - ''dotlrn_applet.AddUserToCommunity.OutputType'' - ); + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''AddUserToCommunity'', + ''Add a user to a community'', + ''f'', + 2, + ''dotlrn_applet.AddUserToCommunity.InputType'', + ''dotlrn_applet.AddUserToCommunity.OutputType'' + ); -- RemoveUserFromCommunity: Removes a user from a specfic dotlrn -- community. Just like above, but removal. - perform acs_sc_msg_type__new( - ''dotlrn_applet.RemoveUserFromCommunity.InputType'', - ''community_id:integer,user_id:integer'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.RemoveUserFromCommunity.InputType'', + ''community_id:integer,user_id:integer'' + ); - perform acs_sc_msg_type__new( - ''dotlrn_applet.RemoveUserFromCommunity.OutputType'', - ''success_p:boolean,error_message:string'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.RemoveUserFromCommunity.OutputType'', + ''success_p:boolean,error_message:string'' + ); - perform acs_sc_operation__new ( - ''dotlrn_applet'', - ''RemoveUserFromCommunity'', - ''Remove a user from a community, applet does appropriate cleanup'', - ''f'', -- not cacheable - 2, -- n_args - ''dotlrn_applet.RemoveUserFromCommunity.InputType'', - ''dotlrn_applet.RemoveUserFromCommunity.OutputType'' - ); + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''RemoveUserFromCommunity'', + ''Remove a user from a community, applet does appropriate cleanup'', + ''f'', + 2, + ''dotlrn_applet.RemoveUserFromCommunity.InputType'', + ''dotlrn_applet.RemoveUserFromCommunity.OutputType'' + ); -- AddPortlet: Adds the underlying portlet to the given portal - perform acs_sc_msg_type__new( - ''dotlrn_applet.AddPortlet.InputType'', - ''portal_id:integer'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.AddPortlet.InputType'', + ''portal_id:integer'' + ); - perform acs_sc_msg_type__new( - ''dotlrn_applet.AddPortlet.OutputType'', - ''success_p:boolean,error_message:string'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.AddPortlet.OutputType'', + ''success_p:boolean,error_message:string'' + ); - perform acs_sc_operation__new ( - ''dotlrn_applet'', - ''AddPortlet'', - ''Adds the underlying portlet to the portal specified'', - ''f'', -- not cacheable - 1, -- n_args - ''dotlrn_applet.AddPortlet.InputType'', - ''dotlrn_applet.AddPortlet.OutputType'' - ); + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''AddPortlet'', + ''Adds the underlying portlet to the portal specified'', + ''f'', + 1, + ''dotlrn_applet.AddPortlet.InputType'', + ''dotlrn_applet.AddPortlet.OutputType'' + ); -- RemovePortlet: the remove corollary of above - perform acs_sc_msg_type__new( - ''dotlrn_applet.RemovePortlet.InputType'', - ''portal_id:integer,args:string'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.RemovePortlet.InputType'', + ''portal_id:integer,args:string'' + ); - perform acs_sc_msg_type__new( - ''dotlrn_applet.RemovePortlet.OutputType'', - ''success_p:boolean,error_message:string'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.RemovePortlet.OutputType'', + ''success_p:boolean,error_message:string'' + ); - perform acs_sc_operation__new ( - ''dotlrn_applet'', - ''RemovePortlet'', - ''Removes the underlying portlet from the given portal'', - ''f'', -- not cacheable - 2, -- n_args - ''dotlrn_applet.RemovePortlet.InputType'', - ''dotlrn_applet.RemovePortlet.OutputType'' - ); + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''RemovePortlet'', + ''Removes the underlying portlet from the given portal'', + ''f'', + 2, + ''dotlrn_applet.RemovePortlet.InputType'', + ''dotlrn_applet.RemovePortlet.OutputType'' + ); -- Clone: Attack of the Clones! - perform acs_sc_msg_type__new( - ''dotlrn_applet.Clone.InputType'', - ''old_community_id:integer,new_community_id:integer'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.Clone.InputType'', + ''old_community_id:integer,new_community_id:integer'' + ); - perform acs_sc_msg_type__new( - ''dotlrn_applet.Clone.OutputType'', - ''success_p:boolean,error_message:string'' - ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.Clone.OutputType'', + ''success_p:boolean,error_message:string'' + ); - perform acs_sc_operation__new ( - ''dotlrn_applet'', - ''Clone'', - ''Clone this applets content from the old to the new community'', - ''f'', -- not cacheable - 2, -- n_args - ''dotlrn_applet.Clone.InputType'', - ''dotlrn_applet.Clone.OutputType'' - ); + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''Clone'', + ''Clone this applets content from the old to the new community'', + ''f'', + 2, + ''dotlrn_applet.Clone.InputType'', + ''dotlrn_applet.Clone.OutputType'' + ); - return 0; + perform acs_sc_msg_type__new( + ''dotlrn_applet.ChangeEventHandler.InputType'', + ''community_id:integer,event:string,old_value:string,new_value:string'' + ); + perform acs_sc_msg_type__new( + ''dotlrn_applet.ChangeEventHandler.OutputType'', + ''success_p:boolean,error_message:string'' + ); + + perform acs_sc_operation__new ( + ''dotlrn_applet'', + ''ChangeEventHandler'', + ''Handles changes to communities'', + ''f'', + 4, + ''dotlrn_applet.ChangeEventHandler.InputType'', + ''dotlrn_applet.ChangeEventHandler.OutputType'' + ); + + return 0; + end; ' language 'plpgsql'; Index: openacs-4/packages/dotlrn/sql/postgresql/applet-sc-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/applet-sc-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/postgresql/applet-sc-drop.sql 8 Jul 2002 21:04:16 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/postgresql/applet-sc-drop.sql 31 Jul 2002 21:18:32 -0000 1.2 @@ -183,6 +183,19 @@ ''dotlrn_applet.Clone.OutputType'' ); + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''ChangeEventHandler'' + ); + + perform acs_sc_msg_type__delete( + ''dotlrn_applet.ChangeEventHandler.InputType'' + ); + + perform acs_sc_msg_type__delete( + ''dotlrn_applet.ChangeEventHandler.OutputType'' + ); + perform acs_sc_contract__delete( ''dotlrn_applet'' ); @@ -193,5 +206,3 @@ select inline_0(); drop function inline_0(); - - Index: openacs-4/packages/dotlrn/tcl/applets-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/applets-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/dotlrn/tcl/applets-procs.tcl 13 Jul 2002 03:05:24 -0000 1.15 +++ openacs-4/packages/dotlrn/tcl/applets-procs.tcl 31 Jul 2002 21:18:32 -0000 1.16 @@ -130,8 +130,6 @@ } { is the applet specified mounted } { - ns_log notice "YON: dotlrn_applet::is_applet_mounted applet_key $applet_key" - ns_log notice "YON: dotlrn_applet::is_applet_mounted package_key [get_package_key -applet_key $applet_key]" if {[apm_package_id_from_key [get_package_key -applet_key $applet_key]] != 0} { return 1 } else { @@ -169,4 +167,23 @@ return [db_string select_package_key_from_applet_key {} -default ""] } + ad_proc -public dispatch { + {-op:required} + {-list_args {}} + } { + foreach applet [list_applets] { + applet_call $applet $op $list_args + } + } + + ad_proc -public applet_call { + applet_key + op + {list_args {}} + } { + call a particular applet op + } { + acs_sc_call dotlrn_applet $op $list_args $applet_key + } + } Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.161 -r1.162 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 26 Jul 2002 02:00:02 -0000 1.161 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 31 Jul 2002 21:18:32 -0000 1.162 @@ -771,7 +771,8 @@ db_transaction { membership_rel::approve -rel_id $rel_id - applets_dispatch -community_id $community_id \ + applets_dispatch \ + -community_id $community_id \ -op AddUserToCommunity \ -list_args [list $community_id $user_id] } @@ -1213,8 +1214,16 @@ } { update the name for a community } { + set old_value [get_community_name $community_id] db_dml update_community_name {} util_memoize_flush "dotlrn_community::get_community_name_not_cached $community_id" + + # generate "rename" event + raise_change_event \ + -community_id $community_id \ + -event rename \ + -old_value $old_value \ + -new_value $pretty_name } ad_proc -public get_community_name { @@ -1760,32 +1769,19 @@ } ad_proc -public list_applets { - {-community_id ""} + {-community_id:required} } { - Lists the applets associated with a community or all the dotlrn applets + lists the applets associated with a community } { - if {[empty_string_p $community_id]} { - # List all applets - return [db_list select_all_applets {}] - } else { - # List from the DB - return [db_list select_community_applets {}] - } + return [db_list select_community_applets {}] } ad_proc -public list_active_applets { - {-community_id ""} + {-community_id:required} } { - Lists the applets associated with a community or only the active dotlrn - applets + lists the applets associated with a community } { - if {[empty_string_p $community_id]} { - # List all applets - return [db_list select_all_active_applets {}] - } else { - # List from the DB - return [db_list select_community_active_applets {}] - } + return [db_list select_community_active_applets {}] } ad_proc -public applet_active_p { @@ -1799,44 +1795,14 @@ } ad_proc -public applets_dispatch { - {-community_id ""} + {-community_id:required} {-op:required} {-list_args {}} - {-reorder_hack_p ""} } { Dispatch an operation to every applet, either in one communtiy or on all the active dotlrn applets } { - set list_of_applets [list_active_applets -community_id $community_id] - - if {![empty_string_p $reorder_hack_p]} { - ns_log notice "applets_dispatch: reorder hack!" - - set reorder_applets_string [parameter::get \ - -parameter user_wsp_applet_ordering \ - -default "dotlrn_news,dotlrn_bboard,dotlrn_faq" - ] - - - set reorder_applets_list [string trim [split $reorder_applets_string {,}]] - - # check if the applet is both in the reorder list and the applet list - # if so, put it into the right place in the result list - # if not, skip it - set result_list [list] - foreach applet $reorder_applets_list { - set index [lsearch -exact $list_of_applets $applet] - - if {$index != -1} { - set list_of_applets [lreplace $list_of_applets $index $index] - lappend result_list $applet - } - } - - set list_of_applets [concat $result_list $list_of_applets] - } - - foreach applet $list_of_applets { + foreach applet [list_active_applets -community_id $community_id] { applet_call $applet $op $list_args } } @@ -1846,7 +1812,7 @@ op {list_args {}} } { - Call a particular applet op + call a particular applet op } { acs_sc_call dotlrn_applet $op $list_args $applet_key } @@ -2015,4 +1981,18 @@ return $valid_p } + ad_proc -private raise_change_event { + {-community_id:required} + {-event:required} + {-old_value:required} + {-new_value:required} + } { + raise a change event so that anyone interested can take action + } { + applets_dispatch \ + -community_id $community_id \ + -op ChangeEventHandler \ + -list_args [list $community_id $event $old_value $new_value] + } + } Index: openacs-4/packages/dotlrn/tcl/community-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.xql,v diff -u -r1.77 -r1.78 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 30 Jul 2002 18:29:27 -0000 1.77 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 31 Jul 2002 21:18:32 -0000 1.78 @@ -468,18 +468,6 @@ - - - select impl_name - from acs_sc_impls, - acs_sc_bindings, - acs_sc_contracts - where acs_sc_impls.impl_id = acs_sc_bindings.impl_id - and acs_sc_contracts.contract_id = acs_sc_bindings.contract_id - and acs_sc_contracts.contract_name = 'dotlrn_applet' - - - select dotlrn_applets.applet_key @@ -490,14 +478,6 @@ - - - select applet_key - from dotlrn_applets - where active_p = 't' - - - select dotlrn_applets.applet_key Index: openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 29 Jul 2002 12:50:53 -0000 1.31 +++ openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 31 Jul 2002 21:18:32 -0000 1.32 @@ -75,9 +75,8 @@ # The applet_add proc in the dotlrn_applet contract is for one-time # init of each applet NOTE: this applet_add proc _must_ be able to be # called repeatedly since this script is eval'd at every server startup - foreach applet [dotlrn_community::list_applets] { - ns_log notice "dotlrn-init: calling ${applet}::AddApplet" - dotlrn_community::applet_call $applet AddApplet [list] + foreach applet [db_list select_not_installed_applets {}] { + dotlrn_applet::applet_call $applet AddApplet [list] } ns_log notice "dotlrn-init: dotlrn is instantiated, about to call dotlrn::init" Index: openacs-4/packages/dotlrn/tcl/dotlrn-init.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-init.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/tcl/dotlrn-init.xql 31 Jul 2002 21:18:32 -0000 1.1 @@ -0,0 +1,17 @@ + + + + + + + select acs_sc_impls.impl_name + from acs_sc_impls, + acs_sc_bindings, + acs_sc_contracts + where acs_sc_contracts.contract_name = 'dotlrn_applet' + and acs_sc_contracts.contract_id = acs_sc_bindings.contract_id + and acs_sc_impls.impl_id = acs_sc_bindings.impl_id + + + + Index: openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl,v diff -u -r1.47 -r1.48 --- openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 29 Jul 2002 18:45:49 -0000 1.47 +++ openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 31 Jul 2002 21:18:32 -0000 1.48 @@ -134,7 +134,7 @@ $user_id \ ] - dotlrn_community::applets_dispatch -op AddUser -list_args [list $user_id] + dotlrn_applet::dispatch -op AddUser -list_args [list $user_id] # if the user is a member of communities (from some previous # dotlrn relation) then we must remove them from the community and Index: openacs-4/packages/dotlrn/www/applets-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/applets-chunk.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn/www/applets-chunk.tcl 13 Jul 2002 17:49:25 -0000 1.7 +++ openacs-4/packages/dotlrn/www/applets-chunk.tcl 31 Jul 2002 21:18:32 -0000 1.8 @@ -41,7 +41,7 @@ } # List all applets -set list_of_applets [dotlrn_community::list_applets] +set list_of_applets [dotlrn_applet::list_applets] template::multirow create all_applets applet_key applet_pretty_name Index: openacs-4/packages/dotlrn/www/index-not-a-user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/index-not-a-user.adp,v diff -u -r1.13 -r1.14 --- openacs-4/packages/dotlrn/www/index-not-a-user.adp 15 Jul 2002 03:30:25 -0000 1.13 +++ openacs-4/packages/dotlrn/www/index-not-a-user.adp 31 Jul 2002 21:18:32 -0000 1.14 @@ -21,6 +21,10 @@ Not a User -

Visit @admin_pretty_name@.

+ +

Visit @admin_pretty_name@.

+ +
+ Thank you. Your registration request has been sent to the System Administrator. Index: openacs-4/packages/dotlrn-bm/sql/oracle/dotlrn-bm-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bm/sql/oracle/dotlrn-bm-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-bm/sql/oracle/dotlrn-bm-create.sql 15 May 2002 22:12:16 -0000 1.1 +++ openacs-4/packages/dotlrn-bm/sql/oracle/dotlrn-bm-create.sql 31 Jul 2002 21:18:32 -0000 1.2 @@ -128,6 +128,14 @@ impl_pl => 'TCL' ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_bm', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_bm::change_event_handler', + impl_pl => 'TCL' + ); + acs_sc_binding.new( contract_name => 'dotlrn_applet', impl_name => 'dotlrn_bm' Index: openacs-4/packages/dotlrn-bm/sql/postgresql/dotlrn-bm-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bm/sql/postgresql/dotlrn-bm-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-bm/sql/postgresql/dotlrn-bm-create.sql 15 Jul 2002 20:43:41 -0000 1.1 +++ openacs-4/packages/dotlrn-bm/sql/postgresql/dotlrn-bm-create.sql 31 Jul 2002 21:18:32 -0000 1.2 @@ -128,10 +128,15 @@ 'TCL' ); +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'ChangeEventHandler', + 'dotlrn_bm::change_event_handler', + 'TCL' +); + select acs_sc_binding__new( 'dotlrn_applet', --contract name 'dotlrn_bm' --impl name ); - - - Index: openacs-4/packages/dotlrn-bm/tcl/dotlrn-bm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bm/tcl/dotlrn-bm-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn-bm/tcl/dotlrn-bm-procs.tcl 13 Jul 2002 03:05:24 -0000 1.7 +++ openacs-4/packages/dotlrn-bm/tcl/dotlrn-bm-procs.tcl 31 Jul 2002 21:18:32 -0000 1.8 @@ -173,6 +173,16 @@ add_applet_to_community $new_community_id } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: + } { + } + ad_proc -public get_package_id { } { returns the package_id of the dotlrn-bm package Index: openacs-4/packages/dotlrn-calendar/sql/oracle/dotlrn-calendar-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-calendar/sql/oracle/dotlrn-calendar-create.sql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn-calendar/sql/oracle/dotlrn-calendar-create.sql 10 May 2002 06:35:14 -0000 1.6 +++ openacs-4/packages/dotlrn-calendar/sql/oracle/dotlrn-calendar-create.sql 31 Jul 2002 21:18:32 -0000 1.7 @@ -140,6 +140,14 @@ impl_pl => 'TCL' ); + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_calendar', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_calendar::change_event_handler', + impl_pl => 'TCL' + ); + -- Add the binding acs_sc_binding.new ( contract_name => 'dotlrn_applet', Index: openacs-4/packages/dotlrn-calendar/sql/postgresql/dotlrn-calendar-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-calendar/sql/postgresql/dotlrn-calendar-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-calendar/sql/postgresql/dotlrn-calendar-create.sql 9 Jul 2002 18:53:27 -0000 1.1 +++ openacs-4/packages/dotlrn-calendar/sql/postgresql/dotlrn-calendar-create.sql 31 Jul 2002 21:18:32 -0000 1.2 @@ -144,6 +144,14 @@ ''TCL'' ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_calendar'', + ''ChangeEventHandler'', + ''dotlrn_calendar::change_event_handler'', + ''TCL'' + ); + -- Add the binding perform acs_sc_binding__new ( ''dotlrn_applet'', Index: openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl,v diff -u -r1.62 -r1.63 --- openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl 13 Jul 2002 00:13:09 -0000 1.62 +++ openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl 31 Jul 2002 21:18:32 -0000 1.63 @@ -432,6 +432,31 @@ db_dml copy_cal_item_types {} } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: rename + } { + switch $event { + rename { + handle_rename -community_id $community_id -old_value $old_value -new_value $new_value + } + } + } + + ad_proc -private handle_rename { + {-community_id:required} + {-old_value:required} + {-new_value:required} + } { + what to do in calendar when a dotlrn community is renamed + } { + calendar::rename -calendar_id [get_group_calendar_id -community_id $community_id] -name $new_value + } + # # Some dotlrn_calendar specific procs # Index: openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-dotlrn-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-dotlrn-create.sql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-dotlrn-create.sql 24 May 2002 01:58:46 -0000 1.9 +++ openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-dotlrn-create.sql 31 Jul 2002 21:18:32 -0000 1.10 @@ -147,6 +147,15 @@ impl_alias => 'dotlrn_dotlrn::clone', impl_pl => 'TCL' ); + + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_dotlrn', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_dotlrn::change_event_handler', + impl_pl => 'TCL' + ); + -- Add the binding acs_sc_binding.new ( contract_name => 'dotlrn_applet', Index: openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-members-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-members-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-members-create.sql 10 May 2002 06:35:14 -0000 1.4 +++ openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-members-create.sql 31 Jul 2002 21:18:32 -0000 1.5 @@ -147,6 +147,14 @@ impl_pl => 'TCL' ); + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_members', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_members::change_event_handler', + impl_pl => 'TCL' + ); + -- Add the binding acs_sc_binding.new ( contract_name => 'dotlrn_applet', Index: openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-members-staff-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-members-staff-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-members-staff-create.sql 10 May 2002 06:35:14 -0000 1.4 +++ openacs-4/packages/dotlrn-dotlrn/sql/oracle/dotlrn-members-staff-create.sql 31 Jul 2002 21:18:32 -0000 1.5 @@ -147,6 +147,14 @@ impl_pl => 'TCL' ); + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_members_staff', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_members_staff::change_event_handler', + impl_pl => 'TCL' + ); + -- Add the binding acs_sc_binding.new ( contract_name => 'dotlrn_applet', Index: openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-dotlrn-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-dotlrn-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-dotlrn-create.sql 8 Jul 2002 23:00:32 -0000 1.3 +++ openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-dotlrn-create.sql 31 Jul 2002 21:18:32 -0000 1.4 @@ -150,6 +150,15 @@ ''dotlrn_dotlrn::clone'', ''TCL'' ); + + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_dotlrn'', + ''ChangeEventHandler'', + ''dotlrn_dotlrn::change_event_handler'', + ''TCL'' + ); + -- Add the binding perform acs_sc_binding__new ( ''dotlrn_applet'', Index: openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-members-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-members-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-members-create.sql 8 Jul 2002 23:00:32 -0000 1.2 +++ openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-members-create.sql 31 Jul 2002 21:18:32 -0000 1.3 @@ -145,8 +145,8 @@ foo := acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_members'', - ''Clone'', - ''dotlrn_members::clone'', + ''ChangeEventHandler'', + ''dotlrn_members::change_event_handler'', ''TCL'' ); Index: openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-members-staff-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-members-staff-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-members-staff-create.sql 8 Jul 2002 23:00:32 -0000 1.3 +++ openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-members-staff-create.sql 31 Jul 2002 21:18:32 -0000 1.4 @@ -150,6 +150,14 @@ ''TCL'' ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_members_staff'', + ''ChangeEventHandler'', + ''dotlrn_members_staff::change_event_handler'', + ''TCL'' + ); + -- Add the binding perform acs_sc_binding__new ( ''dotlrn_applet'', Index: openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-dotlrn-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-dotlrn-procs.tcl,v diff -u -r1.32 -r1.33 --- openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-dotlrn-procs.tcl 13 Jul 2002 00:13:09 -0000 1.32 +++ openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-dotlrn-procs.tcl 31 Jul 2002 21:18:32 -0000 1.33 @@ -275,6 +275,15 @@ return [add_applet_to_community $new_community_id] } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: + } { + } # misc procs Index: openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-members-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-members-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-members-procs.tcl 13 Jul 2002 00:13:09 -0000 1.15 +++ openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-members-procs.tcl 31 Jul 2002 21:18:32 -0000 1.16 @@ -186,6 +186,16 @@ return [dotlrn_members::add_applet_to_community $new_community_id] } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: + } { + } + # # misc procs # Index: openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-members-staff-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-members-staff-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-members-staff-procs.tcl 13 Jul 2002 00:13:09 -0000 1.12 +++ openacs-4/packages/dotlrn-dotlrn/tcl/dotlrn-members-staff-procs.tcl 31 Jul 2002 21:18:32 -0000 1.13 @@ -159,4 +159,15 @@ } { return [add_applet_to_community $new_community_id] } + + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: + } { + } + } Index: openacs-4/packages/dotlrn-faq/sql/oracle/dotlrn-faq-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-faq/sql/oracle/dotlrn-faq-create.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn-faq/sql/oracle/dotlrn-faq-create.sql 10 May 2002 06:35:14 -0000 1.7 +++ openacs-4/packages/dotlrn-faq/sql/oracle/dotlrn-faq-create.sql 31 Jul 2002 21:18:32 -0000 1.8 @@ -147,6 +147,14 @@ impl_pl => 'TCL' ); + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_faq', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_faq::change_event_handler', + impl_pl => 'TCL' + ); + -- Add the binding acs_sc_binding.new ( contract_name => 'dotlrn_applet', Index: openacs-4/packages/dotlrn-faq/sql/postgresql/dotlrn-faq-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-faq/sql/postgresql/dotlrn-faq-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-faq/sql/postgresql/dotlrn-faq-create.sql 10 Jul 2002 16:56:04 -0000 1.1 +++ openacs-4/packages/dotlrn-faq/sql/postgresql/dotlrn-faq-create.sql 31 Jul 2002 21:18:33 -0000 1.2 @@ -150,6 +150,14 @@ 'TCL' ); +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_faq', + 'ChangeEventHandler', + 'dotlrn_faq::change_event_handler', + 'TCL' +); + -- Add the binding select acs_sc_binding__new ( 'dotlrn_applet', Index: openacs-4/packages/dotlrn-faq/tcl/dotlrn-faq-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-faq/tcl/dotlrn-faq-procs.tcl,v diff -u -r1.37 -r1.38 --- openacs-4/packages/dotlrn-faq/tcl/dotlrn-faq-procs.tcl 13 Jul 2002 00:16:37 -0000 1.37 +++ openacs-4/packages/dotlrn-faq/tcl/dotlrn-faq-procs.tcl 31 Jul 2002 21:18:33 -0000 1.38 @@ -239,4 +239,14 @@ return $new_package_id } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: + } { + } + } Index: openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-create.sql 30 May 2002 06:28:03 -0000 1.1 +++ openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-create.sql 31 Jul 2002 21:18:33 -0000 1.2 @@ -14,144 +14,133 @@ -- details. -- - -- -- The forums applet for dotLRN --- copyright 2001, OpenForce --- distributed under GPL v2.0 -- +-- @author Ben Adida (ben@openforce.net) +-- @creation-date 2002-05-29 +-- @version $Id$ -- --- ben,arjun@openforce.net --- --- 10/05/2001 --- redone for Forums by Ben 05/29/2002 --- - declare - foo integer; + foo integer; begin - -- create the implementation - foo := acs_sc_impl.new ( - 'dotlrn_applet', - 'dotlrn_forums', - 'dotlrn_forums' - ); - -- add all the hooks + foo := acs_sc_impl.new( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', + impl_owner_name => 'dotlrn_forums' + ); - -- GetPrettyName - foo := acs_sc_impl.new_alias ( - 'dotlrn_applet', - 'dotlrn_forums', - 'GetPrettyName', - 'dotlrn_forums::get_pretty_name', - 'TCL' - ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', + impl_operation_name => 'GetPrettyName', + impl_alias => 'dotlrn_forums::get_pretty_name', + impl_pl => 'TCL' + ); - -- AddApplet - foo := acs_sc_impl.new_alias ( - 'dotlrn_applet', - 'dotlrn_forums', - 'AddApplet', - 'dotlrn_forums::add_applet', - 'TCL' - ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', + impl_operation_name => 'AddApplet', + impl_alias => 'dotlrn_forums::add_applet', + impl_pl => 'TCL' + ); - -- RemoveApplet - foo := acs_sc_impl.new_alias ( - 'dotlrn_applet', - 'dotlrn_forums', - 'RemoveApplet', - 'dotlrn_forums::remove_applet', - 'TCL' - ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', + impl_operation_name => 'RemoveApplet', + impl_alias => 'dotlrn_forums::remove_applet', + impl_pl => 'TCL' + ); - -- AddAppletToCommunity - foo := acs_sc_impl.new_alias ( - 'dotlrn_applet', - 'dotlrn_forums', - 'AddAppletToCommunity', - 'dotlrn_forums::add_applet_to_community', - 'TCL' - ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', + impl_operation_name => 'AddAppletToCommunity', + impl_alias => 'dotlrn_forums::add_applet_to_community', + impl_pl => 'TCL' + ); - -- RemoveAppletFromCommunity - foo := acs_sc_impl.new_alias ( - 'dotlrn_applet', - 'dotlrn_forums', - 'RemoveAppletFromCommunity', - 'dotlrn_forums::remove_applet_from_community', - 'TCL' - ); - -- AddUser - foo := acs_sc_impl.new_alias ( - 'dotlrn_applet', - 'dotlrn_forums', - 'AddUser', - 'dotlrn_forums::add_user', - 'TCL' - ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', + impl_operation_name => 'RemoveAppletFromCommunity', + impl_alias => 'dotlrn_forums::remove_applet_from_community', + impl_pl => 'TCL' + ); - -- RemoveUser - foo := acs_sc_impl.new_alias ( - 'dotlrn_applet', - 'dotlrn_forums', - 'RemoveUser', - 'dotlrn_forums::remove_user', - 'TCL' - ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', + impl_operation_name => 'AddUser', + impl_alias => 'dotlrn_forums::add_user', + impl_pl => 'TCL' + ); - -- AddUserToCommunity - foo := acs_sc_impl.new_alias ( - 'dotlrn_applet', - 'dotlrn_forums', - 'AddUserToCommunity', - 'dotlrn_forums::add_user_to_community', - 'TCL' - ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', + impl_operation_name => 'RemoveUser', + impl_alias => 'dotlrn_forums::remove_user', + impl_pl => 'TCL' + ); - -- RemoveUserFromCommunity - foo := acs_sc_impl.new_alias ( - 'dotlrn_applet', - 'dotlrn_forums', - 'RemoveUserFromCommunity', - 'dotlrn_forums::remove_user_from_community', - 'TCL' - ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', + impl_operation_name => 'AddUserToCommunity', + impl_alias => 'dotlrn_forums::add_user_to_community', + impl_pl => 'TCL' + ); - -- AddPortlet - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_forums', + impl_operation_name => 'RemoveUserFromCommunity', + impl_alias => 'dotlrn_forums::remove_user_from_community', + impl_pl => 'TCL' + ); + + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', impl_operation_name => 'AddPortlet', impl_alias => 'dotlrn_forums::add_portlet', impl_pl => 'TCL' ); - -- RemovePortlet - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_forums', impl_operation_name => 'RemovePortlet', impl_alias => 'dotlrn_forums::remove_portlet', impl_pl => 'TCL' ); - -- Clone - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_forums', impl_operation_name => 'Clone', impl_alias => 'dotlrn_forums::clone', impl_pl => 'TCL' ); - -- Add the binding - acs_sc_binding.new ( - contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums' - ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_forums::change_event_handler', + impl_pl => 'TCL' + ); + + acs_sc_binding.new( + contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums' + ); + end; / show errors Index: openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql 15 Jul 2002 20:43:41 -0000 1.1 +++ openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql 31 Jul 2002 21:18:33 -0000 1.2 @@ -14,125 +14,109 @@ -- details. -- - -- -- The forums applet for dotLRN --- copyright 2001, OpenForce --- distributed under GPL v2.0 -- +-- @author Ben Adida (ben@openforce.net) +-- @creation-date 2002-05-29 +-- @version $Id$ -- --- ben,arjun@openforce.net --- --- 10/05/2001 --- redone for Forums by Ben 05/29/2002 --- -- ported to postgres by mohan pakkurti (mohan@pakkurti.com) -- 2002-07-12 +-- create function inline_0() returns integer as ' declare - foo integer; + foo integer; begin - -- create the implementation - foo := acs_sc_impl__new ( - ''dotlrn_applet'', - ''dotlrn_forums'', - ''dotlrn_forums'' - ); - -- add all the hooks + foo := acs_sc_impl__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''dotlrn_forums'' + ); - -- GetPrettyName - foo := acs_sc_impl_alias__new ( - ''dotlrn_applet'', - ''dotlrn_forums'', - ''GetPrettyName'', - ''dotlrn_forums::get_pretty_name'', - ''TCL'' - ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''GetPrettyName'', + ''dotlrn_forums::get_pretty_name'', + ''TCL'' + ); - -- AddApplet - foo := acs_sc_impl_alias__new ( - ''dotlrn_applet'', - ''dotlrn_forums'', - ''AddApplet'', - ''dotlrn_forums::add_applet'', - ''TCL'' - ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''AddApplet'', + ''dotlrn_forums::add_applet'', + ''TCL'' + ); - -- RemoveApplet - foo := acs_sc_impl_alias__new ( - ''dotlrn_applet'', - ''dotlrn_forums'', - ''RemoveApplet'', - ''dotlrn_forums::remove_applet'', - ''TCL'' - ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''RemoveApplet'', + ''dotlrn_forums::remove_applet'', + ''TCL'' + ); - -- AddAppletToCommunity - foo := acs_sc_impl_alias__new ( - ''dotlrn_applet'', - ''dotlrn_forums'', - ''AddAppletToCommunity'', - ''dotlrn_forums::add_applet_to_community'', - ''TCL'' - ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''AddAppletToCommunity'', + ''dotlrn_forums::add_applet_to_community'', + ''TCL'' + ); - -- RemoveAppletFromCommunity - foo := acs_sc_impl_alias__new ( - ''dotlrn_applet'', - ''dotlrn_forums'', - ''RemoveAppletFromCommunity'', - ''dotlrn_forums::remove_applet_from_community'', - ''TCL'' - ); - -- AddUser - foo := acs_sc_impl_alias__new ( - ''dotlrn_applet'', - ''dotlrn_forums'', - ''AddUser'', - ''dotlrn_forums::add_user'', - ''TCL'' - ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''RemoveAppletFromCommunity'', + ''dotlrn_forums::remove_applet_from_community'', + ''TCL'' + ); - -- RemoveUser - foo := acs_sc_impl_alias__new ( - ''dotlrn_applet'', - ''dotlrn_forums'', - ''RemoveUser'', - ''dotlrn_forums::remove_user'', - ''TCL'' - ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''AddUser'', + ''dotlrn_forums::add_user'', + ''TCL'' + ); - -- AddUserToCommunity - foo := acs_sc_impl_alias__new ( - ''dotlrn_applet'', - ''dotlrn_forums'', - ''AddUserToCommunity'', - ''dotlrn_forums::add_user_to_community'', - ''TCL'' - ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''RemoveUser'', + ''dotlrn_forums::remove_user'', + ''TCL'' + ); - -- RemoveUserFromCommunity - foo := acs_sc_impl_alias__new ( - ''dotlrn_applet'', - ''dotlrn_forums'', - ''RemoveUserFromCommunity'', - ''dotlrn_forums::remove_user_from_community'', - ''TCL'' - ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''AddUserToCommunity'', + ''dotlrn_forums::add_user_to_community'', + ''TCL'' + ); - -- AddPortlet foo := acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', + ''RemoveUserFromCommunity'', + ''dotlrn_forums::remove_user_from_community'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', ''AddPortlet'', ''dotlrn_forums::add_portlet'', ''TCL'' ); - -- RemovePortlet foo := acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', @@ -141,7 +125,6 @@ ''TCL'' ); - -- Clone foo := acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', @@ -150,14 +133,21 @@ ''TCL'' ); - -- Add the binding - perform acs_sc_binding__new ( - ''dotlrn_applet'', - ''dotlrn_forums'' - ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''ChangeEventHandler'', + ''dotlrn_forums::change_event_handler'', + ''TCL'' + ); - return 0; + perform acs_sc_binding__new ( + ''dotlrn_applet'', + ''dotlrn_forums'' + ); + return 0; + end;' language 'plpgsql'; select inline_0(); Index: openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.tcl 13 Jul 2002 03:05:24 -0000 1.7 +++ openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.tcl 31 Jul 2002 21:18:33 -0000 1.8 @@ -97,17 +97,12 @@ ] # mount attachments under forums, if available - # attachments requires that dotlrn-fs is already mounted - if {[apm_package_registered_p attachments] - && [dotlrn_community::applet_active_p \ - -community_id $community_id \ - -applet_key [dotlrn_fs::applet_key]]} { + # attachments requires that dotlrn-fs is already mounted + if {[apm_package_registered_p attachments] && [dotlrn_community::applet_active_p -community_id $community_id -applet_key [dotlrn_fs::applet_key]]} { set attachments_node_id [site_node::new \ -name [attachments::get_url] \ - -parent_id [site_node::get_node_id_from_object_id \ - -object_id $package_id - ] + -parent_id [site_node::get_node_id_from_object_id -object_id $package_id] ] site_node::mount \ @@ -116,18 +111,16 @@ set fs_package_id [dotlrn_community::get_applet_package_id \ -community_id $community_id \ - -applet_key [dotlrn_fs::applet_key] + -applet_key [dotlrn_fs::applet_key] \ ] - + # map the fs root folder to the package_id of the new forums pkg attachments::map_root_folder \ -package_id $package_id \ - -folder_id [fs::get_root_folder -package_id $fs_package_id] - - } else { - ns_log Warning "DOTLRN-FORUMS: Warning attachments or dotlrn-fs not found!" + -folder_id [fs::get_root_folder -package_id $fs_package_id] + } - + set auto_create_forum_p [parameter::get_from_package_key \ -package_key [my_package_key] \ -parameter auto_create_forum_p \ @@ -326,4 +319,47 @@ dotlrn_forums::add_applet_to_community $new_community_id } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: rename + } { + switch $event { + rename { + handle_rename -community_id $community_id -old_value $old_value -new_value $new_value + } + } + } + + ad_proc -private handle_rename { + {-community_id:required} + {-old_value:required} + {-new_value:required} + } { + what to do with forums when the name of the community changes + } { + set package_id [dotlrn_community::get_applet_package_id \ + -community_id $community_id \ + -applet_key [applet_key] \ + ] + set name "$old_value Forum" + + db_foreach select_forums_with_old_name { + select * + from forums_forums + where package_id = :package_id + and name = :name + } { + forum::edit \ + -forum_id $forum_id \ + -name "$new_value Forum" \ + -charter $charter \ + -presentation_type $presentation_type \ + -posting_policy $posting_policy + } + } + } Index: openacs-4/packages/dotlrn-fs/dotlrn-fs.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/dotlrn-fs.info,v diff -u -r1.17 -r1.18 --- openacs-4/packages/dotlrn-fs/dotlrn-fs.info 9 Jul 2002 21:42:16 -0000 1.17 +++ openacs-4/packages/dotlrn-fs/dotlrn-fs.info 31 Jul 2002 21:18:33 -0000 1.18 @@ -24,17 +24,22 @@ + + + + + - - - - + + + + Index: openacs-4/packages/dotlrn-fs/sql/oracle/dotlrn-fs-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/sql/oracle/dotlrn-fs-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn-fs/sql/oracle/dotlrn-fs-create.sql 10 May 2002 06:35:15 -0000 1.8 +++ openacs-4/packages/dotlrn-fs/sql/oracle/dotlrn-fs-create.sql 31 Jul 2002 21:18:33 -0000 1.9 @@ -37,9 +37,6 @@ 'dotlrn_fs' ); - -- add all the hooks - - -- GetPrettyName foo := acs_sc_impl.new_alias ( 'dotlrn_applet', 'dotlrn_fs', @@ -48,7 +45,6 @@ 'TCL' ); - -- AddApplet foo := acs_sc_impl.new_alias ( 'dotlrn_applet', 'dotlrn_fs', @@ -57,7 +53,6 @@ 'TCL' ); - -- RemoveApplet foo := acs_sc_impl.new_alias ( 'dotlrn_applet', 'dotlrn_fs', @@ -66,7 +61,6 @@ 'TCL' ); - -- AddAppletToCommunity foo := acs_sc_impl.new_alias ( 'dotlrn_applet', 'dotlrn_fs', @@ -75,7 +69,6 @@ 'TCL' ); - -- RemoveAppletFromCommunity foo := acs_sc_impl.new_alias ( 'dotlrn_applet', 'dotlrn_fs', @@ -84,7 +77,6 @@ 'TCL' ); - -- AddUser foo := acs_sc_impl.new_alias ( 'dotlrn_applet', 'dotlrn_fs', @@ -93,7 +85,6 @@ 'TCL' ); - -- RemoveUser foo := acs_sc_impl.new_alias ( 'dotlrn_applet', 'dotlrn_fs', @@ -102,7 +93,6 @@ 'TCL' ); - -- AddUserToCommunity foo := acs_sc_impl.new_alias ( 'dotlrn_applet', 'dotlrn_fs', @@ -111,7 +101,6 @@ 'TCL' ); - -- RemoveUserFromCommunity foo := acs_sc_impl.new_alias ( 'dotlrn_applet', 'dotlrn_fs', @@ -120,7 +109,6 @@ 'TCL' ); - -- AddPortlet foo := acs_sc_impl.new_alias ( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_fs', @@ -129,7 +117,6 @@ impl_pl => 'TCL' ); - -- RemovePortlet foo := acs_sc_impl.new_alias ( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_fs', @@ -138,7 +125,6 @@ impl_pl => 'TCL' ); - -- Clone foo := acs_sc_impl.new_alias ( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_fs', @@ -147,11 +133,18 @@ impl_pl => 'TCL' ); - -- Add the binding - acs_sc_binding.new ( - contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_fs' - ); + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_fs', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_fs::change_event_handler', + impl_pl => 'TCL' + ); + + acs_sc_binding.new ( + contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_fs' + ); end; / show errors Index: openacs-4/packages/dotlrn-fs/sql/postgresql/dotlrn-fs-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/sql/postgresql/dotlrn-fs-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-fs/sql/postgresql/dotlrn-fs-create.sql 9 Jul 2002 20:11:22 -0000 1.1 +++ openacs-4/packages/dotlrn-fs/sql/postgresql/dotlrn-fs-create.sql 31 Jul 2002 21:18:33 -0000 1.2 @@ -143,7 +143,6 @@ ''TCL'' ); - -- Clone foo := acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_fs'', @@ -152,16 +151,22 @@ ''TCL'' ); - -- Add the binding - perform acs_sc_binding__new ( - ''dotlrn_applet'', - ''dotlrn_fs'' - ); + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''ChangeEventHandler'', + ''dotlrn_fs::change_event_handler'', + ''TCL'' + ); - return 0; + perform acs_sc_binding__new ( + ''dotlrn_applet'', + ''dotlrn_fs'' + ); + return 0; + end;' language 'plpgsql'; select inline_0(); drop function inline_0(); - Index: openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl,v diff -u -r1.75 -r1.76 --- openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl 13 Jul 2002 00:16:37 -0000 1.75 +++ openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl 31 Jul 2002 21:18:33 -0000 1.76 @@ -199,7 +199,7 @@ # non-member portal stuff set non_member_portal_id [dotlrn_community::get_non_member_portal_id \ - -community_id $community_id + -community_id $community_id ] # Make public-folder the only one available at non-member page @@ -633,13 +633,44 @@ file_id => :object_id, target_folder_id => :target_folder_id, creation_user => :user_id, - creation_ip => NULL + creation_ip => null ); end; } } } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + dotlrn-fs listens for the following events: rename + } { + switch $event { + rename { + handle_rename -community_id $community_id -old_value $old_value -new_value $new_value + } + } + } + + ad_proc -private handle_rename { + {-community_id:required} + {-old_value:required} + {-new_value:required} + } { + what we do when a community is renamed + } { + fs::rename_folder \ + -folder_id [get_community_root_folder -community_id $community_id] \ + -name "${new_value}'s Files" + + fs::rename_folder \ + -folder_id [get_community_shared_folder -community_id $community_id] \ + -name "${new_value}'s Shared Files" + } + ad_proc -public get_user_default_page {} { return the user default page to add the portlet to } { @@ -728,4 +759,27 @@ } -default ""] } + ad_proc -public get_community_root_folder { + {-community_id:required} + } { + get the community's root folder id + } { + set package_id [dotlrn_community::get_applet_package_id \ + -community_id $community_id \ + -applet_key [applet_key] \ + ] + + return [fs::get_root_folder -package_id $package_id] + } + + ad_proc -public get_community_shared_folder { + {-community_id:required} + } { + get the community's sahred folder id + } { + set root_folder_id [get_community_root_folder -community_id $community_id] + + return [db_string select_community_shared_folder {} -default ""] + } + } Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/dotlrn-news/sql/oracle/dotlrn-news-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-news/sql/oracle/dotlrn-news-create.sql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn-news/sql/oracle/dotlrn-news-create.sql 10 May 2002 06:35:15 -0000 1.6 +++ openacs-4/packages/dotlrn-news/sql/oracle/dotlrn-news-create.sql 31 Jul 2002 21:18:33 -0000 1.7 @@ -147,6 +147,14 @@ impl_pl => 'TCL' ); + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_news', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_news::change_event_handler', + impl_pl => 'TCL' + ); + -- Add the binding acs_sc_binding.new ( contract_name => 'dotlrn_applet', Index: openacs-4/packages/dotlrn-news/sql/postgresql/dotlrn-news-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-news/sql/postgresql/dotlrn-news-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-news/sql/postgresql/dotlrn-news-create.sql 10 Jul 2002 16:57:42 -0000 1.1 +++ openacs-4/packages/dotlrn-news/sql/postgresql/dotlrn-news-create.sql 31 Jul 2002 21:18:33 -0000 1.2 @@ -147,6 +147,14 @@ 'TCL' ); +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_news', + 'ChangeEventHandler', + 'dotlrn_news::change_event_handler', + 'TCL' +); + -- Add the binding select acs_sc_binding__new ( 'dotlrn_applet', Index: openacs-4/packages/dotlrn-news/tcl/dotlrn-news-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-news/tcl/dotlrn-news-procs.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/packages/dotlrn-news/tcl/dotlrn-news-procs.tcl 13 Jul 2002 03:05:24 -0000 1.27 +++ openacs-4/packages/dotlrn-news/tcl/dotlrn-news-procs.tcl 31 Jul 2002 21:18:33 -0000 1.28 @@ -208,4 +208,14 @@ return $new_package_id } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: + } { + } + } Index: openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-create.sql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-create.sql 26 Jul 2002 21:15:00 -0000 1.6 +++ openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-create.sql 31 Jul 2002 21:18:33 -0000 1.7 @@ -128,6 +128,14 @@ impl_pl => 'TCL' ); + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_research', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_research::change_event_handler', + impl_pl => 'TCL' + ); + acs_sc_binding.new( contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research' Index: openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql 26 Jul 2002 21:15:00 -0000 1.2 +++ openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql 31 Jul 2002 21:18:33 -0000 1.3 @@ -128,6 +128,14 @@ 'TCL' ); +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'ChangeEventHandler', + 'dotlrn_research::change_event_handler', + 'TCL' +); + select acs_sc_binding__new ( 'dotlrn_applet', 'dotlrn_research' Index: openacs-4/packages/dotlrn-research/tcl/dotlrn-research-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/tcl/dotlrn-research-procs.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/dotlrn-research/tcl/dotlrn-research-procs.tcl 26 Jul 2002 23:34:21 -0000 1.14 +++ openacs-4/packages/dotlrn-research/tcl/dotlrn-research-procs.tcl 31 Jul 2002 21:18:33 -0000 1.15 @@ -143,4 +143,14 @@ add_applet_to_community $new_community_id } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: + } { + } + } Index: openacs-4/packages/dotlrn-static/sql/oracle/dotlrn-static-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-static/sql/oracle/dotlrn-static-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn-static/sql/oracle/dotlrn-static-create.sql 10 May 2002 06:35:15 -0000 1.5 +++ openacs-4/packages/dotlrn-static/sql/oracle/dotlrn-static-create.sql 31 Jul 2002 21:18:33 -0000 1.6 @@ -145,6 +145,14 @@ impl_pl => 'TCL' ); + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_static', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_static::change_event_handler', + impl_pl => 'TCL' + ); + -- Add the binding acs_sc_binding.new ( contract_name => 'dotlrn_applet', Index: openacs-4/packages/dotlrn-static/sql/postgresql/dotlrn-static-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-static/sql/postgresql/dotlrn-static-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-static/sql/postgresql/dotlrn-static-create.sql 15 Jul 2002 20:43:41 -0000 1.1 +++ openacs-4/packages/dotlrn-static/sql/postgresql/dotlrn-static-create.sql 31 Jul 2002 21:18:34 -0000 1.2 @@ -146,6 +146,14 @@ ''TCL'' ); + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''ChangeEventHandler'', + ''dotlrn_static::change_event_handler'', + ''TCL'' + ); + -- Add the binding perform acs_sc_binding__new ( ''dotlrn_applet'', Index: openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl,v diff -u -r1.26 -r1.27 --- openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl 30 Jul 2002 22:53:40 -0000 1.26 +++ openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl 31 Jul 2002 21:18:34 -0000 1.27 @@ -243,4 +243,14 @@ -package_id $new_community_id } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: + } { + } + } Index: openacs-4/packages/dotlrn-syllabus/sql/oracle/dotlrn-syllabus-applet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/sql/oracle/dotlrn-syllabus-applet-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-syllabus/sql/oracle/dotlrn-syllabus-applet-create.sql 10 May 2002 06:35:15 -0000 1.3 +++ openacs-4/packages/dotlrn-syllabus/sql/oracle/dotlrn-syllabus-applet-create.sql 31 Jul 2002 21:18:34 -0000 1.4 @@ -141,6 +141,14 @@ impl_pl => 'TCL' ); + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_syllabus', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_syllabus::change_event_handler', + impl_pl => 'TCL' + ); + -- Add the binding acs_sc_binding.new ( contract_name => 'dotlrn_applet', Index: openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-applet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-applet-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-applet-create.sql 15 Jul 2002 20:43:42 -0000 1.1 +++ openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-applet-create.sql 31 Jul 2002 21:18:34 -0000 1.2 @@ -141,6 +141,14 @@ 'TCL' ); +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'ChangeEventHandler', + 'dotlrn_syllabus::change_event_handler', + 'TCL' +); + -- Add the binding select acs_sc_binding__new ( 'dotlrn_applet', --contract name Index: openacs-4/packages/dotlrn-syllabus/tcl/dotlrn-syllabus-admin-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/tcl/dotlrn-syllabus-admin-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-syllabus/tcl/dotlrn-syllabus-admin-procs.tcl 24 May 2002 01:58:46 -0000 1.4 +++ openacs-4/packages/dotlrn-syllabus/tcl/dotlrn-syllabus-admin-procs.tcl 31 Jul 2002 21:18:34 -0000 1.5 @@ -125,4 +125,14 @@ } { } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: + } { + } + } Index: openacs-4/packages/dotlrn-syllabus/tcl/dotlrn-syllabus-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/tcl/dotlrn-syllabus-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn-syllabus/tcl/dotlrn-syllabus-procs.tcl 13 Jul 2002 17:32:57 -0000 1.8 +++ openacs-4/packages/dotlrn-syllabus/tcl/dotlrn-syllabus-procs.tcl 31 Jul 2002 21:18:34 -0000 1.9 @@ -177,4 +177,14 @@ add_applet_to_community $new_community_id } + ad_proc -public change_event_handler { + community_id + event + old_value + new_value + } { + listens for the following events: + } { + } + }