]> git.mjollnir.org Git - moodle.git/commitdiff
merged from 14_STABLE, the merging is getting a bit messy :-O
authorskodak <skodak>
Tue, 12 Oct 2004 18:47:39 +0000 (18:47 +0000)
committerskodak <skodak>
Tue, 12 Oct 2004 18:47:39 +0000 (18:47 +0000)
added sesskey to update_module_button(), error reported in moodle forum d=13835;
I made a quick fix - it seemed critical to me

lib/weblib.php

index b5c2c59029cea92e65be042fbab49daeae088aa9..a9ca3d10cdb203c175c20e9ddad9aa0d77466c97 100644 (file)
@@ -2440,13 +2440,14 @@ function update_course_icon($courseid) {
  * @todo Finish documenting this function
  */
 function update_module_button($moduleid, $courseid, $string) {
-    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 '';