Index: openacs-4/packages/dotlrn/dotlrn.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v diff -u -r1.58 -r1.59 --- openacs-4/packages/dotlrn/dotlrn.info 6 Mar 2002 00:08:02 -0000 1.58 +++ openacs-4/packages/dotlrn/dotlrn.info 6 Mar 2002 05:12:53 -0000 1.59 @@ -315,11 +315,16 @@ - - + + + + + + + Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-applet-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-applet-sc-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn/sql/oracle/dotlrn-applet-sc-create.sql 22 Feb 2002 18:20:13 -0000 1.8 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-applet-sc-create.sql 6 Mar 2002 05:12:54 -0000 1.9 @@ -197,7 +197,7 @@ -- remove the applet from a community foo := acs_sc_msg_type.new( msg_type_name => 'dotlrn_applet.RemoveAppletFromCommunity.InputType', - msg_type_spec => 'community_id:integer,package_id:integer' + msg_type_spec => 'community_id:integer' ); foo := acs_sc_msg_type.new( Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.63 -r1.64 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 5 Mar 2002 07:18:23 -0000 1.63 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 6 Mar 2002 05:12:54 -0000 1.64 @@ -149,12 +149,24 @@ set user_id [ad_conn user_id] + # based on the community_type, get the page_names and layouts + if {[string equal $community_type "dotlrn_community"]} { + set csv_list [ad_parameter subcomm_pages_csv] + } elseif {[string equal $community_type "dotlrn_club"]} { + set csv_list [ad_parameter club_pages_csv] + } else { + set csv_list [ad_parameter class_instance_pages_csv] + } + + set non_member_page_name [ad_parameter non_member_page_name] + set admin_page_name [ad_parameter admin_page_name] + # Create portal template page set portal_template_id \ [portal::create \ -portal_template_p "t" \ -name "$pretty_name Portal Template" \ - -default_page_name [ad_parameter community_first_page_name] \ + -csv_list $csv_list \ -context_id $community_id \ $user_id ] @@ -163,15 +175,15 @@ [portal::create \ -template_id $portal_template_id \ -name "$pretty_name Non-Member Portal" \ - -default_page_name [ad_parameter community_first_page_name] \ + -default_page_name $non_member_page_name \ -context_id $community_id \ $user_id] # Create the admin page set admin_portal_id \ [portal::create \ -name "$pretty_name Administration Portal" \ - -default_page_name [ad_parameter community_admin_first_page_name] \ + -default_page_name $admin_page_name \ -context_id $community_id \ -layout_name "Simple 1-Column" \ $user_id] @@ -679,8 +691,9 @@ if none, the empty list } { set subcomm_chunk "
    " + - db_foreach select_subcomms {} { + foreach subcomm_id [get_subcomm_list -community_id $community_id] { append subcomm_chunk "
  • [get_community_name $subcomm_id]
  • " } Index: openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl,v diff -u -r1.25 -r1.26 --- openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 14 Feb 2002 18:03:07 -0000 1.25 +++ openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 6 Mar 2002 05:12:54 -0000 1.26 @@ -73,41 +73,20 @@ ns_set put $extra_vars id $id db_transaction { - - # get the first page name and theme - set page_name_and_layout_list [split [ad_parameter -package_id [dotlrn::get_package_id] user_wsp_page_names "Untitled Page,Simple 2-Column;" ] ";"] - set page_name_list [list] - set layout_name_list [list] - - # seperate name and theme - foreach item $page_name_and_layout_list { - lappend page_name_list [lindex [split $item ","] 0] - lappend layout_name_list [lindex [split $item ","] 1] - } - if {[string equal $access_level "full"] == 1} { # Create a portal page for this user set portal_id [portal::create \ -name "Your dotLRN Workspace" \ - -default_page_name [lindex $page_name_list 0] \ - -layout_name [lindex $layout_name_list 0] \ - $user_id] + -csv_list [ad_parameter user_wsp_page_names] \ + $user_id + ] - # create rest of the default pages from the ad_param - for {set i 1} {$i < [expr [llength $page_name_list]]} {incr i} { - portal::page_create -portal_id $portal_id \ - -pretty_name [lindex $page_name_list $i] \ - -layout_name [lindex $layout_name_list $i] - } - - # manually switch back to the first page set page_id [portal::get_page_id -portal_id $portal_id -sort_key 0] - # aks test adding applets on new pages - # make a test page to the wsp - dotlrn_main_portlet::add_self_to_page -page_id $page_id $portal_id {} - # end test - + dotlrn_main_portlet::add_self_to_page \ + -page_id $page_id \ + $portal_id "" + # Update the user and set the portal page correctly ns_set put $extra_vars portal_id $portal_id } Index: openacs-4/packages/dotlrn/www/all-communities.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/all-communities.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/all-communities.adp 28 Jan 2002 21:57:52 -0000 1.5 +++ openacs-4/packages/dotlrn/www/all-communities.adp 6 Mar 2002 05:12:54 -0000 1.6 @@ -2,8 +2,6 @@ @context_bar@ All Communities -

    -
    Index: openacs-4/packages/dotlrn/www/applets.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/applets.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/applets.adp 28 Jan 2002 21:57:52 -0000 1.5 +++ openacs-4/packages/dotlrn/www/applets.adp 6 Mar 2002 05:12:54 -0000 1.6 @@ -1,7 +1,10 @@ Manage Applets +1 +one-community +1 +1 +@portal_id@ @context_bar@ -Group Admin

    - Index: openacs-4/packages/dotlrn/www/applets.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/applets.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/applets.tcl 23 Jan 2002 07:41:04 -0000 1.8 +++ openacs-4/packages/dotlrn/www/applets.tcl 6 Mar 2002 05:12:54 -0000 1.9 @@ -7,6 +7,8 @@ } -query { } -set context_bar {{"one-community-admin" Admin} {Manage Applets}} +set community_id [dotlrn_community::get_community_id] +set user_id [ad_get_user_id] +set portal_id [dotlrn_community::get_portal_id $community_id $user_id] -ad_return_template +set context_bar {{"one-community-admin" Admin} {Manage Applets}} Index: openacs-4/packages/dotlrn/www/members.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/members.adp 28 Jan 2002 21:57:52 -0000 1.5 +++ openacs-4/packages/dotlrn/www/members.adp 6 Mar 2002 05:12:54 -0000 1.6 @@ -1,7 +1,11 @@ Manage Membership -@context_bar@ +1 +one-community +1 +1 +@portal_id@ -Group Admin

    + Index: openacs-4/packages/dotlrn/www/members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn/www/members.tcl 23 Jan 2002 07:41:04 -0000 1.7 +++ openacs-4/packages/dotlrn/www/members.tcl 6 Mar 2002 05:12:54 -0000 1.8 @@ -7,6 +7,9 @@ } -query { } +set community_id [dotlrn_community::get_community_id] +set user_id [ad_get_user_id] set context_bar {{"one-community-admin" Admin} {Manage Members}} +set portal_id [dotlrn_community::get_portal_id $community_id $user_id] ad_return_template Index: openacs-4/packages/dotlrn/www/one-community-admin.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-admin.adp,v diff -u -r1.16 -r1.17 --- openacs-4/packages/dotlrn/www/one-community-admin.adp 28 Jan 2002 21:57:52 -0000 1.16 +++ openacs-4/packages/dotlrn/www/one-community-admin.adp 6 Mar 2002 05:12:54 -0000 1.17 @@ -6,8 +6,6 @@ one-community 0 1 -Group Admin -

    @rendered_page@ Index: openacs-4/packages/dotlrn/www/one-community-not-member.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/one-community-not-member.adp,v diff -u -r1.11 -r1.12 --- openacs-4/packages/dotlrn/www/one-community-not-member.adp 14 Feb 2002 19:43:11 -0000 1.11 +++ openacs-4/packages/dotlrn/www/one-community-not-member.adp 6 Mar 2002 05:12:54 -0000 1.12 @@ -3,8 +3,6 @@ @pretext@ @portal_id@ @admin_p@ +@admin_p@ - -

    - @rendered_page@ Index: openacs-4/packages/dotlrn/www/one-community.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community.adp,v diff -u -r1.13 -r1.14 --- openacs-4/packages/dotlrn/www/one-community.adp 14 Feb 2002 19:43:11 -0000 1.13 +++ openacs-4/packages/dotlrn/www/one-community.adp 6 Mar 2002 05:12:54 -0000 1.14 @@ -4,7 +4,6 @@ @pretext@ @portal_id@ @admin_p@ -@control_panel_text@

    Index: openacs-4/packages/dotlrn/www/one-community.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/dotlrn/www/one-community.tcl 18 Feb 2002 20:53:57 -0000 1.20 +++ openacs-4/packages/dotlrn/www/one-community.tcl 6 Mar 2002 05:12:54 -0000 1.21 @@ -15,17 +15,15 @@ ad_script_abort } +# Get basic information set user_id [ad_conn user_id] - -# What community type are we at? set community_id [dotlrn_community::get_community_id] - -# Get basic information set pretty_name [dotlrn_community::get_community_name $community_id] +set admin_p [dotlrn::user_can_admin_community_p \ + -user_id $user_id \ + $community_id +] -set admin_p [dotlrn::user_can_admin_community_p $community_id] - - # are we in a subcomm? if so, we need to set up the text and navbar set pretext "" set parent_id [dotlrn_community::get_parent_id \ @@ -50,6 +48,8 @@ # Possible that there is no portal page for non-members if {! [empty_string_p $portal_id]} { set rendered_page [dotlrn::render_page -hide_links_p "t" -page_num $page_num $portal_id] + + } else { set rendered_page "" } @@ -66,7 +66,6 @@ set rendered_page [dotlrn::render_page -hide_links_p "t" -page_num $page_num $portal_id] set context_bar {View} - set control_panel_text "Group Admin" set url_stub "one-community" ad_return_template