Index: openacs-4/packages/lorsm/tcl/lorsm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-callback-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lorsm/tcl/lorsm-callback-procs.tcl 25 May 2006 13:15:58 -0000 1.2 +++ openacs-4/packages/lorsm/tcl/lorsm-callback-procs.tcl 30 May 2006 16:23:25 -0000 1.3 @@ -1,48 +1,65 @@ ad_library { - Library of callbacks implementations for photo-album -} - -ad_proc -callback application-track::getApplicationName -impl lorsm {} { - callback implementation - } { - return "lorsm" - } - - ad_proc -callback application-track::getGeneralInfo -impl lorsm {} { - callback implementation - } { - db_1row my_query { - select count(1) as result - from ( - select distinct l.course_id - from lorsm_student_track l - where l.community_id=:comm_id - group by l.course_id) as t - } - - return "$result" - } - ad_proc -callback application-track::getSpecificInfo -impl lorsm {} { - callback implementation - } { - - upvar $query_name my_query - upvar $elements_name my_elements - - set my_query { - select d.id,i.course_name,l.start_time,l.end_time - from lorsm_student_track l, dotlrn_users d, ims_cp_manifests i - where l.course_id IN - ( - select distinct l.course_id - from lorsm_student_track l - where l.community_id=:class_instance_id - group by l.course_id) - and l.user_id = d.user_id - and l.course_id = i.man_id - } - - set my_elements "" - - return "OK" - } \ No newline at end of file + + LORS callback imlementations + + @author Enrique Catalan (quio@galileo.edu) + @creation-date Jul 19, 2005 + @cvs-id $Id$ +} + +ad_proc -callback application-track::getApplicationName -impl lorsm {} { + callback implementation +} { + return "lorsm" +} + +ad_proc -callback application-track::getGeneralInfo -impl lorsm {} { + callback implementation +} { + db_1row my_query { + select count(1) as result + from ( + select distinct l.course_id + from lorsm_student_track l + where l.community_id=:comm_id + group by l.course_id) as t + } + + return "$result" +} + +ad_proc -callback application-track::getSpecificInfo -impl lorsm {} { + callback implementation +} { + + upvar $query_name my_query + upvar $elements_name my_elements + + set my_query { + select d.id,i.course_name,l.start_time,l.end_time + from lorsm_student_track l, dotlrn_users d, ims_cp_manifests i + where l.course_id IN + ( + select distinct l.course_id + from lorsm_student_track l + where l.community_id=:class_instance_id + group by l.course_id) + and l.user_id = d.user_id + and l.course_id = i.man_id + } + + set my_elements "" + + return "OK" +} + +ad_proc -public -callback imsld::import -impl lors {} { + this is the imsld lors importer +} { + if {$res_type == "imscp_xmlv1p0"} { + return [lorsm::register_xml_object_id \ + -xml_file $tmp_dir/$res_href \ + -tmp_dir $tmp_dir \ + -community_id $community_id] + } +}