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.57 -r1.58 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 14 Feb 2002 19:43:11 -0000 1.57 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 20 Feb 2002 20:22:47 -0000 1.58 @@ -867,6 +867,16 @@ } } + ad_proc -public applet_active_p { + {-community_id:required} + {-applet_key:required} + } { + Is this applet active in this community? Does it do voulunteer work? + Helps its neighbors? returns 1 or 0 + } { + return [db_0or1row select_active_applet_p {}] + } + ad_proc -public applets_dispatch { {-community_id ""} {-op:required} @@ -896,5 +906,6 @@ } { acs_sc_call dotlrn_applet $op $list_args $applet_key } + } 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 -r1.27 -r1.28 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 14 Feb 2002 19:43:11 -0000 1.27 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 20 Feb 2002 20:22:47 -0000 1.28 @@ -323,8 +323,19 @@ + + + select 1 + from dotlrn_community_applets dca, + dotlrn_applets da + where community_id = :community_id + and da.applet_key = :applet_key + and active_p = 't' + and dca.applet_id = da.applet_id + and status = 'active' + + - select count(*)