MDL-18229 gradebook: Sesskey required for all actions.

This commit is contained in:
Zachary Durber
2014-10-17 10:51:45 +08:00
parent 900944385d
commit f548d49f01
2 changed files with 5 additions and 1 deletions
@@ -189,8 +189,11 @@ abstract class tablelike extends screen {
$buttons = html_writer::tag('div', $buttonhtml, $buttonattr);
$sessionvalidation = html_writer::empty_tag('input',
array('type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey()));
return html_writer::tag('form',
$buttons . html_writer::table($table) . $this->bulk_insert() . $buttons,
$buttons . html_writer::table($table) . $this->bulk_insert() . $buttons . $sessionvalidation,
array('method' => 'POST')
);
}
+1
View File
@@ -99,6 +99,7 @@ $pageparams = array(
$currentpage = new moodle_url('/grade/report/singleview/index.php', $pageparams);
if ($data = data_submitted()) {
require_sesskey(); // Must have a sesskey for all actions.
$warnings = $report->process_data($data);
if (empty($warnings)) {