Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-communities-create.sql,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql 1 Dec 2001 23:42:20 -0000 1.13
+++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql 8 Dec 2001 01:22:40 -0000 1.14
@@ -45,9 +45,26 @@
);
-- active communities
-create view dotlrn_active_comms as select dotlrn_communities.*, join_policy from dotlrn_communities, groups where (active_start_date is NULL or active_start_date < sysdate) and (active_end_date is NULL or active_end_date > sysdate) and dotlrn_communities.community_id = groups.group_id;
+create view dotlrn_active_comms
+as
+ select dotlrn_communities.*,
+ join_policy
+ from dotlrn_communities,
+ groups
+ where (active_start_date is null or active_start_date < sysdate)
+ and (active_end_date is null or active_end_date > sysdate)
+ and dotlrn_communities.community_id = groups.group_id;
-create view dotlrn_active_not_closed_comms as select dotlrn_communities.*, join_policy from dotlrn_communities, groups where (active_start_date is NULL or active_start_date < sysdate) and (active_end_date is NULL or active_end_date > sysdate) and dotlrn_communities.community_id = groups.group_id and join_policy <> 'closed';
+create view dotlrn_active_not_closed_comms
+as
+ select dotlrn_communities.*,
+ join_policy
+ from dotlrn_communities,
+ groups
+ where (active_start_date is null or active_start_date < sysdate)
+ and (active_end_date is null or active_end_date > sysdate)
+ and dotlrn_communities.community_id = groups.group_id
+ and join_policy <> 'closed';
create table dotlrn_community_applets (
community_id integer not null
Index: openacs-4/packages/dotlrn/tcl/class-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/class-procs.tcl,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/dotlrn/tcl/class-procs.tcl 6 Dec 2001 20:50:51 -0000 1.16
+++ openacs-4/packages/dotlrn/tcl/class-procs.tcl 8 Dec 2001 01:22:40 -0000 1.17
@@ -24,6 +24,32 @@
return "dotlrn_class_instance"
}
+ ad_proc -public package_key {
+ } {
+ Returns the package key for this package
+ } {
+ return "dotlrn"
+ }
+
+ ad_proc -public one_class_package_key {
+ } {
+ Returns the package key for this package
+ } {
+ return "dotlrn"
+ }
+
+ ad_proc -public get_url_part {} {
+ returns the url part for this community type
+ } {
+ return "classes"
+ }
+
+ ad_proc -public get_url {} {
+ returns the url part for this community type
+ } {
+ return "/[get_url_part]"
+ }
+
ad_proc -public is_initialized {} {
is dotlrn_class initialized with the right community_type?
} {
@@ -105,29 +131,18 @@
}
}
- ad_proc -public package_key {
+ ad_proc -public add_user {
+ {-rel_type "dotlrn_student_rel"}
+ {-community_id:required}
+ {-user_id:required}
} {
- Returns the package key for this package
+ Assigns a user to a particular role for that class. Roles in DOTLRN can be student, prof, ta, admin
} {
- return "dotlrn"
- }
+ db_transaction {
+ set extra_vars [ns_set create]
+ ns_set put $extra_vars class_instance_id $community_id
- ad_proc -public one_class_package_key {
- } {
- Returns the package key for this package
- } {
- return "dotlrn"
+ dotlrn_community::add_user_to_community -rel_type $rel_type -extra_vars $extra_vars -community_id $community_id -user_id $user_id
+ }
}
-
- ad_proc -public get_url_part {} {
- returns the url part for this community type
- } {
- return "classes"
- }
-
- ad_proc -public get_url {} {
- returns the url part for this community type
- } {
- return "/[get_url_part]"
- }
}
Index: openacs-4/packages/dotlrn/tcl/club-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/club-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/tcl/club-procs.tcl 6 Dec 2001 20:50:51 -0000 1.2
+++ openacs-4/packages/dotlrn/tcl/club-procs.tcl 8 Dec 2001 01:22:40 -0000 1.3
@@ -70,4 +70,16 @@
{member_rel Member}
}
}
+
+ ad_proc -public add_user {
+ {-rel_type "dotlrn_member_rel"}
+ {-community_id:required}
+ {-user_id:required}
+ } {
+ Assigns a user to a particular role for that club.
+ } {
+ db_transaction {
+ dotlrn_community::add_user_to_community -rel_type $rel_type -community_id $community_id -user_id $user_id
+ }
+ }
}
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.4 -r1.5
--- openacs-4/packages/dotlrn/tcl/community-procs-oracle.xql 30 Nov 2001 03:41:17 -0000 1.4
+++ openacs-4/packages/dotlrn/tcl/community-procs-oracle.xql 8 Dec 2001 01:22:40 -0000 1.5
@@ -49,6 +49,14 @@
+
+
+ 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 = (select community_type from dotlrn_communities where community_id=:community_id) connect by object_type= prior supertype
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.38 -r1.39
--- openacs-4/packages/dotlrn/tcl/community-procs.tcl 6 Dec 2001 20:50:51 -0000 1.38
+++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 8 Dec 2001 01:22:40 -0000 1.39
@@ -354,6 +354,23 @@
community_id
user_id
} {
+ add a user to a particular community
+ } {
+ if {[string equal [get_toplevel_community_type_from_community_id $community_id] "dotlrn_class_instance"]} {
+ dotlrn_class::add_user -rel_type $rel_type -community_id $community_id -user_id $user_id
+ } elseif {[string equal [get_toplevel_community_type_from_community_id $community_id] "dotlrn_club"]} {
+ dotlrn_club::add_user -rel_type $rel_type -community_id $community_id -user_id $user_id
+ } else {
+ add_user_to_community -rel_type $rel_type -community_id $community_id -user_id $user_id
+ }
+ }
+
+ ad_proc -public add_user_to_community {
+ {-rel_type "dotlrn_member_rel"}
+ {-community_id:required}
+ {-user_id:required}
+ {-extra_vars ""}
+ } {
Assigns a user to a particular role for that class. Roles in DOTLRN can be student, prof, ta, admin
} {
db_transaction {
@@ -364,11 +381,12 @@
$user_id]
# Create the form with the portal_id
- set extra_vars [ns_set create]
+ if {[empty_string_p $extra_vars]} {
+ set extra_vars [ns_set create]
+ }
ns_set put $extra_vars portal_id $portal_id
ns_set put $extra_vars user_id $user_id
ns_set put $extra_vars community_id $community_id
- ns_set put $extra_vars class_instance_id $community_id
# Set up the relationship
set rel_id [relation_add -extra_vars $extra_vars -member_state approved $rel_type $community_id $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 -r1.16 -r1.17
--- openacs-4/packages/dotlrn/tcl/community-procs.xql 3 Dec 2001 19:17:08 -0000 1.16
+++ openacs-4/packages/dotlrn/tcl/community-procs.xql 8 Dec 2001 01:22:40 -0000 1.17
@@ -73,9 +73,17 @@
-
-select dotlrn_communities.community_id, community_type, community_key, pretty_name from dotlrn_communities, dotlrn_member_rels_full where dotlrn_communities.community_id = dotlrn_member_rels_full.community_id and dotlrn_member_rels_full.user_id = :user_id
-
+
+ select dotlrn_communities.community_id,
+ dotlrn_communities.community_type,
+ dotlrn_communities.community_key,
+ dotlrn_communities.pretty_name,
+ dotlrn_communities.package_id
+ from dotlrn_communities,
+ dotlrn_member_rels_full
+ where dotlrn_communities.community_id = dotlrn_member_rels_full.community_id
+ and dotlrn_member_rels_full.user_id = :user_id
+
@@ -191,4 +199,12 @@
+
+
+ select count(*)
+ from dotlrn_community_types
+ where supertype = :community_type
+
+
+
Index: openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 5 Dec 2001 22:05:23 -0000 1.9
+++ openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 8 Dec 2001 01:22:40 -0000 1.10
@@ -25,6 +25,11 @@
if {![dotlrn_class::is_initialized]} { dotlrn_class::init }
if {![dotlrn_club::is_initialized]} { dotlrn_club::init }
+ set portal_package_key "new-portal"
+ if {![dotlrn::is_instantiated_here -url [portal::mount_point] -package_key $portal_package_key]} {
+ dotlrn::mount_package -parent_node_id [site_node_id "/"] -package_key $portal_package_key -url "portal" -directory_p "t"
+ }
+
# Grantee
set grantee_id [dotlrn::get_full_users_rel_segment_id]
Index: openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl 1 Dec 2001 23:16:27 -0000 1.8
+++ openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl 8 Dec 2001 01:22:40 -0000 1.9
@@ -1,121 +1,115 @@
# /packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl
ad_library {
-
+
Procedures to supports dotlrn main portlet
-
+
Copyright Openforce, Inc.
Licensed under GNU GPL v2
-
+
@creation-date November 4 2001
@author ben@openforce.net
@cvs-id $Id$
}
namespace eval dotlrn_main_portlet {
-
+
ad_proc -private my_name {
} {
- return "dotlrn_main_portlet"
+ return "dotlrn_main_portlet"
}
-
+
ad_proc -public get_pretty_name {
} {
- return "dotLRN"
+ return "dotLRN"
}
ad_proc -public link {
} {
- return ""
+ return ""
}
-
+
ad_proc -public add_self_to_page {
- portal_id
- instance_id
+ portal_id
+ instance_id
} {
- Adds a dotLRN PE to the given page with the instance key being
- opaque data in the portal configuration.
-
- @return element_id The new element's id
- @param portal_id The page to add self to
- @param instance_id The bboard instace to show
- @author arjun@openforce.net
- @creation-date Nov 2001
+ Adds a dotLRN PE to the given page with the instance key being
+ opaque data in the portal configuration.
+
+ @return element_id The new element's id
+ @param portal_id The page to add self to
+ @param instance_id The bboard instace to show
+ @author arjun@openforce.net
+ @creation-date Nov 2001
} {
- # Tell portal to add this element to the page
- set element_id [portal::add_element $portal_id [my_name]]
-
- return $element_id
+ # Tell portal to add this element to the page
+ set element_id [portal::add_element $portal_id [my_name]]
+
+ return $element_id
}
-
+
ad_proc -public show {
- cf
+ cf
} {
- Display the PE
-
- @return HTML string
- @param cf A config array
- @author ben@openforce.net
- @creation-date Nov 2001
+ Display the PE
+
+ @return HTML string
+ @param cf A config array
+ @author ben@openforce.net
+ @creation-date Nov 2001
} {
-
- array set config $cf
-
- set user_id [ad_get_user_id]
-
- # This is not templated. OH NO. I am a horrible, horrible, little man. (ben)
+ array set config $cf
- set return_html "
-
"
+
+ # return it all
+ return $return_html
}
-
+
ad_proc -public edit {
- cf
+ cf
} {
- return ""
+ return ""
}
ad_proc -public remove_self_from_page {
- portal_id
- instance_id
+ portal_id
+ instance_id
} {
- Removes a bboard PE from the given page
-
- @param portal_id The page to remove self from
- @param instance_id
- @author ben@openforce.net
- @creation-date Nov 2001
+ Removes a bboard PE from the given page
+
+ @param portal_id The page to remove self from
+ @param instance_id
+ @author ben@openforce.net
+ @creation-date Nov 2001
} {
- # get the element IDs (could be more than one!)
- set element_ids [portal::get_element_ids_by_ds $portal_id [my_name]]
+ # get the element IDs (could be more than one!)
+ set element_ids [portal::get_element_ids_by_ds $portal_id [my_name]]
- # remove all elements
- db_transaction {
- foreach element_id $element_ids {
- portal::remove_element $element_id
- }
- }
+ # remove all elements
+ db_transaction {
+ foreach element_id $element_ids {
+ portal::remove_element $element_id
+ }
+ }
}
-
}
-
-
Index: openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl,v
diff -u -r1.24 -r1.25
--- openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 6 Dec 2001 20:50:51 -0000 1.24
+++ openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 8 Dec 2001 01:22:40 -0000 1.25
@@ -58,27 +58,22 @@
ad_proc -public is_instantiated_here {
{-url:required}
+ {-package_key ""}
} {
returns 1 if dotlrn is instantiaed under the url specified, 0
otherwise
} {
set result 0
-# XXX this is much cleaner but it doesn't work because [site_node $url] will
-# eat through the url to try to find a match up the hierarchy. we want
-# an exact match
-#
-# if {[catch {array set site_node [site_node $url]}] == 0} {
-# if {[string equal [package_key] $site_node(package_key)]} {
-# set result 1
-# }
-# }
+ if {[empty_string_p $package_key]} {
+ set package_key [dotlrn::package_key]
+ }
if {[catch {nsv_array get site_nodes $url} site_node_list] == 0} {
for {set x 0} {$x < [llength $site_node_list]} {incr x 2} {
if {[string match $url [lindex $site_node_list $x]]} {
array set site_node [lindex $site_node_list [expr $x + 1]]
- if {[string equal [dotlrn::package_key] $site_node(package_key)]} {
+ if {[string equal $package_key $site_node(package_key)]} {
set result 1
break
} else {
Index: openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/site-nodes-procs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,40 @@
+ad_library {
+ Tcl procs for interface with the site-node data model.
+
+ @author yon@openforce.net
+ @creation-date 2001-12-07
+ @cvs-id $Id: site-nodes-procs.tcl,v 1.1 2001/12/08 01:22:40 yon Exp $
+}
+
+namespace eval site_nodes {
+ ad_proc -public get_url_from_node_id {
+ {-node_id:required}
+ } {
+ get url from node_id
+ } {
+ return [db_string get_url_from_node_id {
+ select site_node.url(:node_id) from dual
+ }]
+ }
+
+ ad_proc -public get_node_id_from_url {
+ {-url:required}
+ {-parent_node_id ""}
+ } {
+ get node_id from url
+ } {
+ return [db_exec_plsql get_node_id_from_url {
+ begin
+ :1 := site_node.node_id(url => :url, parent_id => :parent_node_id);
+ end;
+ }]
+ }
+
+ ad_proc -public get_parent_id {
+ {-node_id:required}
+ } {
+ get the parent_id of this node_id
+ } {
+ return [db_string select_parent_site_node {}]
+ }
+}
Index: openacs-4/packages/dotlrn/tcl/site-nodes-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/site-nodes-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/tcl/site-nodes-procs.xql 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,10 @@
+
+
+
+
+ select parent_id
+ from site_nodes
+ where node_id = :node_id
+
+
+
Index: openacs-4/packages/dotlrn/www/communities-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/communities-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/communities-oracle.xql 8 Dec 2001 01:23:46 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+ oracle8.1.6
+
+
+
+ select dotlrn_communities.community_id,
+ dotlrn_communities.community_type,
+ dotlrn_communities.pretty_name,
+ dotlrn_communities.description,
+ dotlrn_communities.package_id,
+ (select site_node.url(site_nodes.node_id)
+ from site_nodes
+ where site_nodes.object_id = dotlrn_communities.package_id) as url,
+ (select decode(count(*), 0, 'f', 't')
+ from dotlrn_member_rels_full
+ where dotlrn_member_rels_full.user_id = :user_id
+ and dotlrn_member_rels_full.community_id = dotlrn_communities.community_id) as member_p,
+ acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin') as admin_p
+ from dotlrn_active_not_closed_comms dotlrn_communities
+ where dotlrn_communities.community_type = :community_type
+
+
+
Index: openacs-4/packages/dotlrn/www/communities.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/communities.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/communities.adp 8 Dec 2001 01:23:46 -0000 1.1
@@ -0,0 +1,26 @@
+
+ Communities
+
+
+
+ Currently, there are no active communities.
+
Index: openacs-4/packages/dotlrn/www/communities.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/communities.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/communities.tcl 8 Dec 2001 01:23:46 -0000 1.1
@@ -0,0 +1,17 @@
+# dotlrn/www/communities.tcl
+
+ad_page_contract {
+ @author yon (yon@milliped.com)
+ @creation-date Dec 07, 2001
+ @cvs-id $Id: communities.tcl,v 1.1 2001/12/08 01:23:46 yon Exp $
+} -query {
+} -properties {
+ communities:multirow
+}
+
+set user_id [ad_conn user_id]
+set community_type [dotlrn_community::get_community_type]
+
+db_multirow communities select_communities {}
+
+ad_return_template
Index: openacs-4/packages/dotlrn/www/community-register.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-register.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/www/community-register.tcl 7 Nov 2001 22:22:10 -0000 1.2
+++ openacs-4/packages/dotlrn/www/community-register.tcl 8 Dec 2001 01:22:40 -0000 1.3
@@ -1,4 +1,3 @@
-
ad_page_contract {
register
@@ -12,6 +11,6 @@
set user_id [ad_conn user_id]
set community_id [dotlrn_community::get_community_id]
-dotlrn_community::add_user -rel_type dotlrn_student_rel $community_id $user_id
+dotlrn_community::add_user $community_id $user_id
-ns_returnredirect ./
+ad_returnredirect ./
Index: openacs-4/packages/dotlrn/www/community-types-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-types-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/community-types-oracle.xql 8 Dec 2001 01:23:46 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ oracle8.1.6
+
+
+
+ select dotlrn_community_types.community_type,
+ dotlrn_community_types.pretty_name,
+ dotlrn_community_types.description,
+ (select site_node.url(site_nodes.node_id)
+ from site_nodes
+ where site_nodes.object_id = dotlrn_community_types.package_id) as url
+ from dotlrn_community_types
+ where dotlrn_community_types.supertype = :community_type
+
+
+
Index: openacs-4/packages/dotlrn/www/community-types.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-types.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/community-types.adp 8 Dec 2001 01:23:46 -0000 1.1
@@ -0,0 +1,13 @@
+
+ Community Types
+
+
+
+ Currently, there are no active community types.
+
Index: openacs-4/packages/dotlrn/www/community-types.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-types.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/community-types.tcl 8 Dec 2001 01:23:46 -0000 1.1
@@ -0,0 +1,16 @@
+# dotlrn/www/community-types.tcl
+
+ad_page_contract {
+ @author yon (yon@milliped.com)
+ @creation-date Dec 07, 2001
+ @cvs-id $Id: community-types.tcl,v 1.1 2001/12/08 01:23:46 yon Exp $
+} -query {
+} -properties {
+ community_types:multirow
+}
+
+set community_type [dotlrn_community::get_community_type]
+
+db_multirow community_types select_community_types {}
+
+ad_return_template
Index: openacs-4/packages/dotlrn/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/index.tcl,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/dotlrn/www/index.tcl 6 Dec 2001 20:50:51 -0000 1.12
+++ openacs-4/packages/dotlrn/www/index.tcl 8 Dec 2001 01:22:40 -0000 1.13
@@ -1,4 +1,3 @@
-
ad_page_contract {
Displays the personal home page
@@ -7,19 +6,12 @@
} {
}
-ns_log notice "XXX0"
-
# Check if this is a community type level thing
if {[ad_parameter community_type_level_p] == 1} {
- ns_log notice "XXX0.5"
ad_returnredirect "one-community-type"
- ns_log notice "XXX0.55"
ad_script_abort
- ns_log notice "XXX0.60"
}
-ns_log notice "XXX1"
-
# Check if this is a community level thing
if {[ad_parameter community_level_p] == 1} {
ad_returnredirect "one-community"
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 -r1.11 -r1.12
--- openacs-4/packages/dotlrn/www/one-community-type.adp 6 Dec 2001 20:50:51 -0000 1.11
+++ openacs-4/packages/dotlrn/www/one-community-type.adp 8 Dec 2001 01:22:40 -0000 1.12
@@ -1,26 +1,23 @@
-<% ns_log notice "XXX ADP" %>
@context_bar@
dotLRN: @pretty_name@
-
+
+
+
-@description@
+ @description@
-
+
-
-No Active Communities of this type
-
-
-Active Communities of this Type
-
-
+
+
+
-
-
+
+
+
+
+
+
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 -r1.7 -r1.8
--- openacs-4/packages/dotlrn/www/one-community-type.tcl 6 Dec 2001 20:50:51 -0000 1.7
+++ openacs-4/packages/dotlrn/www/one-community-type.tcl 8 Dec 2001 01:22:40 -0000 1.8
@@ -1,13 +1,13 @@
ad_page_contract {
Displays a community type
-
+
@author Ben Adida (ben@openforce.net)
+ @author yon (yon@openforce.net)
@creation-date 2001-10-04
-} {
+} -query {
+} -properties {
}
-ns_log notice "XXX0.6"
-
# Check that this is a community type
if {[ad_parameter community_type_level_p] != 1} {
ad_returnredirect "./"
@@ -22,34 +22,6 @@
# Load some community type info
db_1row select_community_type_info {}
-# Check what communities of this type the user is a member of
-# cause we want to display that!
-set member_communities [dotlrn_community::get_communities_by_user $community_type $user_id]
-
-# Load all active communities for this community type
-set list_of_active_communities [dotlrn_community::get_active_communities $community_type]
-
-# data source
-template::multirow create active_communities community_id community_type pretty_name description url admin_p member_p
-
-# Loop and create the data source (I am very unhappy with db_multirow. VERY - bma)
-foreach comm $list_of_active_communities {
- # See if user can admin this
- if {[dotlrn::user_can_admin_community_p [lindex $comm 0]]} {
- set admin_p 1
- } else {
- set admin_p 0
- }
-
- if {[lsearch [lindex $comm 0] $member_communities]} {
- set member_p 1
- } else {
- set member_p 0
- }
-
- template::multirow append active_communities [lindex $comm 0] [lindex $comm 1] [lindex $comm 2] [lindex $comm 3] [lindex $comm 4] $admin_p $member_p
-}
-
set context_bar {View}
ad_return_template
Index: openacs-4/packages/dotlrn/www/admin/club-new-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/club-new-2.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/admin/club-new-2.tcl 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,15 @@
+ad_page_contract {
+ create a new club - processing
+
+ @author yon (yon@openforce.net)
+ @creation-date 2001-12-03
+ @cvs-id $Id: club-new-2.tcl,v 1.1 2001/12/08 01:22:40 yon Exp $
+} {
+ key:trim
+ pretty_name:trim
+ description
+}
+
+set key [dotlrn_club::new -description $description -key $key -pretty_name $pretty_name]
+
+ad_returnredirect "clubs"
Index: openacs-4/packages/dotlrn/www/admin/club-new.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/club-new.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/admin/club-new.adp 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,21 @@
+
+dotLRN New Club
+@context_bar@
+
+
Index: openacs-4/packages/dotlrn/www/admin/club-new.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/club-new.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/admin/club-new.tcl 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,14 @@
+ad_page_contract {
+ create a new club - input form
+
+ @author yon (yon@openforce.net)
+ @creation-date 2001-12-03
+ @cvs-id $Id: club-new.tcl,v 1.1 2001/12/08 01:22:40 yon Exp $
+} {
+} -properties {
+ context_bar:onevalue
+}
+
+set context_bar {{clubs Clubs} New}
+
+ad_return_template
Index: openacs-4/packages/dotlrn/www/admin/club.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/club.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/admin/club.adp 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,3 @@
+
+@pretty_name@
+@context_bar@
Index: openacs-4/packages/dotlrn/www/admin/club.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/club.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/admin/club.tcl 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,21 @@
+ad_page_contract {
+ displays single dotLRN club page
+
+ @author yon (yon@openforce.net)
+ @creation-date 2001-12-03
+ @cvs-id $Id: club.tcl,v 1.1 2001/12/08 01:22:40 yon Exp $
+} -query {
+ club_id:naturalnum,notnull
+} -errors {
+ club_id:naturalnum,notnull {must provide a valid club_id}
+} -properties {
+ context_bar:onevalue
+ pretty_name:onevalue
+ description:onevalue
+}
+
+set context_bar {{clubs Clubs} One}
+
+db_1row select_club {}
+
+ad_return_template
Index: openacs-4/packages/dotlrn/www/admin/club.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/club.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/admin/club.xql 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+
+
+
+ select dotlrn_communities.pretty_name,
+ dotlrn_communities.description
+ from dotlrn_clubs,
+ dotlrn_communities
+ where dotlrn_clubs.club_id = :club_id
+ and dotlrn_communities.community_id = :club_id
+
+
+
Index: openacs-4/packages/dotlrn/www/admin/clubs.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/clubs.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/admin/clubs.adp 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,11 @@
+
+dotLRN Clubs
+@context_bar@
+
+
Index: openacs-4/packages/dotlrn/www/admin/clubs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/clubs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/admin/clubs.tcl 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,17 @@
+ad_page_contract {
+ displays dotLRN clubs admin page
+
+ @author yon (yon@openforce.net)
+ @creation-date 2001-12-03
+ @cvs-id $Id: clubs.tcl,v 1.1 2001/12/08 01:22:40 yon Exp $
+} {
+} -properties {
+ clubs:multirow
+ context_bar:onevalue
+}
+
+set context_bar "clubs"
+
+db_multirow clubs select_clubs {}
+
+ad_return_template
Index: openacs-4/packages/dotlrn/www/admin/clubs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/clubs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/admin/clubs.xql 8 Dec 2001 01:22:40 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+ select dotlrn_clubs.club_id,
+ dotlrn_communities.community_key,
+ dotlrn_communities.pretty_name,
+ dotlrn_communities.description
+ from dotlrn_clubs,
+ dotlrn_communities
+ where dotlrn_clubs.club_id = dotlrn_communities.community_id
+
+
+