+ package_id | user_id | Returns |
+ package_id | user_id | User preference for package_id (set with set_user_pref) |
+ null | user_id | User preference for all packages (set with set_user_pref) |
+ package_id | null | Package default (set with set_package_default) |
+ null | null | System default (set with preference::type::new) |
+
+
+ Note: null == empty string (""), ...
+
+ @param preference_type A short string that identifies the preference.
+ This corresponds to the short_name parameter passed to
+ preference::type::new.
+
+ @param package_id This can be the real package id, or an empty string.
+
+ @param user_id This can be the real user id, or an empty string.
+
+ @see preference::type::new
+ @see preference::set_package_default
+ @see preference::set_user_pref
+
} {
# get the preference type id
set preference_type_id [get_preference_type_id -preference_type $preference_type]
Index: openacs-4/packages/user-preferences/tcl/preference-types-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-preferences/tcl/preference-types-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/user-preferences/tcl/preference-types-procs.tcl 24 May 2002 20:43:27 -0000 1.1
+++ openacs-4/packages/user-preferences/tcl/preference-types-procs.tcl 25 Feb 2004 17:27:29 -0000 1.2
@@ -19,22 +19,32 @@
{-options ""}
{-default_value ""}
} {
- create a new preference type
+ Create a new preference type. The preference can be set at four
+ different levels. See get_user_pref for more details.
+
+ @param short_name This is the name that will be used to set or retrieve
+ the preference using set_user_pref or get_user_pref.
+
+ @see preference::set_user_pref
+ @see preference::get_user_pref
+ @see preference::set_package_default
} {
# Set up the vars
set extra_vars [ns_set create]
oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {preference_type_id package_key short_name pretty_name datatype options default_value}
# Instantiate the pref
- set preference_type_id [package_instantiate_object -extra_vars $extra_vars user_preference_type]
+ set preference_type_id [package_instantiate_object -extra_vars $extra_vars user_pref_type]
return $preference_type_id
}
ad_proc -public delete {
{-preference_type:required}
} {
- this deletes a preference type
+ This deletes a preference type. This is not yet implemented.
+
+ @param preference_type Corresponds to the short_name parameter to preference::type::new
} {
# FIXME: implement
}