DB upgrade script to clean up enrol field for user_students and user_teachers (Merged from MOODLE_15_STABLE)

This commit is contained in:
patrickslee
2005-10-30 21:36:44 +00:00
parent 78c7303cb4
commit 739f3e5067
3 changed files with 11 additions and 1 deletions
+5
View File
@@ -1395,6 +1395,11 @@ function main_upgrade($oldversion=0) {
table_column('course_request','','password','text');
}
if ($oldversion < 2005103100) { // Repair enrol field in user_students/user_teacher table
execute_sql("UPDATE {$CFG->prefix}user_students SET enrol='manual' WHERE enrol='' OR enrol='internal'");
execute_sql("UPDATE {$CFG->prefix}user_teachers SET enrol='manual' WHERE enrol=''");
}
return $result;
}