module = "user"; $new->action = "view"; $new->mtable = "user"; $new->field = "CONCAT(firstname,\" \",lastname)"; insert_record("log_display", $new); delete_records("log_display", "module", "course"); $new->module = "course"; $new->action = "view"; $new->mtable = "course"; $new->field = "fullname"; insert_record("log_display", $new); $new->action = "update"; insert_record("log_display", $new); $new->action = "enrol"; insert_record("log_display", $new); } //support user based course creating if ($oldversion < 2003032400) { execute_sql("CREATE TABLE $CFG->prefix_user_coursecreators ( id int8 SERIAL PRIMARY KEY, userid int8 NOT NULL default '0' )"); } if ($oldversion < 2003041400) { table_column("course_modules", "", "visible", "integer", "1", "unsigned", "1", "not null", "score"); } if ($oldversion < 2003042104) { // Try to update permissions of all files if ($files = get_directory_list($CFG->dataroot)) { echo "Attempting to update permissions for all files... ignore any errors."; foreach ($files as $file) { echo "$CFG->dataroot/$file
"; @chmod("$CFG->dataroot/$file", $CFG->directorypermissions); } } } if ($oldversion < 2003042400) { // Rebuild all course caches, because of changes to do with visible variable if ($courses = get_records_sql("SELECT * FROM {$CFG->prefix}course")) { require_once("$CFG->dirroot/course/lib.php"); foreach ($courses as $course) { $modinfo = serialize(get_array_of_activities($course->id)); if (!set_field("course", "modinfo", $modinfo, "id", $course->id)) { notify("Could not cache module information for course '$course->fullname'!"); } } } } return true; } ?>