mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
Replaced optional_var with optional_param
This commit is contained in:
parent
3a6b53e80d
commit
aa8139414e
18 changed files with 85 additions and 90 deletions
|
@ -4,10 +4,10 @@
|
|||
require_once("lib.php");
|
||||
global $CFG, $USER;
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
$id = required_param('id', PARAM_INT); // Course Module ID
|
||||
|
||||
optional_variable($l,"");
|
||||
optional_variable($cat,0);
|
||||
$l = optional_param('l','', PARAM_ALPHANUM);
|
||||
$cat = optional_param('cat',0, PARAM_ALPHANUM);
|
||||
|
||||
if (! $cm = get_record("course_modules", "id", $id)) {
|
||||
error("Course Module ID was incorrect");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue