mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 11:26:41 +02:00
Merge branch 'MDL-35637_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE
This commit is contained in:
commit
aa63be7f5f
1 changed files with 11 additions and 10 deletions
|
@ -239,7 +239,7 @@ function groups_update_group_icon($group, $data, $editform) {
|
||||||
$context = get_context_instance(CONTEXT_COURSE, $group->courseid, MUST_EXIST);
|
$context = get_context_instance(CONTEXT_COURSE, $group->courseid, MUST_EXIST);
|
||||||
|
|
||||||
//TODO: it would make sense to allow picture deleting too (skodak)
|
//TODO: it would make sense to allow picture deleting too (skodak)
|
||||||
|
if (!empty($CFG->gdversion)) {
|
||||||
if ($iconfile = $editform->save_temp_file('imagefile')) {
|
if ($iconfile = $editform->save_temp_file('imagefile')) {
|
||||||
if (process_new_icon($context, 'group', 'icon', $group->id, $iconfile)) {
|
if (process_new_icon($context, 'group', 'icon', $group->id, $iconfile)) {
|
||||||
$DB->set_field('groups', 'picture', 1, array('id'=>$group->id));
|
$DB->set_field('groups', 'picture', 1, array('id'=>$group->id));
|
||||||
|
@ -252,6 +252,7 @@ function groups_update_group_icon($group, $data, $editform) {
|
||||||
@unlink($iconfile);
|
@unlink($iconfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update group
|
* Update group
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue