diff --git a/course/editsection.html b/course/editsection.html
index e0eab2e75a2..96f98920107 100644
--- a/course/editsection.html
+++ b/course/editsection.html
@@ -22,6 +22,7 @@
+
" />
diff --git a/course/editsection.php b/course/editsection.php
index d56cd225686..5bc78ead0da 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");