Index: openacs-4/packages/dotlrn/dotlrn.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v diff -u -r1.42 -r1.43 --- openacs-4/packages/dotlrn/dotlrn.info 23 Jan 2002 04:58:08 -0000 1.42 +++ openacs-4/packages/dotlrn/dotlrn.info 24 Jan 2002 22:32:30 -0000 1.43 @@ -44,6 +44,7 @@ + @@ -261,6 +262,7 @@ + Index: openacs-4/packages/dotlrn/tcl/applets-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/applets-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/tcl/applets-procs.tcl 23 Jan 2002 00:15:43 -0000 1.2 +++ openacs-4/packages/dotlrn/tcl/applets-procs.tcl 24 Jan 2002 22:32:30 -0000 1.3 @@ -52,4 +52,11 @@ return [nsv_get dotlrn applets] } + ad_proc -public applet_exists_p { + {-applet_key:required} + } { + check whether "applet_key" is a real dotLRN applet + } { + return [db_string select_applet_exists_p {}] + } } Index: openacs-4/packages/dotlrn/tcl/applets-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/applets-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/tcl/applets-procs.xql 24 Jan 2002 22:32:30 -0000 1.1 @@ -0,0 +1,13 @@ + + + + + + select count(*) + from dual + where exists (select 1 + from dotlrn_applets + where dotlrn_applets.applet_key = :applet_key) + + + 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.52 -r1.53 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 23 Jan 2002 06:45:57 -0000 1.52 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 24 Jan 2002 22:32:30 -0000 1.53 @@ -198,8 +198,13 @@ # Set up the node dotlrn_community::set_package_id $community_id $package_id - # Add the basic dotlrn applet (we can't do without) - dotlrn_community::add_applet_to_community $community_id dotlrn_dotlrn + # Add the applets specified as default applets for a community as + # specified by the DefaultCommunityApplets ad_parameter + foreach applet_key [string trim [split [ad_parameter DefaultCommunityApplets] {,}]] { + if {[dotlrn_applet::applet_exists_p -applet_key $applet_key]} { + dotlrn_community::add_applet_to_community $community_id $applet_key + } + } } return $community_id @@ -685,7 +690,6 @@ return [db_string select {} -default ""] } - ad_proc -public add_applet_to_community { community_id applet_key