MDL-17787 removed unused health test and cleanup up config table - MoodleTest cookie not used anymore

This commit is contained in:
skodak 2009-01-05 22:45:06 +00:00
parent 1870f24166
commit 6d04a2fd0c
3 changed files with 4 additions and 37 deletions

View File

@ -498,42 +498,6 @@ class problem_000010 extends problem_base {
}
}
class problem_000011 extends problem_base {
function title() {
return 'Session errors detected';
}
function exists() {
global $CFG;
return isset($CFG->session_error_counter);
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
global $CFG;
if (isset($CFG->session_error_counter)) {
return 'Session problems were detected. Total count: '.$CFG->session_error_counter;
} else {
return 'No session errors detected.';
}
}
function solution() {
global $CFG, $DB;
if (optional_param('resetsesserrorcounter', 0, PARAM_BOOL)) {
if ($DB->get_field('config', 'name', array('name'=>'session_error_counter'))) {
$DB->delete_records('config', array('name'=>'session_error_counter'));
}
return 'Error counter was cleared.';
} else {
return '<p>Session errors can be caused by:</p><ul>' .
'<li>unresolved problem in server software (aka random switching of users),</li>' .
'<li>blocked or modified cookies,</li>' .
'<li>deleting of active session files.</li>' .
'</ul><p><a href="'.me().'&amp;resetsesserrorcounter=1">Reset counter</a></p>';
}
}
}
class problem_000012 extends problem_base {
function title() {
return 'Random questions data consistency';

View File

@ -1213,6 +1213,9 @@ function xmldb_main_upgrade($oldversion) {
if ($result && $oldversion < 2009010500) {
/// clean up config table a bit
unset_config('session_error_counter');
/// Main savepoint reached
upgrade_main_savepoint($result, 2009010500);
}
return $result;

View File

@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
$version = 2008123102; // YYYYMMDD = date of the last version bump
$version = 2009010500; // YYYYMMDD = date of the last version bump
// XX = daily increments
$release = '2.0 dev (Build: 20090105)'; // Human-friendly version name