Complete the removal of Attendance from the main CVS tree (on HEAD)

This commit is contained in:
moodler 2005-06-02 14:51:50 +00:00
parent 7d45304236
commit 6283105094
3 changed files with 44 additions and 2 deletions

View File

@ -1428,8 +1428,28 @@ function main_upgrade($oldversion=0) {
} // end foreach field
}
}
if ($oldversion < 2005060201) { // Close down the Attendance module, we are removing it from CVS.
if (!file_exists($CFG->dirroot.'/mod/attendance/lib.php')) {
if (count_records('attendance')) { // We have some data, so should keep it
set_field('modules', 'visible', 0, 'name', 'attendance');
notify('The Attendance module has been discontinued. If you really want to
continue using it, you should download it individually from
http://download.moodle.org/modules and install it, then
reactivate it from Admin >> Configuration >> Modules.
None of your existing data has been deleted, so all existing
Attendance activities should re-appear.');
} else { // No data, so do a complete delete
execute_sql('DROP TABLE '.$CFG->prefix.'attendance', false);
delete_records('modules', 'name', 'attendance');
notify("The Attendance module has been discontinued and removed from your site.
You weren't using it anyway. ;-)");
}
}
}
return $result;
}

View File

@ -1149,6 +1149,28 @@ function main_upgrade($oldversion=0) {
}
}
if ($oldversion < 2005060201) { // Close down the Attendance module, we are removing it from CVS.
if (!file_exists($CFG->dirroot.'/mod/attendance/lib.php')) {
if (count_records('attendance')) { // We have some data, so should keep it
set_field('modules', 'visible', 0, 'name', 'attendance');
notify('The Attendance module has been discontinued. If you really want to
continue using it, you should download it individually from
http://download.moodle.org/modules and install it, then
reactivate it from Admin >> Configuration >> Modules.
None of your existing data has been deleted, so all existing
Attendance activities should re-appear.');
} else { // No data, so do a complete delete
execute_sql('DROP TABLE '.$CFG->prefix.'attendance', false);
delete_records('modules', 'name', 'attendance');
notify("The Attendance module has been discontinued and removed from your site.
You weren't using it anyway. ;-)");
}
}
}
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 = 2005060200; // YYYYMMDD = date
$version = 2005060201; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.6 development'; // Human-friendly version name