Index: openacs-4/packages/imsld/www/admin/imsld-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-new-2.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/imsld/www/admin/imsld-new-2.tcl 17 Apr 2008 17:17:54 -0000 1.10 +++ openacs-4/packages/imsld/www/admin/imsld-new-2.tcl 18 Dec 2008 19:14:10 -0000 1.11 @@ -10,6 +10,7 @@ tmp_dir manifest_id:integer,notnull return_url + {resource_handler:optional "file-storage"} } -properties { context:onevalue } @@ -22,6 +23,17 @@ set user_id [ad_conn user_id] +set community_id [dotlrn_community::get_community_id] +set applets [dotlrn_community::list_active_applets -community_id $community_id] +if {[lsearch $applets "dotlrn_xowiki"] == -1} { + set resource_handler "file-storage" +} else { + if {[lsearch [list "xowiki" "file-storage"] ${resource_handler}] == -1} { + set resource_handler "xowiki" + } +} + + # Display progress bar ad_progress_bar_begin \ -title "[_ imsld.Uploading_IMS_LD]" \ @@ -36,7 +48,8 @@ set manifest_list [imsld::parse::parse_and_create_imsld_manifest -xmlfile $tmp_dir/imsmanifest.xml \ -manifest_id $manifest_id \ -tmp_dir $tmp_dir \ - -community_id $community_id] + -community_id $community_id \ + -resource_handler $resource_handler ] set manifest_id [lindex $manifest_list 0] Index: openacs-4/packages/imsld/www/admin/imsld-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-new.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/imsld/www/admin/imsld-new.tcl 17 Apr 2008 17:17:54 -0000 1.9 +++ openacs-4/packages/imsld/www/admin/imsld-new.tcl 18 Dec 2008 19:14:10 -0000 1.10 @@ -134,6 +134,19 @@ {manifest_id:integer {widget hidden} {value $manifest_id}} } +if {[apm_package_installed_p "xowiki"]} { + set community_id [dotlrn_community::get_community_id] + set applets [dotlrn_community::list_active_applets -community_id $community_id] + if {[lsearch $applets "dotlrn_xowiki"] > -1} { + ad_form -extend -name imsld_upload -form { + { resource_handler:integer(select) + {label "Resource manager:"} + {options {{XoWiki xowiki} {{File Storage} file-storage}}} + } + } + } +} + set file_str [imsld::parse::get_files_structure -tmp_dir $tmp_dir]