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.43 -r1.44 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 10 Jan 2002 00:11:38 -0000 1.43 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 10 Jan 2002 19:30:17 -0000 1.44 @@ -258,27 +258,19 @@ } ad_proc -public get_allowed_rel_types { - { -community_type "" } - { -community_id "" } + {-community_type ""} + {-community_id ""} } { if {[empty_string_p $community_type]} { set community_type [get_toplevel_community_type_from_community_id $community_id] } if {$community_type == "dotlrn_class_instance"} { - return { - {dotlrn_student_rel Student} - {dotlrn_ta_rel TA} - {dotlrn_instructor_rel Instructor} - {dotlrn_admin_rel Admin} - } + return {dotlrn_student_rel dotlrn_ta_rel dotlrn_instructor_rel dotlrn_admin_rel} } if {$community_type == "dotlrn_club"} { - return { - {dotlrn_member_rel Member} - {dotlrn_admin_rel Admin} - } + return {dotlrn_member_rel dotlrn_admin_rel} } return {} @@ -293,6 +285,22 @@ return $pretty_name } + ad_proc -public get_role_pretty_name { + {-role:required} + } { + Returns teh pretty version of the role + } { + return [db_string select_role_pretty_name {} -default ""] + } + + ad_proc -public get_role_pretty_name_from_rel_type { + {-rel_type:required} + } { + Returns teh pretty version of the role + } { + return [db_string select_role_pretty_name {} -default ""] + } + ad_proc -public get_rel_segment_id { {-community_id:required} {-rel_type:required} @@ -500,6 +508,15 @@ return [db_list_of_lists select_all_communities {}] } + ad_proc -public get_toplevel_community_type { + {-community_type:required} + } { + returns the toplevel community_type which is the ancestor of this + community_type + } { + return [db_string select_community_type {}] + } + ad_proc -public get_toplevel_community_type_from_community_id { community_id } {