diff --git a/admin/blocks.php b/admin/blocks.php
index 2a839526749..0e2a5a94565 100644
--- a/admin/blocks.php
+++ b/admin/blocks.php
@@ -165,11 +165,8 @@
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'multiple', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strmultiple, $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
-
- $table->set_attribute('cellspacing', '0');
$table->set_attribute('id', 'blocks');
- $table->set_attribute('class', 'generaltable generalbox');
-
+ $table->set_attribute('class', 'flexible generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
foreach ($blockbyname as $blockname => $blockid) {
@@ -216,7 +213,7 @@
$table->add_data(array(
''.$blockobject->get_title().'',
$blocklist,
- $blockobject->get_version(),
+ ''.$blockobject->get_version().'',
$visible,
$multiple,
$delete,
@@ -235,9 +232,8 @@
$table->define_headers(array($strname, $strdelete));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
- $table->set_attribute('cellspacing', '0');
$table->set_attribute('id', 'incompatible');
- $table->set_attribute('class', 'generaltable generalbox');
+ $table->set_attribute('class', 'flexible generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
diff --git a/admin/filters.php b/admin/filters.php
index afd1b135e39..4ea03cd7db0 100644
--- a/admin/filters.php
+++ b/admin/filters.php
@@ -182,15 +182,10 @@
// construct the flexible table ready to display
$table = new flexible_table(FILTER_TABLE);
$table->define_columns(array('name', 'hideshow', 'order', 'settings'));
- $table->column_style('hideshow', 'text-align', 'center');
- $table->column_style('order', 'text-align', 'center');
- $table->column_style('settings', 'text-align', 'center');
$table->define_headers(array($txt->name, $txt->hideshow, $txt->updown, $txt->settings));
$table->define_baseurl("$CFG->wwwroot/$CFG->admin/filters.php");
- $table->set_attribute('id', 'blocks');
- $table->set_attribute('class', 'flexible generaltable generalbox');
- $table->set_attribute('style', 'margin:auto;');
- $table->set_attribute('cellpadding', '5');
+ $table->set_attribute('id', 'filters');
+ $table->set_attribute('class', 'flexible generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
// iterate through filters adding to display table
diff --git a/admin/modules.php b/admin/modules.php
index 04097c599f0..3615e30886c 100644
--- a/admin/modules.php
+++ b/admin/modules.php
@@ -2,10 +2,15 @@
// Allows the admin to manage activity modules
require_once('../config.php');
+ require_once('../course/lib.php');
require_once($CFG->libdir.'/adminlib.php');
+ require_once($CFG->libdir.'/tablelib.php');
+
+ // defines
+ define('MODULE_TABLE','module_administration_table');
+
$adminroot = admin_get_root();
admin_externalpage_setup('managemodules', $adminroot);
- require_once('../course/lib.php');
$show = optional_param('show', '', PARAM_SAFEDIR);
$hide = optional_param('hide', '', PARAM_SAFEDIR);
@@ -150,12 +155,14 @@
ksort($modulebyname);
/// Print the table of all modules
-
- $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";
+ // construct the flexible table ready to display
+ $table = new flexible_table(MODULE_TABLE);
+ $table->define_columns(array('name', 'instances', 'version', 'hideshow', 'delete', 'settings'));
+ $table->define_headers(array($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings));
+ $table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/modules.php');
+ $table->set_attribute('id', 'modules');
+ $table->set_attribute('class', 'flexible generaltable generalbox boxaligncenter boxwidthwide');
+ $table->setup();
foreach ($modulebyname as $modulename => $module) {
@@ -186,18 +193,25 @@
} else {
$visible = "name&sesskey=$USER->sesskey\" title=\"$strshow\">".
"pixpath/i/show.gif\" class=\"icon\" alt=\"$strshow\" />";
- $class = "class=\"dimmed_text\"";
+ $class = " class=\"dimmed_text\"";
}
if ($module->name == "forum") {
$delete = "";
$visible = "";
$class = "";
}
- $table->data[] = array ("$icon $modulename", $countlink, $module->version, $visible, $delete, $settings);
- }
- print_table($table);
- echo "
";
+ $table->add_data(array(
+ ''.$icon.' '.$modulename.'',
+ $countlink,
+ ''.$module->version.'',
+ $visible,
+ $delete,
+ $settings
+ ));
+ }
+
+ $table->print_html();
admin_externalpage_print_footer($adminroot);
diff --git a/lib/tablelib.php b/lib/tablelib.php
index 60b46d16fcd..46a3ab36ba1 100644
--- a/lib/tablelib.php
+++ b/lib/tablelib.php
@@ -528,10 +528,12 @@ class flexible_table {
}
else {
// took out nowrap for accessibility, might need replacement
- if (!is_array($this->column_style[$column])) {
- $usestyles = array('white-space:nowrap');
+ if (!is_array($this->column_style[$column])) {
+ // $usestyles = array('white-space:nowrap');
+ $usestyles = '';
} else {
- $usestyles = $this->column_style[$column]+array('white-space'=>'nowrap');
+ // $usestyles = $this->column_style[$column]+array('white-space'=>'nowrap');
+ $usestyles = $this->column_style[$column];
}
echo '