mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
changed deprecated _variable() type functions to _param() type functions.
This commit is contained in:
parent
218dc7532b
commit
00592b8032
@ -4,10 +4,10 @@
|
||||
require_once("$CFG->libdir/graphlib.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
require_variable($type); // Graph Type
|
||||
optional_variable($group, "0"); // Group ID
|
||||
optional_variable($sid); // Student ID
|
||||
$id = required_param('id',PARAM_INT); // Course Module ID
|
||||
$type = required_param('type',PARAM_CLEAN); // Graph Type
|
||||
$group = optional_param('group', 0, PARAM_INT); // Group ID
|
||||
$sid = optional_param('sid', 0, PARAM_INT); // Student ID
|
||||
|
||||
if (! $cm = get_record("course_modules", "id", $id)) {
|
||||
error("Course Module ID was incorrect");
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
// Check that all the parameters have been provided.
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
optional_variable($action, ""); // What to look at
|
||||
optional_variable($qid, "0"); // Question id
|
||||
$id = required_param('id', PARAM_INT); // Course Module ID
|
||||
$action = optional_param('action', ''); // What to look at
|
||||
$qid = optional_param('qid', 0, PARAM_INT); // Question id
|
||||
|
||||
if (! $cm = get_record("course_modules", "id", $id)) {
|
||||
error("Course Module ID was incorrect");
|
||||
|
@ -3,6 +3,7 @@
|
||||
require_once('../../config.php');
|
||||
require_once('lib.php');
|
||||
|
||||
$id = required_param( 'id', PARAM_INT );
|
||||
|
||||
// Make sure this is a legitimate posting
|
||||
|
||||
@ -14,8 +15,6 @@
|
||||
error("Guests are not allowed to answer surveys", $_SERVER["HTTP_REFERER"]);
|
||||
}
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
|
||||
if (! $cm = get_record("course_modules", "id", $id)) {
|
||||
error("Course Module ID was incorrect");
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
$id = required_param('id', PARAM_INT); // Course Module ID
|
||||
|
||||
if (! $cm = get_record("course_modules", "id", $id)) {
|
||||
error("Course Module ID was incorrect");
|
||||
|
Loading…
x
Reference in New Issue
Block a user