mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-38710 assign: convert selectedusers to PARAM_SEQUENCE
This param type is more appropiate.
This commit is contained in:
parent
68d646f3eb
commit
9231cd8826
@ -73,7 +73,7 @@ class mod_assign_extension_form extends moodleform {
|
||||
$mform->addElement('hidden', 'userid', $userid);
|
||||
$mform->setType('userid', PARAM_INT);
|
||||
$mform->addElement('hidden', 'selectedusers', $batchusers);
|
||||
$mform->setType('selectedusers', PARAM_TEXT);
|
||||
$mform->setType('selectedusers', PARAM_SEQUENCE);
|
||||
$mform->addElement('hidden', 'action', 'saveextension');
|
||||
$mform->setType('action', PARAM_ALPHA);
|
||||
$this->add_action_buttons(true, get_string('savechanges', 'assign'));
|
||||
|
@ -78,7 +78,7 @@ class assignfeedback_file_batch_upload_files_form extends moodleform {
|
||||
$mform->addElement('hidden', 'pluginsubtype', 'assignfeedback');
|
||||
$mform->setType('pluginsubtype', PARAM_PLUGIN);
|
||||
$mform->addElement('hidden', 'selectedusers', implode(',', $params['users']));
|
||||
$mform->setType('selectedusers', PARAM_TEXT);
|
||||
$mform->setType('selectedusers', PARAM_SEQUENCE);
|
||||
$this->add_action_buttons(true, get_string('uploadfiles', 'assignfeedback_file'));
|
||||
|
||||
}
|
||||
|
@ -589,7 +589,7 @@ class assign_feedback_file extends assign_feedback_plugin {
|
||||
*/
|
||||
public function view_page($action) {
|
||||
if ($action == 'uploadfiles') {
|
||||
$users = required_param('selectedusers', PARAM_TEXT);
|
||||
$users = required_param('selectedusers', PARAM_SEQUENCE);
|
||||
return $this->view_batch_upload_files(explode(',', $users));
|
||||
}
|
||||
if ($action == 'uploadzip') {
|
||||
|
@ -70,7 +70,7 @@ class mod_assign_grading_batch_operations_form extends moodleform {
|
||||
$mform->addElement('hidden', 'id', $instance['cm']);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$mform->addElement('hidden', 'selectedusers', '', array('class'=>'selectedusers'));
|
||||
$mform->setType('selectedusers', PARAM_TEXT);
|
||||
$mform->setType('selectedusers', PARAM_SEQUENCE);
|
||||
$mform->addElement('hidden', 'returnaction', 'grading');
|
||||
$mform->setType('returnaction', PARAM_ALPHA);
|
||||
|
||||
|
@ -1730,7 +1730,7 @@ class assign {
|
||||
require_once($CFG->dirroot . '/mod/assign/extensionform.php');
|
||||
|
||||
$o = '';
|
||||
$batchusers = optional_param('selectedusers', '', PARAM_TEXT);
|
||||
$batchusers = optional_param('selectedusers', '', PARAM_SEQUENCE);
|
||||
$data = new stdClass();
|
||||
$data->extensionduedate = null;
|
||||
$userid = 0;
|
||||
@ -4295,7 +4295,7 @@ class assign {
|
||||
// Need submit permission to submit an assignment.
|
||||
require_capability('mod/assign:grantextension', $this->context);
|
||||
|
||||
$batchusers = optional_param('selectedusers', '', PARAM_TEXT);
|
||||
$batchusers = optional_param('selectedusers', '', PARAM_SEQUENCE);
|
||||
$userid = 0;
|
||||
if (!$batchusers) {
|
||||
$userid = required_param('userid', PARAM_INT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user