Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8f1370c
)
Rearranged code so some output is printed before tackling the big table
author
moodler
<moodler>
Mon, 11 Nov 2002 07:58:11 +0000
(07:58 +0000)
committer
moodler
<moodler>
Mon, 11 Nov 2002 07:58:11 +0000
(07:58 +0000)
admin/user.php
patch
|
blob
|
blame
|
history
diff --git
a/admin/user.php
b/admin/user.php
index
d8c1459
..
9036940
100644
(file)
--- a/
admin/user.php
+++ b/
admin/user.php
@@
-156,21
+156,8
@@
if ($users = get_records_sql("SELECT id, username, email, firstname, lastname, city, country, lastaccess from user WHERE username <> 'guest'
AND deleted <> '1' ORDER BY $sort $dir LIMIT $page,$recordsperpage")) {
if ($users = get_records_sql("SELECT id, username, email, firstname, lastname, city, country, lastaccess from user WHERE username <> 'guest'
AND deleted <> '1' ORDER BY $sort $dir LIMIT $page,$recordsperpage")) {
- foreach ($users as $key => $user) {
- $users[$key]->country = $COUNTRIES[$user->country];
- }
- if ($sort == "country") { // Need to resort by full country name, not code
- foreach ($users as $user) {
- $susers[$user->id] = $user->country;
- }
- asort($susers);
- foreach ($susers as $key => $value) {
- $nusers[] = $users[$key];
- }
- $users = $nusers;
- }
-
print_heading("$usercount ".get_string("users"));
print_heading("$usercount ".get_string("users"));
+
$a->start = $page;
$a->end = $page + $recordsperpage;
if ($a->end > $usercount) {
$a->start = $page;
$a->end = $page + $recordsperpage;
if ($a->end > $usercount) {
@@
-206,6
+193,22
@@
}
echo "</TD></TR></TABLE>";
}
echo "</TD></TR></TABLE>";
+ flush();
+
+ foreach ($users as $key => $user) {
+ $users[$key]->country = $COUNTRIES[$user->country];
+ }
+ if ($sort == "country") { // Need to resort by full country name, not code
+ foreach ($users as $user) {
+ $susers[$user->id] = $user->country;
+ }
+ asort($susers);
+ foreach ($susers as $key => $value) {
+ $nusers[] = $users[$key];
+ }
+ $users = $nusers;
+ }
+
$table->head = array ($name, $email, $city, $country, $lastaccess, "", "");
$table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT", "CENTER", "CENTER");
$table->width = "95%";
$table->head = array ($name, $email, $city, $country, $lastaccess, "", "");
$table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT", "CENTER", "CENTER");
$table->width = "95%";