Index: openacs-4/packages/evaluation/tcl/evaluation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/tcl/evaluation-procs.tcl,v diff -u -r1.31.2.3 -r1.31.2.4 --- openacs-4/packages/evaluation/tcl/evaluation-procs.tcl 16 Jun 2005 09:22:36 -0000 1.31.2.3 +++ openacs-4/packages/evaluation/tcl/evaluation-procs.tcl 16 Jun 2005 23:59:53 -0000 1.31.2.4 @@ -1236,8 +1236,45 @@ } +namespace eval evaluation::merge { + ad_proc -callback MergeShowUserInfo -impl evaluation { + -user_id:required + } { + Show the evaluation items of user_id + } { + set msg "Evaluation items" + set result [list $msg] + ns_log Notice $msg + + lappend result [list "Answers: [db_list sel_answers { *SQL* }] "] + lappend result [list "Evals: [db_list_of_lists sel_evals { *SQL* }] "] + + return $result + } + ad_proc -callback MergePackageUser -impl evaluation { + -from_user_id:required + -to_user_id:required + } { + Merge the entries of two users. + The from_user_id is the user_id of the user + that will be deleted and all the items + of this user will be mapped to the to_user_id. + } { + set msg "Merging evaluation" + set result [list $msg] + ns_log Notice $msg + + db_transaction { + db_dml upd_from_answers { *SQL* } + db_dml upd_from_stud_evals { *SQL* } + } + + lappend result "Evaluation merge is done" + } +} + ad_register_proc GET /grades-sheet-csv* evaluation::generate_grades_sheet -ad_register_proc POST /grades-sheet-csv* evaluation::generate_grades_sheet +ad_register_proc POST /grades-sheet-csv* evaluation::generate_grades_sheet \ No newline at end of file