WHERE creation_date < '$creation' AND (last_visit < '$access' OR last_visit IS NULL) ".
// Set course codes and uncomment the next line to exclude these from deletion
// " AND c.code NOT IN ('CHAMILOSESSIONS1ES','CHACOBU1ESPRE','CHAPA1ESPRE','CHAPA1FRX','CHACOBU1FRX','CHAPA1ESX','CHACOBU1ESX','DESIGNCHAMILO','EXELEARNING','CHAPA1ENX','CHACOBU1ENX') ".
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