MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment

This commit is contained in:
Petr Skoda
2010-07-03 13:37:13 +00:00
parent ffc3f866d5
commit 64f93798d4
220 changed files with 4713 additions and 4375 deletions
+3 -3
View File
@@ -110,7 +110,7 @@ if (!empty($CFG->usetags)) {
if ($user->id !== -1) {
$usercontext = get_context_instance(CONTEXT_USER, $user->id);
$editoroptions = array('maxfiles'=>EDITOR_UNLIMITED_FILES, 'maxbytes'=>$CFG->maxbytes, 'trusttext'=>false, 'forcehttps'=>false);
$user = file_prepare_standard_editor($user, 'description', $editoroptions, $usercontext, 'user_profile', $user->id);
$user = file_prepare_standard_editor($user, 'description', $editoroptions, $usercontext, 'user', 'profile', 0);
} else {
$usercontext = null;
// This is a new user, we don't want to add files here
@@ -137,7 +137,7 @@ if ($usernew = $userform->get_data()) {
if ($usernew->id == -1) {
//TODO check out if it makes sense to create account with this auth plugin and what to do with the password
unset($usernew->id);
$usernew = file_postupdate_standard_editor($usernew, 'description', $editoroptions, null, 'user_profile', null);
$usernew = file_postupdate_standard_editor($usernew, 'description', $editoroptions, null, 'user', 'profile', null);
$usernew->mnethostid = $CFG->mnet_localhost_id; // always local user
$usernew->confirmed = 1;
$usernew->timecreated = time();
@@ -146,7 +146,7 @@ if ($usernew = $userform->get_data()) {
$usercreated = true;
} else {
$usernew = file_postupdate_standard_editor($usernew, 'description', $editoroptions, $usercontext, 'user_profile', $usernew->id);
$usernew = file_postupdate_standard_editor($usernew, 'description', $editoroptions, $usercontext, 'user', 'profile', 0);
$DB->update_record('user', $usernew);
// pass a true $userold here
if (! $authplugin->user_update($user, $userform->get_data())) {