Added missing confirm_sesskey() checks
This commit is contained in:
parent
2b2c16d3df
commit
2d1bc8a70c
4 changed files with 111 additions and 82 deletions
|
@ -81,7 +81,14 @@ class edit_form extends \moodleform {
|
|||
}
|
||||
|
||||
// Link to add another page.
|
||||
$addpagelink = new \moodle_url('/mod/customcert/edit.php', array('tid' => $this->tid, 'aid' => 1, 'action' => 'addpage'));
|
||||
$addpagelink = new \moodle_url('/mod/customcert/edit.php',
|
||||
array(
|
||||
'tid' => $this->tid,
|
||||
'aid' => 1,
|
||||
'action' => 'addpage',
|
||||
'sesskey' => sesskey()
|
||||
)
|
||||
);
|
||||
$icon = $OUTPUT->pix_icon('t/switch_plus', get_string('addcertpage', 'customcert'));
|
||||
$addpagehtml = \html_writer::link($addpagelink, $icon . get_string('addcertpage', 'customcert'));
|
||||
$mform->addElement('html', \html_writer::tag('div', $addpagehtml, array('class' => 'addpage')));
|
||||
|
@ -193,9 +200,9 @@ class edit_form extends \moodleform {
|
|||
}
|
||||
|
||||
$editlink = '/mod/customcert/edit.php';
|
||||
$editlinkparams = array('tid' => $this->tid);
|
||||
$editlinkparams = array('tid' => $this->tid, 'sesskey' => sesskey());
|
||||
$editelementlink = '/mod/customcert/edit_element.php';
|
||||
$editelementlinkparams = array('tid' => $this->tid);
|
||||
$editelementlinkparams = array('tid' => $this->tid, 'sesskey' => sesskey());
|
||||
|
||||
// Place the ordering arrows.
|
||||
// Only display the move up arrow if it is not the first.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue