Skip to content
Browse files

added sesskey to update_module_button(), error reported in moodle for…

…um d=13835

I made a quick fix - it seemed critical to me
  • Loading branch information...
1 parent 176d456 commit 00c6364cbbe10aef1015a0d1b0e344d7cea09c7e skodak committed Oct 12, 2004
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/weblib.php
View
3 lib/weblib.php
@@ -1877,13 +1877,14 @@ function update_course_icon($courseid) {
function update_module_button($moduleid, $courseid, $string) {
// Prints the editing button on a module "view" page
- global $CFG;
+ global $CFG, $USER;
if (isteacheredit($courseid)) {
$string = get_string("updatethis", "", $string);
return "<form target=\"$CFG->framename\" method=\"get\" action=\"$CFG->wwwroot/course/mod.php\">".
"<input type=\"hidden\" name=\"update\" value=\"$moduleid\" />".
"<input type=\"hidden\" name=\"return\" value=\"true\" />".
+ "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />".
"<input type=\"submit\" value=\"$string\" /></form>";
} else {
return "";

0 comments on commit 00c6364

Please sign in to comment.
Something went wrong with that request. Please try again.