From 30c9a78063ed02e7d8d771868b6db1a13fd9021b Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 10 Feb 2004 14:25:20 +0000 Subject: [PATCH] Interface for editing groups --- course/group-edit.html | 42 ++++++++++++++++++++++++++++++++++++++++++ course/group.php | 6 ++++++ 2 files changed, 48 insertions(+) create mode 100644 course/group-edit.html diff --git a/course/group-edit.html b/course/group-edit.html new file mode 100644 index 0000000000..137f1b3275 --- /dev/null +++ b/course/group-edit.html @@ -0,0 +1,42 @@ +
+ + + + + + + + + + +maxbytes, $course->maxbytes); + if (!empty($CFG->gdversion) and $maxbytes) { +?> + + + + + + + + +

:

+ +

:

description); + helpbutton("text", get_string("helptext")); + if (isset($err["description"])) formerr($err["description"]); + ?> +

:

+ + + +
">
+ + + +
diff --git a/course/group.php b/course/group.php index d68412fcdf..912a9a00fe 100644 --- a/course/group.php +++ b/course/group.php @@ -65,6 +65,12 @@ $err['name'] = get_string("missingname"); } else { + if (!empty($_FILES['imagefile'])) { + require_once("$CFG->libdir/gdlib.php"); + if ($filename = valid_uploaded_file($_FILES['imagefile'])) { + $group->picture = save_profile_image($group->id, $filename, 'groups'); + } + } $group->name = $form->name; $group->description = $form->description; if (!update_record("groups", $group)) { -- 2.39.5