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 -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 8 Oct 2001 21:38:37 -0000 1.6 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 9 Oct 2001 14:35:58 -0000 1.7 @@ -145,12 +145,15 @@ # Callbacks applets_dispatch $community_id RemoveUser [list $community_id $user_id] - # Get the relationship ID - set rel_id [db_string select_rel_id {}] + # Get a few important things, like rel_id and portal page_id + db_1row select_rel_info {} # Remove the membership db_dml delete_membership {} + # Remove the page + portal::delete_portal $page_id + # Remove it relation_remove $rel_id } @@ -165,6 +168,15 @@ return [db_string select_page_id {}] } + ad_proc -public get_all_communities_by_user { + user_id + } { + returns all communities for a user + } { + set list_of_communities [list] + ### HACK HERE !!! (ben) + } + ad_proc -public get_communities_by_user { community_type user_id 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 -N -r1.1 -r1.2 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 8 Oct 2001 21:39:05 -0000 1.1 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 9 Oct 2001 14:35:58 -0000 1.2 @@ -35,7 +35,7 @@ -select rel_id, users.user_id, first_names, last_name, email from users, dotlrn_community_memberships +select rel_id, users.user_id, first_names, last_name, email from registered_users users, dotlrn_community_memberships where community_id= :community_id and users.user_id = dotlrn_community_memberships.user_id @@ -55,9 +55,9 @@ - + -select rel_id from dotlrn_community_memberships where community_id= :community_id and user_id= :user_id +select rel_id, page_id from dotlrn_community_memberships where community_id= :community_id and user_id= :user_id Index: openacs-4/packages/dotlrn/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/index-oracle.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn/www/index-oracle.xql 6 Oct 2001 18:24:42 -0000 1.3 +++ openacs-4/packages/dotlrn/www/index-oracle.xql 9 Oct 2001 14:35:58 -0000 1.4 @@ -5,7 +5,7 @@ -select class_key, package_id from dotlrn_classes, dotlrn_community_types where dotlrn_community_types.community_type=dotlrn_classes.class_key order by class_key +select class_key, pretty_name, package_id from dotlrn_classes, dotlrn_community_types where dotlrn_community_types.community_type=dotlrn_classes.class_key order by class_key Index: openacs-4/packages/dotlrn/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/index.adp,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/index.adp 6 Oct 2001 18:24:42 -0000 1.2 +++ openacs-4/packages/dotlrn/www/index.adp 9 Oct 2001 14:35:58 -0000 1.3 @@ -8,7 +8,7 @@ Index: openacs-4/packages/dotlrn/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/index.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/index.tcl 7 Oct 2001 19:21:08 -0000 1.4 +++ openacs-4/packages/dotlrn/www/index.tcl 9 Oct 2001 14:35:58 -0000 1.5 @@ -19,6 +19,9 @@ return } +# Select communities this user is part of +set user_id [ad_get_user_id] + # Select the classes that exist db_multirow classes select_classes {} Index: openacs-4/packages/dotlrn/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/master.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/master.adp 20 Sep 2001 18:29:35 -0000 1.1 +++ openacs-4/packages/dotlrn/www/master.adp 9 Oct 2001 14:35:58 -0000 1.2 @@ -1,6 +1,22 @@ @title@ + + + + +
+ + + + + +
dotLRNMIT Sloan
+
+ + + +

@title@

<%= [eval ad_context_bar $context_bar] %> 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 -N -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/one-community-not-member.adp 7 Oct 2001 19:21:08 -0000 1.1 +++ openacs-4/packages/dotlrn/www/one-community-not-member.adp 9 Oct 2001 14:35:58 -0000 1.2 @@ -1,5 +1,6 @@ -dotLRN Commnity: @pretty_name@ +@context_bar@ +dotLRN Community: @pretty_name@ You are not a member of this community. Would you like to register? Index: openacs-4/packages/dotlrn/www/one-community-type.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-type.adp,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn/www/one-community-type.adp 8 Oct 2001 21:38:37 -0000 1.3 +++ openacs-4/packages/dotlrn/www/one-community-type.adp 9 Oct 2001 14:35:58 -0000 1.4 @@ -1,4 +1,5 @@ +@context_bar@ dotLRN: @pretty_name@

Index: openacs-4/packages/dotlrn/www/one-community-type.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-type.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/one-community-type.tcl 7 Oct 2001 19:21:08 -0000 1.2 +++ openacs-4/packages/dotlrn/www/one-community-type.tcl 9 Oct 2001 14:35:58 -0000 1.3 @@ -44,4 +44,6 @@ template::multirow append active_communities [lindex $comm 0] [lindex $comm 1] [lindex $comm 2] [lindex $comm 3] [lindex $comm 4] } +set context_bar {One Community Type} + ad_return_template 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 -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/one-community.adp 8 Oct 2001 21:38:37 -0000 1.2 +++ openacs-4/packages/dotlrn/www/one-community.adp 9 Oct 2001 14:35:58 -0000 1.3 @@ -1,7 +1,8 @@ -dotLRN Community +@context_bar@ +dotLRN Community: @pretty_name@ -

dotLRN Community: @pretty_name@

+You are registered! You may deregister if you'd like. +

- @rendered_page@ 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 -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/one-community.tcl 7 Oct 2001 19:21:08 -0000 1.2 +++ openacs-4/packages/dotlrn/www/one-community.tcl 9 Oct 2001 14:35:58 -0000 1.3 @@ -23,6 +23,8 @@ # Check that this user is a member if {![dotlrn_community::member_p $community_id $user_id]} { + set context_bar [list "Not a member"] + ad_return_template one-community-not-member return } else { @@ -31,5 +33,7 @@ set rendered_page [portal::render_portal $page_id] + set context_bar {View} + ad_return_template }