echo "Course ".$item['code'].'('.$item['id'].') created on '.$item['creation_date'].' and last used on '.$item['last_visit'].' uses '.substr($size, 0, 8).PHP_EOL;
// Check if it's 160K or 9.1M in size, which is the case for 'empty'
// courses (created without or with example content)
if (substr($size, 0, 4) == '160K' or substr($size, 0, 4) == '9,1M') {
CourseManager::delete_course($item['code']);
// The normal procedure moves the course directory to archive, so
@ -51,9 +60,11 @@ if (!empty($items)) {
}
$count ++;
if ($count%100 == 0) {
// Print progressive information about the freed space
echo '### Until now: '.$total.'K in '.$count.' courses'.PHP_EOL;