Index: openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 30 Nov 2001 03:41:17 -0000 1.12 +++ openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 1 Dec 2001 23:16:27 -0000 1.13 @@ -68,6 +68,14 @@ } { db_dml update_user_theme {} } + + ad_proc -public get_workspace_portal_id { + user_id + } { + Get the workspace page ID for a particular user + } { + return [db_string select_user_portal_id {} -default ""] + } ad_proc -public instantiate_and_mount { {-mount_point ""} @@ -89,27 +97,27 @@ set parent_node_id [db_string select_node_id {}] # Mount - # FIXME: here we want to figure out how to set the context_id correctly! - # THIS IS A SERIOUS ISSUE - set new_package_id [site_node_mount_application -return package_id $parent_node_id $mount_point $package_key $package_key] + # The context is the community_id + set new_node_id [site_node_create $parent_node_id $package_key] + set new_package_id [site_node_create_package_instance $new_node_id $package_key $community_id $package_key] # Return the newly created package_id return $new_package_id } ad_proc -public render_page { {-user_id ""} - page_id + portal_id } { render a page in a user's favorite style } { if {[empty_string_p $user_id]} { set user_id [ad_conn user_id] } - set theme_id [db_string select_user_theme_id "select theme_id from dotlrn_users where user_id= :user_id"] + set theme_id [get_user_theme $user_id] - return [portal::render $page_id $theme_id] + return [portal::render $portal_id $theme_id] } }