Removed the setting of default values. The default is now just zero.

This commit is contained in:
moodler
2006-09-17 09:08:47 +00:00
parent 86e2c51da8
commit b29ab53d31
3 changed files with 3 additions and 15 deletions
+1 -5
View File
@@ -1813,11 +1813,7 @@ function main_upgrade($oldversion=0) {
}
if ($oldversion < 2006091700) {
table_column('course','','defaultrole','int','10');
if ($studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) {
$studentrole = array_shift($studentroles); /// Take the first one
execute_sql('UPDATE '.$CFG->prefix.'course SET defaultrole = '.$studentrole->id);
}
table_column('course','','defaultrole','integer','10', 'unsigned', '0', 'not null');
}
return $result;