Index: openacs-4/packages/xotcl-request-monitor/www/active-communities.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/active-communities.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xotcl-request-monitor/www/active-communities.tcl 27 Oct 2014 16:42:02 -0000 1.2 +++ openacs-4/packages/xotcl-request-monitor/www/active-communities.tcl 7 Aug 2017 23:48:30 -0000 1.3 @@ -5,16 +5,16 @@ @cvs-id $id$ } -query { - {orderby:optional "count,desc"} + {orderby:token,optional "count,desc"} } -properties { - title:onevalue - context:onevalue + title:onevalue + context:onevalue } set title "Active Communities" set context [list "Active Communities"] -TableWidget t1 \ +TableWidget create t1 \ -columns { AnchorField community -label Community -orderby community Field count -label Count -orderby count @@ -25,9 +25,24 @@ 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 [::xo::db::sql::apm_package name -package_id $community_id] + } + t1 add \ - -community [dotlrn_community::get_community_name $community_id] \ - -community.href [export_vars -base users-in-community {community_id}] \ + -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] \ No newline at end of file +set t1 [t1 asHTML] +# Local variables: +# mode: tcl +# tcl-indent-level: 2 +# indent-tabs-mode: nil +# End: