Fixed call to required_param()
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
$id = required_param('id', PARAM_INT); // course
|
||||
|
||||
if (! $course = get_record("course", "id", $id)) {
|
||||
error("Course ID is incorrect");
|
||||
|
||||
+1
-1
@@ -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
|
||||
$action = optional_param('action', '');
|
||||
|
||||
if (! $cm = get_record("course_modules", "id", $id)) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
require_once("../../config.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");
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
$id = required_param('id', PARAM_INT); // course
|
||||
|
||||
if (! $course = get_record("course", "id", $id)) {
|
||||
error("Course ID is incorrect");
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course module
|
||||
$id = required_param('id', PARAM_INT); // course module
|
||||
|
||||
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");
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
$id = required_param('id', PARAM_INT); // course
|
||||
|
||||
if (! $course = get_record("course", "id", $id)) {
|
||||
error("Course ID is incorrect");
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
require_once("../../config.php");
|
||||
require_once("locallib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
$id = required_param('id', PARAM_INT); // course
|
||||
|
||||
if (!$course = get_record("course", "id", $id)) {
|
||||
error("Course ID is incorrect");
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
$id = required_param('id', PARAM_INT); // course
|
||||
|
||||
if (! $course = get_record("course", "id", $id)) {
|
||||
error("Course ID is incorrect");
|
||||
|
||||
Reference in New Issue
Block a user