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.191.2.25 -r1.191.2.26 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 7 Mar 2006 05:39:34 -0000 1.191.2.25 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 14 Mar 2006 04:02:04 -0000 1.191.2.26 @@ -2341,7 +2341,14 @@ {-community_id:required} {-site_template_id:required} } { - set the site_template_id for a given community_id + Sets a given Site Template for a Community + + @author Victor Guerra ( guerra@galileo.edu ) + @creation-date 2006-03-11 + + @param community_id The id of the Community that will change it's Site Template + @param site_template_id The id of the Site Template that will be used by the Community + } { db_dml update_site_template {} set new_theme_id [db_string select_portal_theme {}] @@ -2356,7 +2363,15 @@ ad_proc -public get_dotlrn_master { {-community_id:required} } { - Returns the master configured for the user_id + Returns the master configured for a given Community + + @author Victor Guerra ( guerra@galileo.edu ) + @creation-date 2006-03-11 + + @param community_id The id of the Community in order to obtain the master template configured for it + + @returns The path of the master template that will be used. + } { set site_template_id [get_site_template_id -community_id $community_id] return [dotlrn::get_master_from_site_template_id -site_template_id $site_template_id] @@ -2365,14 +2380,23 @@ ad_proc -public get_site_template_id { {-community_id:required} } { - get the id of the comm's site template + Gets the id of the community's site template + + @author Victor Guerra ( guerra@galileo.edu ) + @creation-date 2006-03-11 + + @param community_id The id of the Community of which we want to abtain the Site Template + + @returns The id of the Site Template assigned to the Community + } { return [util_memoize [list dotlrn_community::get_site_template_id_not_cached -community_id $community_id]] } ad_proc -private get_site_template_id_not_cached { {-community_id:required} } { + Gets the id of the community's site template - not cached } { set dotlrn_package_id [dotlrn::get_package_id] set comm_site_template_id [db_string select_site_template_id {} -default "0"] @@ -2390,6 +2414,14 @@ ad_proc -public assign_default_sitetemplate { {-site_template_id:required} } { + Assigns a portal theme associated to a Site Template + to all communities + + @author Victor Guerra ( guerra@galileo.edu ) + @creation-date 2006-03-11 + + @param site_template_id The id of The Site Template to obtain the portal theme to be assigned + } { # We need to update the portal theme before the first hit! 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.74.8.6 -r1.74.8.7 --- openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 7 Mar 2006 05:39:34 -0000 1.74.8.6 +++ openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 14 Mar 2006 04:02:04 -0000 1.74.8.7 @@ -414,7 +414,14 @@ {-user_id:required} {-site_template_id:required} } { - Sets the site_template_id for a given user + Sets a given Site Template for a User + + @author Victor Guerra ( guerra@galileo.edu ) + @creation-date 2006-03-11 + + @param community_id The id of the User that will change his Site Template + @param site_template_id The id of the Site Template that will be used by the User + } { set portal_id [dotlrn::get_portal_id -user_id $user_id] set new_theme_id [db_string select_portal_theme {}] @@ -427,7 +434,15 @@ ad_proc -public get_dotlrn_master { {-user_id:required} } { - Returns the master configured for the user_id + Returns the master configured for a given User + + @author Victor Guerra ( guerra@galileo.edu ) + @creation-date 2006-03-11 + + @param community_id The id of the User in order to obtain the master template configured for him + + @returns The path of the master template that will be used. + } { set site_template_id [get_site_template_id -user_id $user_id] return [get_master_from_site_template_id -site_template_id $site_template_id] @@ -436,14 +451,23 @@ ad_proc -public get_site_template_id { {-user_id:required} } { - Get the site_template_id from a particular user + Gets the id of a User's site template + + @author Victor Guerra ( guerra@galileo.edu ) + @creation-date 2006-03-11 + + @param community_id The id of the User of whom we want to abtain the Site Template + + @returns The id of the Site Template assigned to the User + } { return [util_memoize [list dotlrn::get_site_template_id_not_cached -user_id $user_id] ] } ad_proc -private get_site_template_id_not_cached { {-user_id:required} } { + Gets the id of the user's site template - not cached } { set dotlrn_package_id [dotlrn::get_package_id] set user_site_template_id [db_string select_site_template_id {} -default "0"] @@ -462,13 +486,23 @@ ad_proc -public get_master_from_site_template_id { {-site_template_id:required} } { + Returns the master template associated to a given Site Template + + @author Victor Guerra ( guerra@galileo.edu ) + @creation-date 2006-03-11 + + @param site_template_id The id of The Site Template to obtain the master template + + @return The path of the master template associated to the Site Template + } { return [util_memoize [list dotlrn::get_master_from_site_template_id_not_cached -site_template_id $site_template_id]] } ad_proc -private get_master_from_site_template_id_not_cached { {-site_template_id:required} } { + Returns the master template for a given site template } { return [db_string select_site_template_master {} \ -default [parameter::get -package_id [dotlrn::get_package_id] \ @@ -478,6 +512,14 @@ ad_proc -public assign_default_sitetemplate { {-site_template_id:required} } { + Assigns a portal theme associated to a Site Template + to all users + + @author Victor Guerra ( guerra@galileo.edu ) + @creation-date 2006-03-11 + + @param site_template_id The id of The Site Template to obtain the portal theme to be assigned + } { # We need to update the portal theme before the first hit!