Permalink
Browse files

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

… completely
  • Loading branch information...
1 parent eb9b7f1 commit f598a45f2e68f5ce955e94aa675826d12771e948 moodler committed Sep 3, 2006
Showing with 7 additions and 1 deletion.
  1. +4 −1 admin/configvars.php
  2. +3 −0 config-dist.php
View
@@ -591,6 +591,7 @@ function togglemodules(index) {
}
/// enable stats
+if (empty($CFG->disablestatsprocessing)) {
$stats['enablestats'] = new configvar (get_string('configenablestats','admin'),
choose_from_menu($noyesoptions, 'enablestats', $config->enablestats, '', '', '', true) );
@@ -636,7 +637,7 @@ function togglemodules(index) {
$stats['statsuserthreshold'] = new configvar (get_string('configstatsuserthreshold','admin'),
'<input type="text" name="statsuserthreshold" size="4" value="'.$config->statsuserthreshold.'" />');
-
+}
////////////////////////////////////////////////////////////////////
@@ -649,6 +650,8 @@ function togglemodules(index) {
$configvars['permissions'] = $permissions;
$configvars['requestedcourse'] = $reqcourse;
$configvars['misc'] = $misc;
+if (empty($CFG->disablestatsprocessing)) {
$configvars['stats'] = $stats;
+}
?>
View
@@ -139,6 +139,9 @@
// Useful for webhost operators who have alternate methods of backups
// $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
// This is especially useful for demonstration teacher accounts
// $CFG->restrictusers = 'teacher,fred,jim';

0 comments on commit f598a45

Please sign in to comment.