Commit 9db2fa23 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Remove unnecessary precision on stats


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent a958010c
...@@ -155,18 +155,18 @@ $string['diskusage'] = 'Disk Usage'; ...@@ -155,18 +155,18 @@ $string['diskusage'] = 'Disk Usage';
$string['maharaversion'] = 'Mahara version'; $string['maharaversion'] = 'Mahara version';
$string['activeusers'] = 'Active users'; $string['activeusers'] = 'Active users';
$string['loggedinsince'] = '%s today, %s since %s, %s all time'; $string['loggedinsince'] = '%s today, %s since %s, %s all time';
$string['groupmemberaverage'] = 'On average, each user is in %1.1f groups'; $string['groupmemberaverage'] = 'On average, each user is in %s groups';
$string['viewsperuser'] = 'Users who make views have about %1.1f views each'; $string['viewsperuser'] = 'Users who make views have about %s views each';
$string['Cron'] = 'Cron'; $string['Cron'] = 'Cron';
$string['runningnormally'] = 'Running normally'; $string['runningnormally'] = 'Running normally';
$string['cronnotrunning'] = 'Cron is not running.<br>See the <a href="http://wiki.mahara.org/System_Administrator\'s_Guide/Installing_Mahara">installation guide</a> for instructions on how to set it up.'; $string['cronnotrunning'] = 'Cron is not running.<br>See the <a href="http://wiki.mahara.org/System_Administrator\'s_Guide/Installing_Mahara">installation guide</a> for instructions on how to set it up.';
$string['Loggedin'] = 'Logged in'; $string['Loggedin'] = 'Logged in';
$string['youraverageuser'] = 'Your Average User...'; $string['youraverageuser'] = 'Your Average User...';
$string['statsmaxfriends'] = 'Has %1.1f friends (most is <a href="%s">%s</a> with %d)'; $string['statsmaxfriends'] = 'Has %s friends (most is <a href="%s">%s</a> with %d)';
$string['statsnofriends'] = 'Has 0 friends :('; $string['statsnofriends'] = 'Has 0 friends :(';
$string['statsmaxviews'] = 'Has made %1.1f views (most is <a href="%s">%s</a> with %d)'; $string['statsmaxviews'] = 'Has made %s views (most is <a href="%s">%s</a> with %d)';
$string['statsnoviews'] = 'Has made 0 views :('; $string['statsnoviews'] = 'Has made 0 views :(';
$string['statsmaxgroups'] = 'Is in %1.1f groups (most is <a href="%s">%s</a> with %d)'; $string['statsmaxgroups'] = 'Is in %s groups (most is <a href="%s">%s</a> with %d)';
$string['statsnogroups'] = 'Is in 0 groups :('; $string['statsnogroups'] = 'Is in 0 groups :(';
$string['statsmaxquotaused'] = 'Has used about %s of disk quota (most is <a href="%s">%s</a> with %s)'; $string['statsmaxquotaused'] = 'Has used about %s of disk quota (most is <a href="%s">%s</a> with %s)';
$string['groupcountsbytype'] = 'Number of groups by Group Type'; $string['groupcountsbytype'] = 'Number of groups by Group Type';
......
...@@ -223,13 +223,14 @@ function site_statistics($full=false) { ...@@ -223,13 +223,14 @@ function site_statistics($full=false) {
FROM {group_member} m JOIN {group} g ON g.id = m.group FROM {group_member} m JOIN {group} g ON g.id = m.group
WHERE g.deleted = 0 WHERE g.deleted = 0
"); ");
$data['groupmemberaverage'] = $memberships/$data['users']; $data['groupmemberaverage'] = round($memberships/$data['users'], 1);
$data['strgroupmemberaverage'] = get_string('groupmemberaverage', 'admin', $data['groupmemberaverage']); $data['strgroupmemberaverage'] = get_string('groupmemberaverage', 'admin', $data['groupmemberaverage']);
$data['viewsperuser'] = get_field_sql(" $data['viewsperuser'] = get_field_sql("
SELECT (0.0 + COUNT(id)) / NULLIF(COUNT(DISTINCT owner), 0) SELECT (0.0 + COUNT(id)) / NULLIF(COUNT(DISTINCT owner), 0)
FROM {view} FROM {view}
WHERE NOT owner IS NULL AND owner > 0 WHERE NOT owner IS NULL AND owner > 0
"); ");
$data['viewsperuser'] = round($data['viewsperuser'], 1);
$data['strviewsperuser'] = get_string('viewsperuser', 'admin', $data['viewsperuser']); $data['strviewsperuser'] = get_string('viewsperuser', 'admin', $data['viewsperuser']);
} }
...@@ -285,7 +286,7 @@ function user_statistics($limit, $offset, &$sitedata) { ...@@ -285,7 +286,7 @@ function user_statistics($limit, $offset, &$sitedata) {
$data['strmaxfriends'] = get_string( $data['strmaxfriends'] = get_string(
'statsmaxfriends', 'statsmaxfriends',
'admin', 'admin',
$meanfriends, round($meanfriends, 1),
get_config('wwwroot') . 'user/view.php?id=' . $maxfriends->id, get_config('wwwroot') . 'user/view.php?id=' . $maxfriends->id,
display_name($maxfriends, null, true), display_name($maxfriends, null, true),
$maxfriends->friends $maxfriends->friends
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment