mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +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
|
@ -5,12 +5,12 @@ require_once('lib.php');
|
|||
|
||||
global $CFG, $USER;
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
optional_variable($e); // EntryID
|
||||
optional_variable($confirm,0); // proceed. Edit the edtry
|
||||
$id = required_param('id', PARAM_INT); // Course Module ID
|
||||
$e = optional_param('e', 0, PARAM_INT); // EntryID
|
||||
$confirm = optional_param('confirm',0, PARAM_INT); // proceed. Edit the edtry
|
||||
|
||||
$mode = optional_param('mode'); // categories if by category?
|
||||
$hook = optional_param('hook'); // CategoryID
|
||||
$mode = optional_param('mode', '', PARAM_ALPHA); // categories if by category?
|
||||
$hook = optional_param('hook', '', PARAM_ALPHANUM); // CategoryID
|
||||
|
||||
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