Replaced optional_var with optional_param
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
require("lib.php");
|
||||
require("locallib.php");
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
$id = required_param('id', PARAM_INT); // Course Module ID
|
||||
|
||||
// get some esential stuff...
|
||||
if (! $cm = get_record("course_modules", "id", $id)) {
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
// ...and if necessary set default action
|
||||
|
||||
optional_variable($action);
|
||||
$action = optional_param('action', '', PARAM_ALPHA);
|
||||
if (isteacher($course->id)) {
|
||||
if (empty($action)) { // no action specified, either go straight to elements page else the admin page
|
||||
// has the assignment any elements
|
||||
|
||||
Reference in New Issue
Block a user