Index: openacs-4/packages/dotlrn/tcl/dotlrn-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-callback-procs.tcl,v diff -u -r1.1.2.8 -r1.1.2.9 --- openacs-4/packages/dotlrn/tcl/dotlrn-callback-procs.tcl 21 Sep 2005 01:26:22 -0000 1.1.2.8 +++ openacs-4/packages/dotlrn/tcl/dotlrn-callback-procs.tcl 25 Sep 2005 13:31:01 -0000 1.1.2.9 @@ -10,68 +10,6 @@ @cvs-id $Id$ } -ad_proc -public -callback contact::contact_form -impl dotlrn_club { - {-package_id:required} - {-form:required} - {-object_type:required} - {-party_id} - {-group_ids ""} -} { - Callback to hook into the contacts system. If you create a new - organization of the group "Customer" within contacts you generate - a new .LRN club for it (assuming that each organization contacts - deserves it's own club. -} { - if {$object_type != "person" } { - - set already_linked_p "f" - if {[exists_and_not_null party_id]} { - - # if we are in edit mode we need to make that we are not - # already linked to a community - if {[application_data_link::get_linked -from_object_id $party_id -to_object_type "dotlrn_club"] != ""} { - set already_linked_p "t" - } - } - - if {$already_linked_p == "f"} { - if {[lsearch $group_ids [group::get_id -group_name "Customers"]] > -1} { - ad_form -extend -name $form -form { - {create_club_p:text(hidden) \ - {value "t"} - } - } - } - } - } -} - -ad_proc -public -callback contact::organization_new -impl dotlrn_club { - {-package_id:required} - {-contact_id:required} - {-name:required} -} { - Callback to create a new club for a new organization in Contacts. - It also registers all employees of the organization within the club -} { - upvar create_club_p create_club_p - - if {[exists_and_not_null create_club_p] - && $create_club_p == "t"} { - # Create the new club and create a link between it and - # the new contact. - - set club_id [dotlrn_club::new -pretty_name "$name"] - application_data_link::new -this_object_id $contact_id -target_object_id $club_id - - # Link the file storage directly to the contact - set fs_id [fs::get_root_folder -package_id [dotlrn_community::get_package_id_from_package_key -package_key "file-storage" -community_id $club_id]] - application_data_link::new -this_object_id $contact_id -target_object_id $fs_id - - callback dotlrn_community::add_members -community_id $club_id - } -} - ad_proc -callback merge::MergeShowUserInfo -impl dotlrn { -user_id:required } { @@ -94,6 +32,7 @@ return $result } + ad_proc -callback merge::MergePackageUser -impl dotlrn { -from_user_id:required -to_user_id:required