Replaced optional_var with optional_param

This commit is contained in:
moodler 2005-12-07 06:21:58 +00:00
parent 3a6b53e80d
commit aa8139414e
18 changed files with 85 additions and 90 deletions

View file

@ -3,11 +3,11 @@
require_once("../../config.php");
require_once("lib.php");
require_variable($id); // Course Module ID
optional_variable($eid); // Entry ID
$id = required_param('id', PARAM_INT); // Course Module ID
$eid = optional_param('eid', 0, PARAM_INT); // Entry ID
$mode = optional_param('mode','approval');
$hook = optional_param('hook','ALL');
$mode = optional_param('mode','approval', PARAM_ALPHA);
$hook = optional_param('hook','ALL', PARAM_CLEAN);
if (! $cm = get_record("course_modules", "id", $id)) {
error("Course Module ID was incorrect");