Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

… completely
  • Loading branch information...
commit f598a45f2e68f5ce955e94aa675826d12771e948 1 parent eb9b7f1
moodler authored
Showing with 7 additions and 1 deletion.
  1. +4 −1 admin/configvars.php
  2. +3 −0  config-dist.php
View
5 admin/configvars.php
@@ -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
3  config-dist.php
@@ -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';
Please sign in to comment.
Something went wrong with that request. Please try again.