diff --git a/course/group-edit.html b/course/group-edit.html
index 3fcac9fafb6..2e4357f0e42 100644
--- a/course/group-edit.html
+++ b/course/group-edit.html
@@ -50,4 +50,5 @@
+
diff --git a/course/group.php b/course/group.php
index 65c9141c708..d847f8c2c2d 100644
--- a/course/group.php
+++ b/course/group.php
@@ -58,7 +58,7 @@
/// If data submitted, then process and store.
- if ($form = data_submitted()) {
+ if ($form = data_submitted() and confirm_sesskey()) {
if (empty($form->name)) {
$edit = true;
@@ -92,6 +92,8 @@
$defaultformat = FORMAT_MOODLE;
}
+ $sesskey = !empty($USER->id) ? $USER->sesskey : '';
+
include('group-edit.html');
if ($usehtmleditor) {