Index: openacs-4/packages/assessment/tcl/as-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-callback-procs.tcl,v diff -u -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/assessment/tcl/as-callback-procs.tcl 19 Jul 2005 16:58:31 -0000 1.1.2.3 +++ openacs-4/packages/assessment/tcl/as-callback-procs.tcl 20 Jul 2005 15:58:42 -0000 1.1.2.4 @@ -61,3 +61,22 @@ return $result } + +ad_proc -public -callback datamanager::move_assessment -impl datamanager { + -object_id:required + -selected_community:required +} { + Move an assessment to another class or community +} { + +#se actualiza el parent_id del assessment en cr_items +db_dml update_as_cr_items {} + +#se actualiza el context_id y el package_id del assessment en acs_objects +db_dml update_as_it_acs_objects1 {} +db_dml update_as_it_acs_objects2 {} + +#se actualiza el package_id del assessment en acs_objects +db_dml update_as_as_acs_objects {} +} + Index: openacs-4/packages/assessment/tcl/as-callback-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-callback-procs.xql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/assessment/tcl/as-callback-procs.xql 19 Jul 2005 16:58:31 -0000 1.1.2.1 +++ openacs-4/packages/assessment/tcl/as-callback-procs.xql 20 Jul 2005 15:58:42 -0000 1.1.2.2 @@ -96,5 +96,76 @@ where staff_id = :from_user_id + + + + update cr_items + set parent_id = (select folder_id + from cr_folders + where package_id= + (select package_id + from dotlrn_community_applets + where applet_id= + (select applet_id + from dotlrn_applets + where applet_key='dotlrn_assessment') + and community_id=:selected_community)) + where item_id=(select context_id from acs_objects where object_id=:object_id); - \ No newline at end of file + + + + + + update acs_objects + set context_id =(select folder_id + from cr_folders + where package_id= + (select package_id + from dotlrn_community_applets + where applet_id= + (select applet_id + from dotlrn_applets + where applet_key='dotlrn_assessment') + and community_id=:selected_community)) + where object_id = (select context_id from acs_objects where object_id=:object_id) + + + + + + + update acs_objects + set package_id = (select package_id + from dotlrn_community_applets + where applet_id= + (select applet_id + from dotlrn_applets + where applet_key='dotlrn_assessment') + and community_id=:selected_community) + where object_id = (select context_id from acs_objects where object_id=:object_id) + + + + + + + update acs_objects + set package_id =(select package_id + from dotlrn_community_applets + where applet_id= + (select applet_id + from dotlrn_applets + where applet_key='dotlrn_assessment') + and community_id=:selected_community) + where object_id in (select object_id + from acs_objects + where context_id= + (select context_id + from acs_objects + where object_id=:object_id)) + + + + + Index: openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 21 Jun 2005 21:22:12 -0000 1.1.2.2 +++ openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 20 Jul 2005 15:49:30 -0000 1.1.2.3 @@ -24,3 +24,20 @@ {-file_id:required} } { } + +ad_proc -public -callback datamanager::move_folder -impl datamanager { + -object_id:required + -selected_community:required +} { + Move a folder to another class or community +} { + +#get the working package +db_1row get_working_package {} +set root_folder_id [fs::get_root_folder -package_id $package_id] + +#update forums_forums table +db_dml update_cr_items {} +db_dml update_acs_objects {} +} + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/file-storage/tcl/file-storage-callback-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/static-portlet/tcl/static-portlet-callback-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/static-portlet/tcl/static-portlet-callback-procs.xql'. Fisheye: No comparison available. Pass `N' to diff?