mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Complete the removal of Attendance from the main CVS tree (on HEAD)
This commit is contained in:
parent
7d45304236
commit
6283105094
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user