From c06eaa6c53edd5a6c370a1fa94d49976aa9c1659 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 7 Dec 2005 03:29:55 +0000 Subject: [PATCH] Replaced optional_var with optional_param --- mod/exercise/view.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/exercise/view.php b/mod/exercise/view.php index f528439382d..6242b21820a 100644 --- a/mod/exercise/view.php +++ b/mod/exercise/view.php @@ -19,7 +19,7 @@ require("lib.php"); require("locallib.php"); - require_variable($id); // Course Module ID + $id = required_param('id', PARAM_INT); // Course Module ID // get some esential stuff... if (! $cm = get_record("course_modules", "id", $id)) { @@ -49,7 +49,7 @@ // ...and if necessary set default action - optional_variable($action); + $action = optional_param('action', '', PARAM_ALPHA); if (isteacher($course->id)) { if (empty($action)) { // no action specified, either go straight to elements page else the admin page // has the assignment any elements