Index: openacs-4/packages/dotlrn/dotlrn.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v
diff -u -r1.68 -r1.69
--- openacs-4/packages/dotlrn/dotlrn.info 16 Mar 2002 02:02:07 -0000 1.68
+++ openacs-4/packages/dotlrn/dotlrn.info 20 Mar 2002 20:04:01 -0000 1.69
@@ -100,6 +100,7 @@
+
@@ -257,6 +258,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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.84 -r1.85
--- openacs-4/packages/dotlrn/tcl/community-procs.tcl 18 Mar 2002 22:29:38 -0000 1.84
+++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 20 Mar 2002 20:04:01 -0000 1.85
@@ -338,7 +338,7 @@
}
# else, it's a class instance
- return {dotlrn_student_rel dotlrn_ta_rel dotlrn_instructor_rel dotlrn_ca_rel dotlrn_cadmin_rel dotlrn_admin_rel}
+ return {dotlrn_student_rel dotlrn_ta_rel dotlrn_instructor_rel dotlrn_ca_rel dotlrn_cadmin_rel}
}
@@ -458,6 +458,16 @@
return [db_list_of_lists select_users {}]
}
+ ad_proc -public list_possible_subcomm_users {
+ {-subcomm_id:required}
+ } {
+ Returns the list of users from the subcomm's parent group that
+ are not already in the subcomm with a membership_id, a user_id,
+ first name, last name, email, and role
+ } {
+ return [db_list_of_lists select_possible_users {}]
+ }
+
ad_proc -public list_users_in_role {
{-rel_type:required}
community_id
@@ -751,6 +761,20 @@
return [db_string select_community_type {} -default ""]
}
+ ad_proc -public get_community_id_from_url {
+ {-url ""}
+ } {
+ returns the community from a URL
+ } {
+ if {[empty_string_p $url]} {
+ set url [ad_conn url]
+ }
+
+ set package_id [site_node_closest_ancestor_package -url $url dotlrn]
+
+ return [get_community_id -package_id $package_id]
+ }
+
ad_proc -public get_community_id {
{-package_id ""}
} {
@@ -791,6 +815,20 @@
return [db_string select_parent_id {} -default ""]
}
+ ad_proc -public get_parent_name {
+ {-community_id:required}
+ } {
+ Returns the parent community's name or null string
+ } {
+ set parent_id [get_parent_id -community_id $community_id]
+
+ if {[empty_string_p $parent_id]} {
+ return ""
+ } else {
+ return [get_community_name $parent_id]
+ }
+ }
+
ad_proc -public check_community_key_valid_p {
{-community_key:required}
{-parent_community_id ""}
@@ -960,8 +998,7 @@
get the name for a community for the header
} {
if {[subcommunity_p -community_id $community_id]} {
- set parent_id [get_parent_id -community_id $community_id]
- set parent_name [get_community_name $parent_id]
+ set parent_name [get_parent_name -community_id $community_id]
return [concat "$parent_name : [get_community_name $community_id]"]
} else {
return [get_community_name $community_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.39 -r1.40
--- openacs-4/packages/dotlrn/tcl/community-procs.xql 16 Mar 2002 18:59:03 -0000 1.39
+++ openacs-4/packages/dotlrn/tcl/community-procs.xql 20 Mar 2002 20:04:01 -0000 1.40
@@ -124,6 +124,24 @@
+
+
+ select parent.rel_id,
+ parent.rel_type,
+ users.user_id,
+ first_names,
+ last_name,
+ email
+ from registered_users users,
+ dotlrn_member_rels_approved parent,
+ dotlrn_communities dc
+ where dc.community_id = :subcomm_id
+ and dc.parent_community_id = parent.community_id
+ and users.user_id = parent.user_id
+ and users.user_id not in (select user_id from dotlrn_member_rels_approved where community_id = :subcomm_id)
+ order by parent.rel_type
+
+
Index: openacs-4/packages/dotlrn/tcl/dotlrn-navigation-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/dotlrn-navigation-procs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/tcl/dotlrn-navigation-procs.tcl 20 Mar 2002 20:04:01 -0000 1.1
@@ -0,0 +1,30 @@
+
+ad_library {
+ Procs for navigating dotLRN
+
+ @author ben@openforce
+ @creation-date 2002-03-18
+}
+
+namespace eval dotlrn_navbar {
+
+ ad_proc -public navbar_links {
+ {-url ""}
+ {-links:required}
+ } {
+ set list_of_links [list [list [dotlrn::get_url] dotLRN]]
+
+ # Determine if we're in a community
+ set community_id [dotlrn_community::get_community_id_from_url -url $url]
+
+ if {![empty_string_p $community_id]} {
+ lappend list_of_links [list [dotlrn_community::get_community_url $community_id] \
+ [dotlrn_community::get_community_name $community_id]]
+ }
+
+ set list_of_links [concat $list_of_links $links]
+
+ return $list_of_links
+ }
+
+}
\ No newline at end of file