MDL-38710 assign: convert selectedusers to PARAM_SEQUENCE

This param type is more appropiate.
This commit is contained in:
Dan Poltawski 2013-04-15 15:12:00 +01:00 committed by Damyon Wiese
parent 68d646f3eb
commit 9231cd8826
5 changed files with 6 additions and 6 deletions

View File

@ -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'));

View File

@ -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'));
}

View 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') {

View File

@ -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);

View File

@ -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);