Index: openacs-4/packages/scorm-core/tcl/scorm-core-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/scorm-core/tcl/scorm-core-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/scorm-core/tcl/scorm-core-procs.xql 13 May 2010 00:58:49 -0000 1.1 +++ openacs-4/packages/scorm-core/tcl/scorm-core-procs.xql 23 May 2010 20:27:51 -0000 1.2 @@ -12,4 +12,77 @@ + + + select 1 + from scorm_courses sc, acs_objects ao + where sc.scorm_course_id = ao.object_id + and ao.package_id = :package_id + and ao.title = :title + + + + + + insert into cp_package + (cp_package_id) + values + (:course_id) + + + + + + update cp_package + set jsdata = :jsdata, + xmldata = :xmldata, + activitytree = :activity_tree, + global_to_system = :global_to_system + where cp_package_id = :scorm_course_id + + + + + + select folder_id + from scorm_courses + where scorm_course_id = :course_id + + + + + + insert into cp_node + (cp_node_id, nodename, cp_package_id) + values + (:cp_node_id, :nodename, :cp_package_id) + + + + + + insert into cp_tree + (child, depth, cp_package_id, parent, rgt) + values + (:cp_node_id, :depth, :cp_package_id, :parent, '0') + + + + + + insert into cp_[string tolower ${nodename}] + ([join $attributes ", "]) + values + (:[join $attributes ", :"]) + + + + + + update cp_tree + set rgt = :rgt + where child = :cp_node_id + + +