course/view.php is using sesskey
(changes in blocks done, please check them) Merged from MOODLE_14_STABLE
This commit is contained in:
+4
-1
@@ -405,6 +405,9 @@ function block_find($blockid, $leftblocks, $rightblocks) {
|
||||
|
||||
//This function prints the block to admin blocks as necessary
|
||||
function block_print_blocks_admin(&$course, $missingblocks) {
|
||||
|
||||
global $USER;
|
||||
|
||||
if (isediting($course->id)) {
|
||||
$strblocks = get_string('blocks');
|
||||
$stradd = get_string('add');
|
||||
@@ -425,7 +428,7 @@ function block_print_blocks_admin(&$course, $missingblocks) {
|
||||
else {
|
||||
$target = 'view.php';
|
||||
}
|
||||
$content = popup_form($target.'?id='.$course->id.'&blockaction=add&blockid=',
|
||||
$content = popup_form($target.'?id='.$course->id.'&blockaction=add&sesskey='.$USER->sesskey.'&blockid=',
|
||||
$menu, 'add_block', '', "$stradd...", '', '', true);
|
||||
$content = '<div align="center">'.$content.'</div>';
|
||||
print_side_block($strblocks, $content, NULL, NULL, NULL);
|
||||
|
||||
Reference in New Issue
Block a user