From 9bf45e0036e6c1a0f7ecc5ba268cdcb13e0d44e5 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 13 Mar 2004 10:40:01 +0000 Subject: [PATCH] Add a count of the number of activites using a particular module --- admin/modules.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/admin/modules.php b/admin/modules.php index 9c5421e3749..bbe23112fd4 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -28,6 +28,7 @@ $strhide = get_string("hide"); $strshow = get_string("show"); $strsettings = get_string("settings"); + $stractivities = get_string("activities"); $stractivitymodule = get_string("activitymodule"); print_header("$site->shortname: $strmanagemodules", "$site->fullname", @@ -149,10 +150,10 @@ $modpixpath = "../theme/$CFG->theme/pix/mod"; } - $table->head = array ($stractivitymodule, $strversion, "$strhide/$strshow", $strdelete, $strsettings); - $table->align = array ("LEFT", "LEFT", "CENTER", "CENTER", "CENTER"); - $table->wrap = array ("NOWRAP", "", "", "",""); - $table->size = array ("100%", "10", "10", "10","12"); + $table->head = array ($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings); + $table->align = array ("LEFT", "RIGHT", "LEFT", "CENTER", "CENTER", "CENTER"); + $table->wrap = array ("NOWRAP", "", "", "", "",""); + $table->size = array ("100%", "10", "10", "10", "10","12"); $table->width = "100"; foreach ($modulebyname as $modulename => $module) { @@ -167,6 +168,8 @@ $settings = ""; } + $count = count_records("$module->name"); + if ($module->visible) { $visible = "name\" title=\"$strhide\">". ""; @@ -181,7 +184,7 @@ $visible = ""; $class = ""; } - $table->data[] = array ("

$icon $modulename

", $module->version, $visible, $delete, $settings); + $table->data[] = array ("

$icon $modulename

", $count, $module->version, $visible, $delete, $settings); } print_table($table);