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.74 -r1.75 --- openacs-4/packages/imsld/tcl/imsld-parse-procs.tcl 18 Dec 2008 19:12:14 -0000 1.74 +++ openacs-4/packages/imsld/tcl/imsld-parse-procs.tcl 19 Dec 2008 18:57:01 -0000 1.75 @@ -774,12 +774,7 @@ permission::set_not_inherit -object_id $filex_id # map resource with file - if { $import_with_xowiki } { - relation_add -extra_vars $extra_vars imsld_res_files_rel $resource_id $filex_id -# relation_add -extra_vars $extra_vars imsld_resource_xowiki_rel $resource_id $filex_id - } else { - relation_add -extra_vars $extra_vars imsld_res_files_rel $resource_id $filex_id - } + relation_add -extra_vars $extra_vars imsld_res_files_rel $resource_id $filex_id } if { ![empty_string_p $resource_href] && !$found_p } { Index: openacs-4/packages/imsld/tcl/imsld-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-procs.tcl,v diff -u -r1.110 -r1.111 --- openacs-4/packages/imsld/tcl/imsld-procs.tcl 19 Dec 2008 11:03:26 -0000 1.110 +++ openacs-4/packages/imsld/tcl/imsld-procs.tcl 19 Dec 2008 18:57:01 -0000 1.111 @@ -2134,8 +2134,7 @@ imsld::process_resource_as_ul -resource_item_id $resource_item_id \ -run_id $run_id \ -dom_node $dom_node \ - -dom_doc $dom_doc \ - -li_mode + -dom_doc $dom_doc # replace the image with the conference name set img_nodes [$dom_node selectNodes {.//img}] foreach img_node $img_nodes { @@ -2253,8 +2252,7 @@ set one_learning_object_list [imsld::process_resource_as_ul -resource_item_id $resource_item_id \ -run_id $run_id \ -dom_node $environment_node \ - -dom_doc $dom_doc \ - -li_mode] + -dom_doc $dom_doc] # in order to behave like CopperCore, we decide to replace the images with the learning object title set img_nodes [$environment_node selectNodes {.//img}] @@ -2372,7 +2370,7 @@ imsld::process_resource_as_ul -resource_item_id $resource_item_id \ -run_id $run_id \ -dom_doc $dom_doc \ - -dom_node $dom_node + -dom_node $list_node } if_no_rows { ns_log notice "[_ imsld.lt_li_desc_no_file_assoc]" } @@ -3274,6 +3272,7 @@ $activity_node appendChild $input_node } } + imsld::generate_resources_tree -activity_item_id $activity_item_id -run_id $run_id -user_id $user_id -dom_node $activity_node -dom_doc $dom_doc set completed_list [linsert $completed_list $sort_order [$activity_node asList]] } } @@ -3319,6 +3318,7 @@ set text [$dom_doc createTextNode " "] $activity_node appendChild $text + } else { # bold letters set activity_node [$dom_doc createElement li] @@ -3362,6 +3362,7 @@ $activity_node appendChild $input_node } } + imsld::generate_resources_tree -activity_item_id $activity_item_id -run_id $run_id -user_id $user_id -dom_node $activity_node -dom_doc $dom_doc set completed_list [linsert $completed_list $sort_order [$activity_node asList]] } } Index: openacs-4/packages/imsld/tcl/imsld-xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-xowiki-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/imsld/tcl/imsld-xowiki-procs.tcl 18 Dec 2008 19:12:17 -0000 1.2 +++ openacs-4/packages/imsld/tcl/imsld-xowiki-procs.tcl 19 Dec 2008 18:57:01 -0000 1.3 @@ -138,3 +138,36 @@ return [::[$page package_id] url] } + +ad_proc -public imsld::xowiki::page_list { +} { + @author Derick Leony (derick@inv.it.uc3m.es) + @creation-date 2008-12-19 + + @return + + @error +} { + set community_id [dotlrn_community::get_community_id] + set xw_url "[dotlrn_community::get_community_url $community_id]xowiki/" + + array set node [site_node::get_from_url -url $xw_url] + set xowiki_package_id $node(package_id) + ::xowiki::Package initialize -package_id $xowiki_package_id -url $xw_url -user_id [ad_conn user_id] + + set page_list [list] + db_foreach select_pages \ + [::xowiki::Page instance_select_query \ + -folder_id [::$xowiki_package_id folder_id] \ + -with_subtypes true \ + -select_attributes {name page_id} \ + -from_clause ", xowiki_page P" \ + -where_clause "P.page_id = bt.revision_id" \ + -orderby "ci.name"] \ + { + if {[regexp {^::[0-9]} $name]} continue + lappend page_list [list $name $item_id] + } + + return $page_list +}