Commit 1e7e255d authored by Ferran Recio Calderó's avatar Ferran Recio Calderó
Browse files

MDL-67707 course: add support for PARAM_ALPHANUM module names

parent 73f8c56d
......@@ -27,7 +27,7 @@ require("../config.php");
require_once("lib.php");
$sectionreturn = optional_param('sr', null, PARAM_INT);
$add = optional_param('add', '', PARAM_ALPHA);
$add = optional_param('add', '', PARAM_ALPHANUM);
$type = optional_param('type', '', PARAM_ALPHA);
$indent = optional_param('indent', 0, PARAM_INT);
$update = optional_param('update', 0, PARAM_INT);
......
......@@ -31,7 +31,7 @@ require_once($CFG->libdir.'/completionlib.php');
require_once($CFG->libdir.'/plagiarismlib.php');
require_once($CFG->dirroot . '/course/modlib.php');
$add = optional_param('add', '', PARAM_ALPHA); // module name
$add = optional_param('add', '', PARAM_ALPHANUM); // Module name.
$update = optional_param('update', 0, PARAM_INT);
$return = optional_param('return', 0, PARAM_BOOL); //return to course/view.php if false or mod/modname/view.php if true
$type = optional_param('type', '', PARAM_ALPHANUM); //TODO: hopefully will be removed in 2.0
......
......@@ -942,7 +942,7 @@ abstract class moodleform_mod extends moodleform {
$mform->setType('instance', PARAM_INT);
$mform->addElement('hidden', 'add', 0);
$mform->setType('add', PARAM_ALPHA);
$mform->setType('add', PARAM_ALPHANUM);
$mform->addElement('hidden', 'update', 0);
$mform->setType('update', PARAM_INT);
......
......@@ -4,6 +4,7 @@ information provided here is intended especially for developers.
=== 3.9 ===
* The function get_module_metadata is now deprecated. Please use \core_course\local\service\content_item_service instead.
* Activity module names are now PARAM_ALPHANUM instead of PARAM_ALPHA so integers can be used in activity module names
=== 3.8 ===
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment