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 -N -r1.36 -r1.37
--- openacs-4/packages/dotlrn/tcl/class-procs.tcl 18 May 2002 22:42:11 -0000 1.36
+++ openacs-4/packages/dotlrn/tcl/class-procs.tcl 21 May 2002 00:53:58 -0000 1.37
@@ -180,19 +180,6 @@
return $community_id
}
- ad_proc -public available_roles {
- } {
- Returns the available roles
- } {
- return {
- {instructor_rel "Professor"}
- {aa_rel "Course Assistant"}
- {ta_rel "Teaching Assistant"}
- {student_rel "Student"}
- {admin_rel "Administrator"}
- }
- }
-
ad_proc -public add_user {
{-rel_type ""}
{-community_id:required}
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 -N -r1.13 -r1.14
--- openacs-4/packages/dotlrn/tcl/club-procs.tcl 7 May 2002 22:06:11 -0000 1.13
+++ openacs-4/packages/dotlrn/tcl/club-procs.tcl 21 May 2002 00:53:58 -0000 1.14
@@ -84,15 +84,6 @@
-extra_vars $extra_vars]
}
- ad_proc -public available_roles {} {
- returns the available roles
- } {
- return {
- {admin_rel "Administrator"}
- {member_rel "Member"}
- }
- }
-
ad_proc -public add_user {
{-rel_type "" }
{-community_id:required}
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 -N -r1.124 -r1.125
--- openacs-4/packages/dotlrn/tcl/community-procs.tcl 20 May 2002 21:39:38 -0000 1.124
+++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 21 May 2002 00:53:58 -0000 1.125
@@ -445,7 +445,6 @@
# else, it's a class instance
return {dotlrn_student_rel dotlrn_ta_rel dotlrn_instructor_rel dotlrn_ca_rel dotlrn_cadmin_rel}
-
}
ad_proc -public get_all_roles {} {
@@ -466,26 +465,14 @@
return $roles
}
- ad_proc -public get_pretty_rel_type {
- rel_type
+ ad_proc -public get_role_from_rel_type {
+ {-rel_type:required}
} {
- Returns a pretty version of the rel_type
+ returns the role associated with this rel_type
} {
- return [db_string select_pretty_name {
- select pretty_name
- from acs_object_types
- where object_type = :rel_type
- }]
+ return [db_string select_role {} -default ""]
}
- ad_proc -public get_role_pretty_name {
- {-role:required}
- } {
- Returns the 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}
} {
@@ -494,14 +481,6 @@
return [db_string select_role_pretty_name {} -default ""]
}
- ad_proc -public get_role_pretty_name_from_rel_id {
- {-rel_id:required}
- } {
- Returns the 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}
@@ -1755,7 +1734,7 @@
}
ad_proc -private get_available_attributes_not_cached {} {
- return [db_list_of_ns_sets select_available_attributes {}]
+ return [db_list_of_lists select_available_attributes {}]
}
ad_proc -public get_attributes {
@@ -1773,7 +1752,7 @@
ad_proc -private get_attributes_not_cached {
{-community_id:required}
} {
- return [db_list_of_ns_sets select_attributes {}]
+ return [db_list_of_lists select_attributes {}]
}
ad_proc -public get_attribute {
@@ -1782,15 +1761,15 @@
} {
get the value for an attribute of this community
} {
- set attr_value ""
- foreach pair [get_attributes -community_id $community_id] {
- if {[string match $attribute_name [ns_set get $pair attribute_name]]} {
- set attr_value [ns_set get $pair attr_value]
+ set attribute_value ""
+ foreach {attr_name attr_value} [get_attributes -community_id $community_id] {
+ if {[string match $attribute_name $attr_name]} {
+ set attribute_value $attr_value
break
}
}
- return $attr_value
+ return $attribute_value
}
ad_proc -public set_attributes {
@@ -1799,8 +1778,8 @@
} {
set attributes for a certain community
} {
- foreach pair $pairs {
- set_attribute -community_id $community_id -attribute_name [lindex $pair 0] -attribute_value [lindex $pair 1]
+ foreach {attr_name attr_value} $pairs {
+ set_attribute -community_id $community_id -attribute_name $attr_name -attribute_value $attr_value
}
}
@@ -1850,9 +1829,9 @@
} {
set attribute_id ""
- foreach pair [get_available_attributes] {
- if {[string match $attribute_name [ns_set get $pair attribute_name]]} {
- set attribute_id [ns_set get $pair attribute_id]
+ foreach {attr_id attr_name} [get_available_attributes] {
+ if {[string match $attribute_name $attr_name]} {
+ set attribute_id $attr_id]
break
}
}
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 -N -r1.60 -r1.61
--- openacs-4/packages/dotlrn/tcl/community-procs.xql 20 May 2002 21:39:38 -0000 1.60
+++ openacs-4/packages/dotlrn/tcl/community-procs.xql 21 May 2002 00:53:58 -0000 1.61
@@ -95,11 +95,11 @@
-
+
- select pretty_name
- from acs_rel_roles
- where role = :role
+ select role_two
+ from acs_rel_types
+ where rel_type = :rel_type
@@ -113,18 +113,6 @@
-
-
- select pretty_name
- from acs_rel_roles
- where role = (select acs_rel_types.role_two
- from acs_rel_types,
- acs_rels
- where acs_rel_types.rel_type = acs_rels.rel_type
- and acs_rels.rel_id = :rel_id)
-
-
-
select segment_id