Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More admin cleanups - improved user listing

  • Loading branch information...
commit 3f63fdfbfb3bfa01e7b45d576c21dd2d7a170e11 1 parent a152785
martin authored
Showing with 10 additions and 4 deletions.
  1. +1 −1  admin/index.php
  2. +9 −3 admin/user.php
View
2  admin/index.php
@@ -167,7 +167,7 @@
$table->head = array ("Site Management", "Course Setup", "Other");
$table->align = array ("CENTER", "CENTER", "CENTER");
$table->data[0][0] = "<P><A HREF=\"site.php\">Site settings</A></P>".
- "<P><A HREF=\"../course/log.php?id=$site->id\">Site Logs</A></P>";
+ "<P><A HREF=\"../course/log.php?id=$site->id\">Site logs</A></P>";
$table->data[0][1] = "<P><A HREF=\"../course/edit.php\">Create a new course</A></P>".
"<P><A HREF=\"../course/teacher.php\">Assign teachers to a course</A></P>".
"<P><A HREF=\"../course/delete.php\">Delete a course</A></P>";
View
12 admin/user.php
@@ -2,6 +2,7 @@
require("../config.php");
require("../user/lib.php");
+ require("../lib/countries.php");
optional_variable($id); // user id
@@ -56,11 +57,16 @@
$users = get_records_sql("SELECT * from user ORDER BY firstname");
print_header("Edit users", "Edit users", "<A HREF=\"$CFG->wwwroot/admin\">Admin</A> -> Edit users", "");
- echo "<CENTER>";
+ print_heading("Choose a user to edit");
+ $table->head = array ("Name", "Email", "City/Town", "Country");
+ $table->align = array ("LEFT", "LEFT", "CENTER", "CENTER");
foreach ($users as $user) {
- echo "<A HREF=\"user.php?id=$user->id\">$user->firstname $user->lastname</A><BR>";
+ $table->data[] = array ("<A HREF=\"user.php?id=$user->id\">$user->firstname $user->lastname</A>",
+ "$user->email",
+ "$user->city",
+ $COUNTRIES[$user->country]);
}
- echo "</CENTER>";
+ print_table($table);
print_footer();
exit;
}
Please sign in to comment.
Something went wrong with that request. Please try again.