mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +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
|
@ -119,7 +119,7 @@ class MoodleBlock {
|
|||
}
|
||||
|
||||
function add_edit_controls($options, $blockid) {
|
||||
global $CFG, $THEME;
|
||||
global $CFG, $THEME, $USER;
|
||||
|
||||
// The block may be disabled
|
||||
$blockid = intval($blockid);
|
||||
|
@ -143,6 +143,8 @@ class MoodleBlock {
|
|||
} else {
|
||||
$pixpath = $path.'/../theme/'.$CFG->theme.'/pix';
|
||||
}
|
||||
|
||||
$sesskeystr = '&sesskey='.$USER->sesskey;
|
||||
|
||||
$movebuttons = '<div style="float: right;">';
|
||||
|
||||
|
@ -155,26 +157,26 @@ class MoodleBlock {
|
|||
$title = $this->str->show;
|
||||
}
|
||||
|
||||
$movebuttons .= '<a style="margin-right: 6px; margin-left: 3px;" title="'.$title.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=toggle&blockid='.$blockid.'">' .
|
||||
$movebuttons .= '<a style="margin-right: 6px; margin-left: 3px;" title="'.$title.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=toggle&blockid='.$blockid.$sesskeystr.'">' .
|
||||
'<img src="'.$pixpath.$icon.'" alt="" /></a>';
|
||||
|
||||
$movebuttons .= '<a title="'.$this->str->delete.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=delete&blockid='.$blockid.'">' .
|
||||
$movebuttons .= '<a title="'.$this->str->delete.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=delete&blockid='.$blockid.$sesskeystr.'">' .
|
||||
'<img src="'.$pixpath.'/t/delete.gif" alt="" /></a> ';
|
||||
|
||||
if ($options & BLOCK_MOVE_LEFT) {
|
||||
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveleft.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=moveside&blockid='.$blockid.'">' .
|
||||
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveleft.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=moveside&blockid='.$blockid.$sesskeystr.'">' .
|
||||
'<img src="'.$pixpath.'/t/left.gif" alt="" /></a>';
|
||||
}
|
||||
if ($options & BLOCK_MOVE_UP) {
|
||||
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveup.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=moveup&blockid='.$blockid.'">' .
|
||||
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveup.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=moveup&blockid='.$blockid.$sesskeystr.'">' .
|
||||
'<img src="'.$pixpath.'/t/up.gif" alt="" /></a>';
|
||||
}
|
||||
if ($options & BLOCK_MOVE_DOWN) {
|
||||
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->movedown.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=movedown&blockid='.$blockid.'">' .
|
||||
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->movedown.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=movedown&blockid='.$blockid.$sesskeystr.'">' .
|
||||
'<img src="'.$pixpath.'/t/down.gif" alt="" /></a>';
|
||||
}
|
||||
if ($options & BLOCK_MOVE_RIGHT) {
|
||||
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveright.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=moveside&blockid='.$blockid.'">' .
|
||||
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveright.'" href="'.$path.'/view.php?id='.$this->course->id.'&blockaction=moveside&blockid='.$blockid.$sesskeystr.'">' .
|
||||
'<img src="'.$pixpath.'/t/right.gif" alt="" /></a>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue