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
Index: openacs-4/packages/lorsm/tcl/lorsm-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-procs.xql,v
diff -u -r1.2.2.1 -r1.2.2.2
--- openacs-4/packages/lorsm/tcl/lorsm-procs.xql 13 Jun 2005 15:10:56 -0000 1.2.2.1
+++ openacs-4/packages/lorsm/tcl/lorsm-procs.xql 17 Jun 2005 00:13:30 -0000 1.2.2.2
@@ -75,4 +75,36 @@
+
+
+ select track_id from
+ lorsm_student_track
+ where user_id = :user_id
+
+
+
+
+
+ select community_id
+ from lorsm_student_bookmark
+ where user_id = :user_id
+
+
+
+
+
+ update lorsm_student_track
+ set user_id = :to_user_id
+ where user_id = :from_user_id
+
+
+
+
+
+ update lorsm_student_bookmark
+ set user_id = :to_user_id
+ where user_id = :from_user_id
+
+
+
\ No newline at end of file