Index: openacs-4/packages/dotlrn/tcl/community-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs-oracle.xql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/dotlrn/tcl/community-procs-oracle.xql 14 Feb 2002 23:29:37 -0000 1.10
+++ openacs-4/packages/dotlrn/tcl/community-procs-oracle.xql 5 Mar 2002 22:37:34 -0000 1.11
@@ -3,96 +3,114 @@
oracle8.1.6
-
-
- declare
- begin
- :1 := dotlrn_community_type.new(
- community_type => :community_type_key,
- parent_type => :parent_type,
- pretty_name => :pretty_name,
- pretty_plural => :pretty_name,
- description => :description
- );
- end;
-
-
+
+
+ select dotlrn_communities.community_id
+ from dotlrn_communities,
+ (select site_nodes.object_id
+ from site_nodes
+ where exists (select 1
+ from dotlrn_communities dc
+ where dc.package_id = site_nodes.object_id)
+ and rownum = 1
+ start with site_nodes.node_id = (select sn.node_id
+ from site_nodes sn
+ where sn.object_id = :package_id)
+ connect by prior site_nodes.parent_id = site_nodes.node_id) packages
+ where dotlrn_communities.package_id = packages.object_id
+
+
-
-
- declare
- begin
- :1 := dotlrn_community.new(
- community_type => :community_type,
- community_key => :name
- pretty_name => :pretty_name,
- pretty_plural => :pretty_name,
- description => :description
- );
- end;
-
-
+
+
+ declare
+ begin
+ :1 := dotlrn_community_type.new(
+ community_type => :community_type_key,
+ parent_type => :parent_type,
+ pretty_name => :pretty_name,
+ pretty_plural => :pretty_name,
+ description => :description
+ );
+ end;
+
+
-
-
- declare
- begin
- dotlrn_community.set_active_dates(
- community_id => :community_id,
- start_date => to_date(:start_date, :date_format),
- end_date => to_date(:end_date, :date_format)
- );
- end;
-
-
+
+
+ declare
+ begin
+ :1 := dotlrn_community.new(
+ community_type => :community_type,
+ community_key => :name
+ pretty_name => :pretty_name,
+ pretty_plural => :pretty_name,
+ description => :description
+ );
+ end;
+
+
-
-
- select site_node.url(node_id)
- from site_nodes
- where parent_id = :current_node_id
- and object_id= :package_id
-
-
+
+
+ declare
+ begin
+ dotlrn_community.set_active_dates(
+ community_id => :community_id,
+ start_date => to_date(:start_date, :date_format),
+ end_date => to_date(:end_date, :date_format)
+ );
+ end;
+
+
-
-
- select site_node.url(node_id)
- from site_nodes
- where object_id = :package_id
-
-
+
+
+ select site_node.url(node_id)
+ from site_nodes
+ where parent_id = :current_node_id
+ and object_id= :package_id
+
+
-
-
- select community_type
- from dotlrn_communities
- where community_id = :community_id
-
-
+
+
+ select site_node.url(node_id)
+ from site_nodes
+ where object_id = :package_id
+
+
-
-
- select object_type
- from acs_object_types
- where supertype = 'dotlrn_community'
- start with object_type = (select community_type
- from dotlrn_communities
- where parent_community_id is null
- and community_type != 'dotlrn_community'
- start with community_id = :community_id
- connect by community_id = prior parent_community_id)
- connect by object_type = prior supertype
-
-
+
+
+ select community_type
+ from dotlrn_communities
+ where community_id = :community_id
+
+
-
-
- select object_type
- from acs_object_types
- where supertype = 'dotlrn_community'
- start with object_type = :community_type
- connect by object_type = prior supertype
-
-
+
+
+ select object_type
+ from acs_object_types
+ where supertype = 'dotlrn_community'
+ start with object_type = (select community_type
+ from dotlrn_communities
+ where parent_community_id is null
+ and community_type != 'dotlrn_community'
+ start with community_id = :community_id
+ connect by community_id = prior parent_community_id)
+ connect by object_type = prior supertype
+
+
+
+
+
+ select object_type
+ from acs_object_types
+ where supertype = 'dotlrn_community'
+ start with object_type = :community_type
+ connect by object_type = prior supertype
+
+
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.30 -r1.31
--- openacs-4/packages/dotlrn/tcl/community-procs.xql 4 Mar 2002 23:54:00 -0000 1.30
+++ openacs-4/packages/dotlrn/tcl/community-procs.xql 5 Mar 2002 22:37:34 -0000 1.31
@@ -10,7 +10,6 @@
-
update dotlrn_community_types set package_id= :package_id where community_type= :community_type
@@ -23,6 +22,14 @@
+
+
+ select dotlrn_communities.parent_community_id
+ from dotlrn_communities
+ where dotlrn_communities.community_id = :community_id
+
+
+
select node_id from site_nodes where object_id= (select package_id from dotlrn_community_types where community_type= :community_type)
@@ -179,31 +186,12 @@
-
-
-select community_id from dotlrn_communities where package_id= :package_id
-
-
-
-
-
-select parent_community_id from dotlrn_communities where community_id = :community_id
-
-
-
select community_id as subcomm_id from dotlrn_communities where parent_community_id = :community_id
-
-
-select community_id as subcomm_id from dotlrn_communities where parent_community_id = :community_id
-
-
-
-
select package_id from dotlrn_community_types where community_type= :community_type
@@ -251,22 +239,6 @@
-
-
-select applet_id from dotlrn_applets where applet_key = :applet_key
-
-
-
-
-
-
-insert into dotlrn_applets
-(applet_id, applet_key, status)
-values
-(:applet_id, :applet_key, :status)
-
-
-
insert into dotlrn_community_applets