mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
course/groups.php is using sesskey.
Merged from MOODLE_14_STABLE
This commit is contained in:
parent
740c44428e
commit
d84e70d049
@ -87,6 +87,7 @@ function groupWindow(selectgroup) {
|
||||
<form name="form1" id="form1" method="post" action="groups.php">
|
||||
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
|
||||
<input type="hidden" name="groupid" value="<?php p($selectedgroup) ?>" />
|
||||
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>">
|
||||
<select name="nonmembers[]" size="15" multiple="multiple">
|
||||
<?php
|
||||
if (!empty($nonmembers)) {
|
||||
@ -113,6 +114,7 @@ function groupWindow(selectgroup) {
|
||||
<td class="generalboxcontent"><p>
|
||||
<form name="form2" id="form2" method="post" action="groups.php">
|
||||
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
|
||||
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>">
|
||||
<select name="groups" size="15" onChange="updateMembers(this)">
|
||||
<?php
|
||||
if (!empty($listgroups)) {
|
||||
@ -146,6 +148,7 @@ function groupWindow(selectgroup) {
|
||||
<form name="form3" id="form3" method="post" action="groups.php">
|
||||
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
|
||||
<input type="hidden" name="groupid" value="<?php p($selectedgroup) ?>" />
|
||||
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>">
|
||||
<select name="members[]" size="15" multiple="multiple">
|
||||
<?php
|
||||
if (!empty($members)) {
|
||||
|
@ -82,7 +82,7 @@
|
||||
|
||||
/// We are in editing mode. First, process any inputs there may be.
|
||||
|
||||
if ($data = data_submitted()) {
|
||||
if ($data = data_submitted() and confirm_sesskey()) {
|
||||
|
||||
if (!empty($data->nonmembersadd)) { /// Add people to a group
|
||||
if (!empty($data->nonmembers) and !empty($data->groupid)) {
|
||||
@ -219,6 +219,8 @@
|
||||
$members = $listmembers[$selectedgroup];
|
||||
}
|
||||
|
||||
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
|
||||
|
||||
/// Print out the complete form
|
||||
|
||||
include('groups-edit.html');
|
||||
|
Loading…
x
Reference in New Issue
Block a user