Index: openacs-4/packages/assessment/tcl/as-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-callback-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/assessment/tcl/as-callback-procs.tcl	23 May 2005 15:07:51 -0000	1.1
+++ openacs-4/packages/assessment/tcl/as-callback-procs.tcl	17 Nov 2005 15:41:51 -0000	1.2
@@ -14,3 +14,14 @@
 			-community_id $community_id]
 	}
 }
+
+
+ad_proc -public -callback imsld::import -impl qti {} {
+    this is the imsld qti importer
+} {
+	if {$res_type == "imsqti_xmlv1p0" || $res_type == "imsqti_xmlv1p1" || $res_type =="imsqti_item_xmlv2p0"} {
+	    return [as::qti::register_xml_object_id \
+			-xml_file $tmp_dir/$res_href \
+			-community_id $community_id]
+	}
+}
Index: openacs-4/packages/imsld/tcl/imsld-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-callback-procs.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/imsld/tcl/imsld-callback-procs.tcl	17 Nov 2005 15:41:51 -0000	1.1
@@ -0,0 +1,20 @@
+ad_library {
+    Callback contract definitions for imsld.
+
+    @author Eduardo P�rez Ureta (eduardo.perez@uc3m.es)
+    @creation-date 2005-11-17
+    @cvs-id $Id: imsld-callback-procs.tcl,v 1.1 2005/11/17 15:41:51 eduardop Exp $
+}
+
+ad_proc -public -callback imsld::import {
+    -res_type
+    -res_href
+    -tmp_dir
+    -community_id
+} {
+    <p>Returns the acs_object_id for the resource.</p>
+
+    @return a list with one element, the acs_object_id for the resource
+
+    @author Eduardo P�rez Ureta (eduardo.perez@uc3m.es)
+} -
Index: openacs-4/packages/imsld/tcl/imsld-parse-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-parse-procs.tcl,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/imsld/tcl/imsld-parse-procs.tcl	17 Nov 2005 10:35:03 -0000	1.17
+++ openacs-4/packages/imsld/tcl/imsld-parse-procs.tcl	17 Nov 2005 15:41:51 -0000	1.18
@@ -506,10 +506,17 @@
     set resource_type [imsld::parse::get_attribute -node $resource_node -attr_name type]
     set resource_href [imsld::parse::get_attribute -node $resource_node -attr_name href]
     set resource_identifier [string tolower [imsld::parse::get_attribute -node $resource_node -attr_name identifier]]
+    set community_id [dotlrn_community::get_community_id]
+
+    set acs_object_id [callback -catch imsld::import -res_type $resource_type -res_href $resource_href -tmp_dir $tmp_dir -community_id $community_id]
+    # Integration with other packages
+    # This callback gets the href of the imported content (if some package imported it)
+
     set resource_id [imsld::cp::resource_new -manifest_id $manifest_id \
                          -identifier $resource_identifier \
                          -type $resource_type \
                          -href $resource_href \
+                         -acs_object_id $acs_object_id \
                          -parent_id $parent_id]
     
     set found_p 0