Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-main-portlet-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn/www/dotlrn-main-portlet-oracle.xql 7 Apr 2002 04:19:07 -0000 1.1
+++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet-oracle.xql 7 Apr 2002 06:09:35 -0000 1.2
@@ -3,32 +3,28 @@
oracle8.1.6
-
+
- select dotlrn_member_rels_approved.community_id,
- dotlrn_class_instances_full.pretty_name,
- dotlrn_class_instances_full.url,
- acs_permission.permission_p(dotlrn_member_rels_approved.community_id, :user_id, 'admin') as admin_p,
- dotlrn_community.has_subcomm_p(dotlrn_member_rels_approved.community_id) as subcomm_p
- from dotlrn_class_instances_full,
- dotlrn_member_rels_approved
- where dotlrn_member_rels_approved.user_id = :user_id
- and dotlrn_member_rels_approved.community_id = dotlrn_class_instances_full.class_instance_id
+ select dc.*,
+ dotlrn_community.url(dc.community_id) as url,
+ acs_permission.permission_p(dc.community_id, :user_id, 'admin') as admin_p,
+ decode(dc.community_type, 'dotlrn_community', 'dotlrn_community',
+ 'dotlrn_club', 'dotlrn_club',
+ 'dotlrn_class_instance') as simple_community_type
+ from (select level,
+ dotlrn_communities.community_id,
+ dotlrn_communities.parent_community_id,
+ dotlrn_communities.community_type,
+ dotlrn_communities.pretty_name
+ from dotlrn_communities
+ connect by prior dotlrn_communities.community_id = dotlrn_communities.parent_community_id
+ start with dotlrn_communities.parent_community_id is null
+ order by decode(dotlrn_communities.community_type, 'dotlrn_community', 2, 'dotlrn_club', 1, 0),
+ dotlrn_communities.pretty_name) dc,
+ dotlrn_member_rels_approved dmra
+ where dc.community_id = dmra.community_id
+ and dmra.user_id = :user_id
-
-
- select dotlrn_member_rels_approved.community_id,
- dotlrn_clubs_full.pretty_name,
- dotlrn_clubs_full.url,
- acs_permission.permission_p(dotlrn_member_rels_approved.community_id, :user_id, 'admin') as admin_p,
- dotlrn_community.has_subcomm_p(dotlrn_member_rels_approved.community_id) as subcomm_p
- from dotlrn_clubs_full,
- dotlrn_member_rels_approved
- where dotlrn_member_rels_approved.user_id = :user_id
- and dotlrn_member_rels_approved.community_id = dotlrn_clubs_full.club_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.23 -r1.24
--- openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp 5 Apr 2002 01:00:41 -0000 1.23
+++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp 7 Apr 2002 06:09:35 -0000 1.24
@@ -18,52 +18,70 @@
%>
+[ Join/Drop a Class or Community Group ]
-[Join/Drop a Class or Community Group]
+
-
-
-
-
- <%= [ad_parameter class_instances_pretty_plural] %>:
-
- -
- @classes.pretty_name@
-
- [admin]
-
-
-
-
- <%= [dotlrn_community::get_subcomm_chunk_new -user_id $user_id -community_id $classes(community_id) -only_member_p 1] %>
-
-
-
-
-
-
- <%= [ad_parameter clubs_pretty_plural] %>:
-
-
+<%
+ set old_simple_community_type ""
+ set new_simple_community_type ""
+ set old_level 0
+ set new_level 0
+%>
+
+
+
+<%
+ if {![string equal $communities(simple_community_type) "dotlrn_community"] == 1} {
+ set new_simple_community_type $communities(simple_community_type)
+ }
+ set new_level $communities(level)
+%>
+
+
+
+
+
+
+
+
+
+<% set old_level [expr $new_level - 1] %>
+
+
+ <%= [ad_parameter "class_instances_pretty_plural"] %>:
+
+
+ <%= [ad_parameter "clubs_pretty_plural"] %>:
+
+
+
+
+
+
- @clubs.pretty_name@
-
- [admin]
+ @communities.pretty_name@
+
+ [admin]
-
-
- <%= [dotlrn_community::get_subcomm_chunk_new -user_id $user_id -community_id $clubs(community_id) -only_member_p 1] %>
-
-
-
+
+<%
+ set old_simple_community_type $new_simple_community_type
+ set old_level $new_level
+%>
+
+
+
+<%
+ for {set i $new_level} {$i > 0} {incr i -1} {
+ template::adp_puts "\n"
+ }
+%>
+
-
-
-
-
Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl 29 Mar 2002 19:14:46 -0000 1.4
+++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl 7 Apr 2002 06:09:35 -0000 1.5
@@ -24,8 +24,6 @@
}
set user_id [ad_conn user_id]
+db_multirow communities select_communities {}
-db_multirow classes select_classes {}
-db_multirow clubs select_clubs {}
-
ad_return_template
Fisheye: Tag 1.8 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/dotlrn-main-portlet.xql'.
Fisheye: No comparison available. Pass `N' to diff?