Skip to content
Browse files

Fixes to table widths

  • Loading branch information...
1 parent b4ead71 commit 274f62e6d5bcbfc66175457b765144bc2224d064 martin committed Sep 22, 2002
Showing with 8 additions and 2 deletions.
  1. +1 −0 admin/user.php
  2. +3 −1 lib/moodlelib.php
  3. +4 −1 user/index.php
View
1 admin/user.php
@@ -149,6 +149,7 @@
$table->head = array ($name, $email, $city, $country, $lastaccess, "", "");
$table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT", "CENTER", "CENTER");
+ $table->width = "95%";
foreach ($users as $user) {
if ($user->id == $USER->id or $user->username == "changeme") {
$deletebutton = "";
View
4 lib/moodlelib.php
@@ -181,14 +181,16 @@ function print_user_picture($userid, $courseid, $picture, $large=false, $returns
}
}
-function print_table($table, $cellpadding=10, $cellspacing=1) {
+function print_table($table) {
// Prints a nicely formatted table.
// $table is an object with several properties.
// $table->head is an array of heading names.
// $table->align is an array of column alignments
// $table->size is an array of column sizes
// $table->data[] is an array of arrays containing the data.
// $table->width is an percentage of the page
+// $table->cellpadding padding on each cell
+// $table->cellspacing spacing between cells
if (isset($table->align)) {
foreach ($table->align as $key => $aa) {
View
5 user/index.php
@@ -81,6 +81,9 @@
$table->head = array (" ", $name, $city, $country, $lastaccess);
$table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT");
$table->size = array ("10", "*", "*", "*", "*");
+ $table->size = array ("10", "*", "*", "*", "*");
+ $table->cellpadding = 2;
+ $table->cellspacing = 0;
foreach ($students as $student) {
if ($student->lastaccess) {
@@ -101,7 +104,7 @@
"<FONT SIZE=2>".$COUNTRIES["$student->country"]."</FONT>",
"<FONT SIZE=2>$lastaccess</FONT>");
}
- print_table($table, 2, 0);
+ print_table($table);
}
}

0 comments on commit 274f62e

Please sign in to comment.
Something went wrong with that request. Please try again.