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:
@@ -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())) {
|
||||
|
||||
Reference in New Issue
Block a user