diff --git a/course/editsection.html b/course/editsection.html
index 50a3c8241be..553cfc8b401 100644
--- a/course/editsection.html
+++ b/course/editsection.html
@@ -22,6 +22,7 @@
+
">
diff --git a/course/editsection.php b/course/editsection.php
index 16c5c744df9..f3baaf314ac 100644
--- a/course/editsection.php
+++ b/course/editsection.php
@@ -23,7 +23,7 @@
/// If data submitted, then process and store.
- if ($form = data_submitted()) {
+ if ($form = data_submitted() and confirm_sesskey()) {
$timenow = time();
@@ -43,6 +43,8 @@
$form = $section;
}
+ $form->sesskey = !empty($USER->id) ? $USER->sesskey : '';
+
$usehtmleditor = can_use_html_editor();
$sectionname = get_string("name$course->format");