Added a hidden $CFG->disablestatsprocessing variable to disable stats completely

This commit is contained in:
moodler 2006-09-03 15:42:05 +00:00
parent eb9b7f1a3e
commit f598a45f2e
2 changed files with 7 additions and 1 deletions

View file

@ -591,6 +591,7 @@ class configvarrss extends configvar {
} }
/// enable stats /// enable stats
if (empty($CFG->disablestatsprocessing)) {
$stats['enablestats'] = new configvar (get_string('configenablestats','admin'), $stats['enablestats'] = new configvar (get_string('configenablestats','admin'),
choose_from_menu($noyesoptions, 'enablestats', $config->enablestats, '', '', '', true) ); choose_from_menu($noyesoptions, 'enablestats', $config->enablestats, '', '', '', true) );
@ -636,7 +637,7 @@ class configvarrss extends configvar {
$stats['statsuserthreshold'] = new configvar (get_string('configstatsuserthreshold','admin'), $stats['statsuserthreshold'] = new configvar (get_string('configstatsuserthreshold','admin'),
'<input type="text" name="statsuserthreshold" size="4" value="'.$config->statsuserthreshold.'" />'); '<input type="text" name="statsuserthreshold" size="4" value="'.$config->statsuserthreshold.'" />');
}
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -649,6 +650,8 @@ class configvarrss extends configvar {
$configvars['permissions'] = $permissions; $configvars['permissions'] = $permissions;
$configvars['requestedcourse'] = $reqcourse; $configvars['requestedcourse'] = $reqcourse;
$configvars['misc'] = $misc; $configvars['misc'] = $misc;
if (empty($CFG->disablestatsprocessing)) {
$configvars['stats'] = $stats; $configvars['stats'] = $stats;
}
?> ?>

View file

@ -139,6 +139,9 @@ $CFG->admin = 'admin';
// Useful for webhost operators who have alternate methods of backups // Useful for webhost operators who have alternate methods of backups
// $CFG->disablescheduledbackups = true; // $CFG->disablescheduledbackups = true;
// //
// Prevent stats processing and hide the GUI
// $CFG->disablestatsprocessing = true;
//
// Restrict certain usernames from doing things that may mess up a site // Restrict certain usernames from doing things that may mess up a site
// This is especially useful for demonstration teacher accounts // This is especially useful for demonstration teacher accounts
// $CFG->restrictusers = 'teacher,fred,jim'; // $CFG->restrictusers = 'teacher,fred,jim';