]> git.mjollnir.org Git - moodle.git/commitdiff
added sesskey code to remove the sesskey error from updating the lesson from view.php
authormichaelpenne <michaelpenne>
Fri, 21 Jan 2005 19:02:57 +0000 (19:02 +0000)
committermichaelpenne <michaelpenne>
Fri, 21 Jan 2005 19:02:57 +0000 (19:02 +0000)
mod/lesson/view.php

index 4e5540df052eb331c1dadf5bb0a23c5308f02b70..266b8aa57957091e87caa470b5bafe4bb4843917 100644 (file)
@@ -23,7 +23,7 @@
     }
 
     require_login($course->id);
-
+       $SESSION->sesskey = !empty($USER->id) ? $USER->sesskey : '';
 
 /// Print the page header
 
@@ -75,6 +75,7 @@
     if (isteacheredit($course->id)) {
         $button = '<table><tr><td>';
         $button .= '<form target="'. $CFG->framename .'" method="get" action="'. $CFG->wwwroot .'/course/mod.php">'.
+               '<input type="hidden" name="sesskey" value="'. $SESSION->sesskey .'" />'.               
                '<input type="hidden" name="update" value="'. $cm->id .'" />'.
                '<input type="hidden" name="return" value="true" />'.
                '<input type="submit" value="'. get_string('editlessonsettings', 'lesson') .'" /></form>';