Replaced optional_var with optional_param

This commit is contained in:
moodler
2005-12-07 03:29:55 +00:00
parent 140222739f
commit c06eaa6c53
+2 -2
View File
@@ -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