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.65 -r1.66 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 6 Mar 2002 20:32:22 -0000 1.65 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 7 Mar 2002 06:48:53 -0000 1.66 @@ -686,6 +686,14 @@ } } + ad_proc -public has_subcommunity_p { + {-community_id:required} + } { + Returns 1 if the community has a subcommunity + } { + return [db_0or1row select_subcomm_check {}] + } + ad_proc -public get_subcomm_list { {-community_id:required} } { @@ -703,18 +711,28 @@ ad_proc -public get_subcomm_chunk { {-community_id:required} + {-pretext "
  • "} } { - Returns a html fragment of the subcommunities of this community or - if none, the empty list + Returns a html fragment of the subcommunity hierarchy of this + community or if none, the empty list } { - set subcomm_chunk ""] + return $subcomm_chunk } ad_proc -public get_community_type_url { Index: openacs-4/packages/dotlrn/tcl/community-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.xql,v diff -u -r1.31 -r1.32 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 5 Mar 2002 22:37:34 -0000 1.31 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 7 Mar 2002 06:48:53 -0000 1.32 @@ -186,6 +186,12 @@ + + +select count(*) from dual where exists (select 1 from dotlrn_communities where parent_community_id = :community_id) + + + select community_id as subcomm_id from dotlrn_communities where parent_community_id = :community_id Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp 4 Mar 2002 23:54:00 -0000 1.9 +++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp 7 Mar 2002 06:48:54 -0000 1.10 @@ -1,31 +1,40 @@ -[ - - Join/Drop a Class or Community Group - -] - -

    - - <%= [ad_parameter classes_pretty_plural] %> +
    <%= [ad_parameter classes_pretty_plural] %>
    - <%= [ad_parameter clubs_pretty_plural] %> +
    <%= [ad_parameter clubs_pretty_plural] %>
    • @clubs.pretty_name@ - - admin + + - [admin] +
    • - <%= [dotlrn_community::get_subcomm_chunk -community_id $clubs(community_id)] %> +
        + <%= [dotlrn_community::get_subcomm_chunk -community_id $clubs(community_id)] %> +
    + + + Index: openacs-4/packages/dotlrn-portlet/tcl/dotlrn-members-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/tcl/dotlrn-members-portlet-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-portlet/tcl/dotlrn-members-portlet-procs.tcl 6 Mar 2002 23:21:16 -0000 1.1 +++ openacs-4/packages/dotlrn-portlet/tcl/dotlrn-members-portlet-procs.tcl 7 Mar 2002 06:49:10 -0000 1.2 @@ -25,7 +25,7 @@ ad_proc -public get_pretty_name { } { - return "Members" + return "Community Members" } ad_proc -public link { Index: openacs-4/packages/dotlrn-portlet/tcl/dotlrn-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/tcl/dotlrn-portlet-procs.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/dotlrn-portlet/tcl/dotlrn-portlet-procs.tcl 6 Mar 2002 23:21:16 -0000 1.22 +++ openacs-4/packages/dotlrn-portlet/tcl/dotlrn-portlet-procs.tcl 7 Mar 2002 06:49:10 -0000 1.23 @@ -27,10 +27,9 @@ ad_proc -public get_pretty_name { } { - return "FIXME name Information" + return "Subgroups Plus" } - ad_proc -public link { } { return "" Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp 6 Mar 2002 23:21:16 -0000 1.3 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp 7 Mar 2002 06:49:10 -0000 1.4 @@ -2,10 +2,18 @@ @pretty_name@ - @description@ -

    + - @subcomm_data@ +

    + Subcommunities:

    + +

      + + @subcomm_data@ + +
    +
    Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.tcl 6 Mar 2002 23:21:16 -0000 1.2 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.tcl 7 Mar 2002 06:49:10 -0000 1.3 @@ -13,29 +13,10 @@ set pretty_name [dotlrn_community::get_community_name $community_id] set description [dotlrn_community::get_community_description $community_id] +set has_subcomm_p \ + [dotlrn_community::has_subcommunity_p -community_id $community_id] -# aks move to "members" portlets -#if {[dotlrn::user_can_read_private_data_p]} { -# set member_link "

    List of Members" -#} else { -# set member_link "" -#} +set subcomm_data \ + [dotlrn_community::get_subcomm_chunk -community_id $community_id] -set subcomm_list [dotlrn_community::get_subcomm_list -community_id $community_id] -if {[llength $subcomm_list] > 0} { - - set subcomm_data "Subcommunities:

    " - -} else { - - set subcomm_data "" -} -