Index: openacs-4/packages/assessment/tcl/as-merge-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/Attic/as-merge-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/assessment/tcl/as-merge-procs.tcl 16 Jun 2005 22:30:51 -0000 1.1.2.1 +++ openacs-4/packages/assessment/tcl/as-merge-procs.tcl 7 Jul 2005 23:20:47 -0000 1.1.2.2 @@ -4,51 +4,51 @@ @creation-date 2005-04-12 } -namespace eval as::merge { - ad_proc -callback MergeShowUserInfo -impl as { - -user_id:required - } { - Shows assessments items - } { - set msg "Assessment items of user $user_id" - set result [list $msg] - lappend result [list "Staff of sessions: [db_list sel_sessions { *SQL* }] "] - lappend result [list "Subject of sessions: [db_list sel_sessions2 {*SQL*}] "] +ad_proc -callback merge::MergeShowUserInfo -impl as { + -user_id:required +} { + Shows assessments items +} { + set msg "Assessment items of user $user_id" + set result [list $msg] - lappend result [list "Subject of section data id: [db_list sel_sections { *SQL* }] "] - lappend result [list "Staff of section data id: [db_list sel_sections2 { *SQL* }] "] + lappend result [list "Staff of sessions: [db_list sel_sessions { *SQL* }] "] + lappend result [list "Subject of sessions: [db_list sel_sessions2 {*SQL*}] "] - lappend result [list "Subject of item data id : [db_list sel_items { *SQL* }] "] - lappend result [list "Staff of item_data_id: [db_list sel_items2 { *SQL* }] "] - - return $result - } + lappend result [list "Subject of section data id: [db_list sel_sections { *SQL* }] "] + lappend result [list "Staff of section data id: [db_list sel_sections2 { *SQL* }] "] - ad_proc -callback MergePackageUser -impl as { - -from_user_id:required - -to_user_id:required - } { - Merge the as's of two users. - The from_user_id is the user that will be - deleted and all the entries of this user - will be mapped to the to_user_id. + lappend result [list "Subject of item data id : [db_list sel_items { *SQL* }] "] + lappend result [list "Staff of item_data_id: [db_list sel_items2 { *SQL* }] "] + + return $result +} + +ad_proc -callback merge::MergePackageUser -impl as { + -from_user_id:required + -to_user_id:required +} { + Merge the as's of two users. + The from_user_id is the user that will be + deleted and all the entries of this user + will be mapped to the to_user_id. + +} { + set msg "Merging assesment" + set result [list $msg] + ns_log Notice $msg + db_transaction { + db_dml upd_from_sessions { *SQL* } + db_dml upd_from_sessions2 { *SQL* } + db_dml upd_from_sections { *SQL* } + db_dml upd_from_sections2 { *SQL* } + db_dml upd_from_items { *SQL* } + db_dml upd_from_items2 { *SQL* } - } { - set msg "Merging assesment" - set result [list $msg] - ns_log Notice $msg - db_transaction { - db_dml upd_from_sessions { *SQL* } - db_dml upd_from_sessions2 { *SQL* } - db_dml upd_from_sections { *SQL* } - db_dml upd_from_sections2 { *SQL* } - db_dml upd_from_items { *SQL* } - db_dml upd_from_items2 { *SQL* } - - } - lappend result "assessment merge is done" - return $result } + lappend result "assessment merge is done" + return $result } + Index: openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl,v diff -u -r1.23.2.1 -r1.23.2.2 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl 15 Jun 2005 18:40:28 -0000 1.23.2.1 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl 7 Jul 2005 23:23:40 -0000 1.23.2.2 @@ -7,46 +7,46 @@ namespace eval lars_blogger {} -namespace eval lars_blogger::merge { - ad_proc -callback MergeShowUserInfo -impl lars_blogger { - -user_id:required - } { - Show the items of user_id - } { - set msg "Lars_blogger items of $user_id" - set result [list $msg] - set channels [db_list_of_lists sel_channels { *SQL* }] - lappend result $channels - - return $result - } +ad_proc -callback merge::MergeShowUserInfo -impl lars_blogger { + -user_id:required +} { + Show the items of user_id +} { + set msg "Lars_blogger items of $user_id" + set result [list $msg] - ad_proc -callback MergePackageUser -impl lars_blogger { - -from_user_id:required - -to_user_id:required - } { - Merge the entries of two users. + set channels [db_list_of_lists sel_channels { *SQL* }] + lappend result $channels + + return $result +} - The from_user_id is the user_id of the user - that will be deleted and all the entries - of this user will be mapped to the to_user_id. - - } { - set msg "Merging lars_blogger" - ns_log Notice $msg - set result [list $msg] +ad_proc -callback merge::MergePackageUser -impl lars_blogger { + -from_user_id:required + -to_user_id:required +} { + Merge the entries of two users. - db_dml upd_channels { *SQL* } - - lappend result "Merge of lars_blogger is done" - - return $result - } + The from_user_id is the user_id of the user + that will be deleted and all the entries + of this user will be mapped to the to_user_id. + +} { + set msg "Merging lars_blogger" + ns_log Notice $msg + set result [list $msg] + + db_dml upd_channels { *SQL* } + + lappend result "Merge of lars_blogger is done" + + return $result } + ad_proc lars_blog_setup_feed { -user:boolean {-package_id ""}