active-communities.tcl
Displays active communities
- Location:
- /packages/xotcl-request-monitor/www/active-communities.tcl
- Author:
- Gustaf Neumann
- CVS ID:
$Id: active-communities.tcl,v 1.4.2.6 2022/11/27 17:21:26 gustafn Exp $
Related Files
- packages/xotcl-request-monitor/www/active-communities.tcl
- packages/xotcl-request-monitor/www/active-communities.adp
[ hide source ] | [ make this the default ]
File Contents
ad_page_contract { Displays active communities @author Gustaf Neumann @cvs-id $Id: active-communities.tcl,v 1.4.2.6 2022/11/27 17:21:26 gustafn Exp $ } -query { {orderby:token,optional "count,desc"} } -properties { title:onevalue context:onevalue } set title "Active Communities" set context [list "Active Communities"] TableWidget create t1 \ -columns { AnchorField community -label Community -orderby community Field count -label Count -orderby count } lassign [split $orderby ,] att order t1 orderby \ -order [ad_decode $order desc decreasing asc increasing increasing] \ -type [ad_decode $att count integer dictionary] \ $att foreach {community_id users} [throttle users active_communities] { if {$community_id eq ""} continue if {[info commands ::dotlrn_community::get_community_name] ne ""} { set community_name [::dotlrn_community::get_community_name $community_id] } else { set community_name "" } if {$community_name eq ""} { set community_name [::acs::dc call apm_package name -package_id $community_id] } t1 add \ -community $community_name \ -community.href [export_vars -base users-in-community {community_id community_name}] \ -count [llength [lsort -unique [eval concat $users]]] } set t1 [t1 asHTML] # Local variables: # mode: tcl # tcl-indent-level: 2 # indent-tabs-mode: nil # End: