]> git.mjollnir.org Git - moodle.git/commitdiff
fixed a clean param function call
authormichaelpenne <michaelpenne>
Fri, 4 Feb 2005 19:31:24 +0000 (19:31 +0000)
committermichaelpenne <michaelpenne>
Fri, 4 Feb 2005 19:31:24 +0000 (19:31 +0000)
mod/lesson/report.php

index e1394fc9e3e458aae6d5d3c18b001e8e5c3be7a1..f5ac184288e66fdef8d21c54cbc1717de197a8af 100644 (file)
@@ -7,9 +7,9 @@
     require_once('../../config.php');
     require_once('locallib.php');
 
-    require_variable($id);    // Course Module ID
-    optional_variable($pageid);    // Lesson Page ID
-       optional_variable($action);  // action to take
+    $id     = required_param('id', PARAM_INT);    // Course Module ID
+    $pageid = optional_param('pageid', NULL, PARAM_INT);    // Lesson Page ID
+       $action = optional_param('action');  // action to take
 
     if (! $cm = get_record('course_modules', 'id', $id)) {
         error('Course Module ID was incorrect');
                                        
        **************************************************************************/
        else if ($action == 'detail') {
-               optional_variable($userid); // if empty, then will display the general detailed view
-               optional_variable($try);
+               $userid = optional_param('userid', NULL, PARAM_INT); // if empty, then will display the general detailed view
+               $try    = optional_param('try', NULL, PARAM_INT);
 
                if (! $lessonpages = get_records("lesson_pages", "lessonid", $lesson->id)) {
                        error("Could not find Lesson Pages");