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` TINYINT(2) UNSIGNED DEFAULT '0' NOT NULL AFTER `description` "); } if ($oldversion < 2002110302) { execute_sql(" UPDATE `assignment` SET `type` = '1'"); } if ($oldversion < 2002111500) { execute_sql(" ALTER TABLE `assignment` ADD `resubmit` TINYINT(2) UNSIGNED DEFAULT '0' NOT NULL AFTER `format` "); } if ($oldversion < 2002122300) { execute_sql("ALTER TABLE `assignment_submissions` CHANGE `user` `userid` INT(10) UNSIGNED DEFAULT '0' NOT NULL "); } if ($oldversion < 2004021700) { set_field("log_display", "action", "view submission", "module", "assignment", "action", "view submissions"); } return true; } ?>