mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
course/view.php is using sesskey
(changes in blocks done, please check them) Merged from MOODLE_14_STABLE
This commit is contained in:
parent
967cd1164b
commit
5b224948aa
5 changed files with 28 additions and 23 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue