]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes to table widths
authormartin <martin>
Sun, 22 Sep 2002 14:11:45 +0000 (14:11 +0000)
committermartin <martin>
Sun, 22 Sep 2002 14:11:45 +0000 (14:11 +0000)
admin/user.php
lib/moodlelib.php
user/index.php

index 73b61f59d1197e43e08e4c01e002033591b0f0b4..3e999ebb1c72c0eaed486e93992c147a28948dab 100644 (file)
 
             $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 = "";
index 98bcd45352669c7846c439b073010a254a6a83bc..10658146dbbf7fc4b305901c3abb8bddb0188937 100644 (file)
@@ -181,7 +181,7 @@ 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.
@@ -189,6 +189,8 @@ function print_table($table, $cellpadding=10, $cellspacing=1) {
 //     $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) {
index 7a6aa7d4bac10ad4fffe3b79aee8e1e6e0e1eef1..3a4a1d8adf773f4d9b6ea83f3082acdf8c21bd93 100644 (file)
@@ -81,6 +81,9 @@
             $table->head = array ("&nbsp;", $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) {
                     "<FONT SIZE=2>".$COUNTRIES["$student->country"]."</FONT>",
                     "<FONT SIZE=2>$lastaccess</FONT>");
             }
-            print_table($table, 2, 0);
+            print_table($table);
         }
     }