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.18 -r1.19 --- openacs-4/packages/imsld/tcl/imsld-parse-procs.tcl 17 Nov 2005 15:41:51 -0000 1.18 +++ openacs-4/packages/imsld/tcl/imsld-parse-procs.tcl 18 Nov 2005 08:44:50 -0000 1.19 @@ -927,6 +927,7 @@ ad_proc -public imsld::parse::parse_and_create_learning_object { -learning_object_node + -environment_id:required -manifest -manifest_id -parent_id @@ -937,6 +938,7 @@ Returns a list with the new learning_object_id (item_id) created if there were no errors, or 0 and an explanation messge if there was an error. @param learning_object_node learning object node to parse + @param environment_id environment ID of the one tha owns the learning objective @param manifest Manifest tree @param manifest_id Manifest ID or the manifest being parsed @param parent_id Parent folder ID @@ -956,7 +958,8 @@ [list identifier $identifier] \ [list is_visible_p $is_visible_p] \ [list parameters $parameters] \ - [list type $type]] \ + [list type $type] \ + [list environment_id $environment_id]] \ -content_type imsld_learning_object \ -title $title \ -parent_id $parent_id] @@ -1244,17 +1247,23 @@ # get environment info set identifier [string tolower [imsld::parse::get_attribute -node $environment_node -attr_name identifier]] set title [imsld::parse::get_title -node $environment_node -prefix imsld] - + + # create the environment + set environment_id [imsld::item_revision_new -attributes [list [list component_id $component_id] \ + [list identifier $identifier]] \ + -content_type imsld_environment \ + -parent_id $parent_id] + # environment: learning object set learning_object [$environment_node child all imsld:learning-object] - set learning_object_id "" if { [llength $learning_object] } { if { [llength $learning_object] > 1 } { set learning_object [lindex $learning_object 0] global warnings append warnings "