Skip to content

Commit

Permalink
fixed a bug where group image is not displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
toyomoyo committed Mar 2, 2006
1 parent 1761da1 commit 2df6965
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions course/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 {
Expand Down

0 comments on commit 2df6965

Please sign in to comment.