mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
MDL-67707 course: add support for PARAM_ALPHANUM module names
This commit is contained in:
parent
73f8c56dfc
commit
1e7e255d72
@ -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 ===
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user