From 07bc47e0e5295961024481278efa38f51ec9e7e7 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Fri, 10 Jun 2005 11:09:39 +0000 Subject: [PATCH] require_variable() replaced with required_param() --- mod/choice/index.php | 2 +- mod/choice/view.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/choice/index.php b/mod/choice/index.php index 0da26a1c043..86c76bcb0be 100644 --- a/mod/choice/index.php +++ b/mod/choice/index.php @@ -3,7 +3,7 @@ require_once("../../config.php"); require_once("lib.php"); - require_variable($id); // course + $id = required_param('id',0,PARAM_INT); // course if (! $course = get_record("course", "id", $id)) { error("Course ID is incorrect"); diff --git a/mod/choice/view.php b/mod/choice/view.php index e1409eee3fd..26c095313a3 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -3,7 +3,7 @@ require_once("../../config.php"); require_once("lib.php"); - require_variable($id); // Course Module ID + $id = required_param('id',0,PARAM_INT); // Course Module ID if (! $cm = get_record("course_modules", "id", $id)) { error("Course Module ID was incorrect");