Permalink
Browse files

fixed a bug where group image is not displayed

  • Loading branch information...
1 parent 1761da1 commit 2df6965c30e738a6d0660013a7dd50811beb1bc5 toyomoyo committed Mar 2, 2006
Showing with 3 additions and 2 deletions.
  1. +3 −2 course/group.php
View
@@ -47,9 +47,10 @@
$um = new upload_manager('imagefile',false,false,null,false,0,true,true);
if ($um->preprocess_files()) {
require_once("$CFG->libdir/gdlib.php");
+
if (save_profile_image($group->id, $um, 'groups')) {
$group->picture = 1;
- }
+ }
}
// Setting a new object in order to avoid updating other columns for the record,
@@ -63,7 +64,7 @@
$dataobj->description = clean_text($form->description);
$dataobj->hidepicture = empty($form->hidepicture) ? 0 : 1;
$dataobj->password = required_param('password', PARAM_ALPHANUM);
-
+ $dataobj->picture = $group->picture;
if (!update_record('groups', $dataobj)) {
notify("A strange error occurred while trying to save");
} else {

0 comments on commit 2df6965

Please sign in to comment.