Commit 28b3bca3 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Display cron status


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 241af784
...@@ -155,6 +155,9 @@ $string['activeusers'] = 'Active users'; ...@@ -155,6 +155,9 @@ $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 %1.1f groups';
$string['viewsperuser'] = 'Users who make views have about %1.1f views each'; $string['viewsperuser'] = 'Users who make views have about %1.1f views each';
$string['Cron'] = 'Cron';
$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.';
// Site options // Site options
$string['adminsonly'] = 'Administrators only'; $string['adminsonly'] = 'Administrators only';
......
...@@ -240,6 +240,8 @@ function site_statistics() { ...@@ -240,6 +240,8 @@ function site_statistics() {
WHERE NOT owner IS NULL AND owner > 0 WHERE NOT owner IS NULL AND owner > 0
")); "));
$data['cronrunning'] = !record_exists_select('cron', 'nextrun < CURRENT_DATE');
return($data); return($data);
} }
......
...@@ -19,6 +19,7 @@ addLoadEvent(function () {literal}{{/literal} ...@@ -19,6 +19,7 @@ addLoadEvent(function () {literal}{{/literal}
<p><strong>{str tag=databasesize section=admin}:</strong> {$sitedata.dbsize|display_size}</p> <p><strong>{str tag=databasesize section=admin}:</strong> {$sitedata.dbsize|display_size}</p>
<p><strong>{str tag=diskusage section=admin}:</strong> {$sitedata.diskusage|display_size}</p> <p><strong>{str tag=diskusage section=admin}:</strong> {$sitedata.diskusage|display_size}</p>
<p><strong>{str tag=maharaversion section=admin}:</strong> {$sitedata.release}</p> <p><strong>{str tag=maharaversion section=admin}:</strong> {$sitedata.release}</p>
<p><strong>{str tag=Cron section=admin}:</strong> {if $sitedata.cronrunning}{str tag=runningnormally section=admin}{else}{str tag=cronnotrunning section=admin}{/if}</p>
</div> </div>
<div class="cb"></div> <div class="cb"></div>
</div> </div>
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