dataroot"); while ($dir = readdir($basedir)) { if ($dir == "." || $dir == ".." || $dir == "users") { continue; } if (filetype("$CFG->dataroot/$dir") != "dir") { continue; } $coursedir = "$CFG->dataroot/$dir"; if (! $coursemoddata = make_mod_upload_directory($dir)) { echo "Error: could not create mod upload directory: $coursemoddata"; continue; } if (file_exists("$coursedir/assignment")) { if (! rename("$coursedir/assignment", "$coursemoddata/assignment")) { echo "Error: could not move $coursedir/assignment to $coursemoddata/assignment\n"; } } } } if ($oldversion < 2002101600) { execute_sql(" ALTER TABLE `assignment` ADD `format` INTEGER DEFAULT '0' NOT NULL AFTER `description` "); } if ($oldversion < 2002110302) { execute_sql(" UPDATE `assignment` SET `type` = '1'"); } if ($oldversion < 2003091000) { # Old field that was never added! table_column("assignment", "", "resubmit", "integer", "2", "unsigned", "0", "", "format"); } if ($oldversion < 2004021700) { set_field("log_display", "action", "view submission", "module", "assignment", "action", "view submissions"); } return true; } ?>