Index: openacs-4/packages/lorsm/tcl/lorsm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-procs.tcl,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/lorsm/tcl/lorsm-procs.tcl 14 Jun 2005 09:57:04 -0000 1.6.2.2 +++ openacs-4/packages/lorsm/tcl/lorsm-procs.tcl 17 Jun 2005 00:13:30 -0000 1.6.2.3 @@ -652,3 +652,44 @@ set url [export_vars -base ${base_url}lorsm {man_id item_id}] return $url } + + +namespace eval lorsm::merge { + + ad_proc -callback MergeShowUserInfo -impl lorsm { + -user_id:required + } { + Show lors items of one user + } { + set msg "lors items" + set result [list $msg] + + lappend result [list "Student tracks : [db_list sel_student_track { *SQL* }] " ] + lappend result [list "Student bookmarks: [db_list sel_student_bookmark { *SQL* }] "] + + return $result + } + + ad_proc -callback MergePackageUser -impl lorsm { + -from_user_id:required + -to_user_id:required + } { + Merge the lors items 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 lors" + ns_log Notice $msg + set result [list $msg] + + db_transaction { + db_dml student_track { *SQL* } + db_dml student_bookmark { *SQL* } + } + + set result "lors merge is done" + return $result + } +} \ No newline at end of file