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
+2 -2
View File
@@ -135,7 +135,7 @@ profile_load_data($user);
// Prepare the editor and create form
$editoroptions = array('maxfiles'=>EDITOR_UNLIMITED_FILES, 'maxbytes'=>$CFG->maxbytes, 'trusttext'=>false, 'forcehttps'=>false);
$user = file_prepare_standard_editor($user, 'description', $editoroptions, $personalcontext, 'user_profile', $user->id);
$user = file_prepare_standard_editor($user, 'description', $editoroptions, $personalcontext, 'user', 'profile', 0);
$userform = new user_edit_form(null, array('editoroptions'=>$editoroptions));
if (empty($user->country)) {
// MDL-16308 - we must unset the value here so $CFG->country can be used as default one
@@ -172,7 +172,7 @@ if ($usernew = $userform->get_data()) {
// description editor element may not exist!
if (isset($usernew->description_editor)) {
$usernew = file_postupdate_standard_editor($usernew, 'description', $editoroptions, $personalcontext, 'user_profile', $usernew->id);
$usernew = file_postupdate_standard_editor($usernew, 'description', $editoroptions, $personalcontext, 'user', 'profile', 0);
}
$DB->update_record('user', $usernew);