mirror of
https://github.com/moodle/moodle.git
synced 2025-03-18 22:50:19 +01:00
Merge branch 'MDL-38710-master' of git://github.com/damyon/moodle
This commit is contained in:
commit
52b4bd37e7
@ -69,9 +69,13 @@ class mod_assign_extension_form extends moodleform {
|
||||
get_string('extensionduedate', 'assign'), array('optional'=>true));
|
||||
$mform->setDefault('extensionduedate', $finaldate);
|
||||
$mform->addElement('hidden', 'id', $coursemoduleid);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$mform->addElement('hidden', 'userid', $userid);
|
||||
$mform->setType('userid', PARAM_INT);
|
||||
$mform->addElement('hidden', 'selectedusers', $batchusers);
|
||||
$mform->setType('selectedusers', PARAM_SEQUENCE);
|
||||
$mform->addElement('hidden', 'action', 'saveextension');
|
||||
$mform->setType('action', PARAM_ALPHA);
|
||||
$this->add_action_buttons(true, get_string('savechanges', 'assign'));
|
||||
|
||||
if ($data) {
|
||||
|
@ -66,12 +66,19 @@ class assignfeedback_file_batch_upload_files_form extends moodleform {
|
||||
$this->set_data($data);
|
||||
|
||||
$mform->addElement('hidden', 'id', $params['cm']);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$mform->addElement('hidden', 'operation', 'plugingradingbatchoperation_file_uploadfiles');
|
||||
$mform->setType('operation', PARAM_ALPHAEXT);
|
||||
$mform->addElement('hidden', 'action', 'viewpluginpage');
|
||||
$mform->setType('action', PARAM_ALPHA);
|
||||
$mform->addElement('hidden', 'pluginaction', 'uploadfiles');
|
||||
$mform->setType('pluginaction', PARAM_ALPHA);
|
||||
$mform->addElement('hidden', 'plugin', 'file');
|
||||
$mform->setType('plugin', PARAM_PLUGIN);
|
||||
$mform->addElement('hidden', 'pluginsubtype', 'assignfeedback');
|
||||
$mform->setType('pluginsubtype', PARAM_PLUGIN);
|
||||
$mform->addElement('hidden', 'selectedusers', implode(',', $params['users']));
|
||||
$mform->setType('selectedusers', PARAM_SEQUENCE);
|
||||
$this->add_action_buttons(true, get_string('uploadfiles', 'assignfeedback_file'));
|
||||
|
||||
}
|
||||
|
@ -115,11 +115,17 @@ class assignfeedback_file_import_zip_form extends moodleform implements renderab
|
||||
}
|
||||
|
||||
$mform->addElement('hidden', 'id', $assignment->get_course_module()->id);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$mform->addElement('hidden', 'action', 'viewpluginpage');
|
||||
$mform->setType('action', PARAM_ALPHA);
|
||||
$mform->addElement('hidden', 'confirm', 'true');
|
||||
$mform->setType('confirm', PARAM_BOOL);
|
||||
$mform->addElement('hidden', 'plugin', 'file');
|
||||
$mform->setTYpe('plugin', PARAM_PLUGIN);
|
||||
$mform->addElement('hidden', 'pluginsubtype', 'assignfeedback');
|
||||
$mform->setTYpe('pluginsubtype', PARAM_PLUGIN);
|
||||
$mform->addElement('hidden', 'pluginaction', 'uploadzip');
|
||||
$mform->setType('pluginaction', PARAM_ALPHA);
|
||||
if (count($updates)) {
|
||||
$this->add_action_buttons(true, get_string('confirm'));
|
||||
} else {
|
||||
|
@ -590,7 +590,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') {
|
||||
|
@ -56,10 +56,15 @@ class assignfeedback_file_upload_zip_form extends moodleform {
|
||||
$mform->addHelpButton('feedbackzip', 'feedbackzip', 'assignfeedback_file');
|
||||
|
||||
$mform->addElement('hidden', 'id', $params['cm']);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$mform->addElement('hidden', 'action', 'viewpluginpage');
|
||||
$mform->setType('action', PARAM_ALPHA);
|
||||
$mform->addElement('hidden', 'pluginaction', 'uploadzip');
|
||||
$mform->setType('pluginaction', PARAM_ALPHA);
|
||||
$mform->addElement('hidden', 'plugin', 'file');
|
||||
$mform->setType('plugin', PARAM_PLUGIN);
|
||||
$mform->addElement('hidden', 'pluginsubtype', 'assignfeedback');
|
||||
$mform->setType('pluginsubtype', PARAM_PLUGIN);
|
||||
$this->add_action_buttons(true, get_string('importfeedbackfiles', 'assignfeedback_file'));
|
||||
|
||||
}
|
||||
|
@ -164,14 +164,23 @@ class assignfeedback_offline_import_grades_form extends moodleform implements re
|
||||
}
|
||||
|
||||
$mform->addElement('hidden', 'id', $assignment->get_course_module()->id);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$mform->addElement('hidden', 'action', 'viewpluginpage');
|
||||
$mform->setType('action', PARAM_ALPHA);
|
||||
$mform->addElement('hidden', 'confirm', 'true');
|
||||
$mform->setType('confirm', PARAM_BOOL);
|
||||
$mform->addElement('hidden', 'plugin', 'offline');
|
||||
$mform->setType('plugin', PARAM_PLUGIN);
|
||||
$mform->addElement('hidden', 'pluginsubtype', 'assignfeedback');
|
||||
$mform->setType('pluginsubtype', PARAM_PLUGIN);
|
||||
$mform->addElement('hidden', 'pluginaction', 'uploadgrades');
|
||||
$mform->setType('pluginaction', PARAM_ALPHA);
|
||||
$mform->addElement('hidden', 'importid', $gradeimporter->importid);
|
||||
$mform->setType('importid', PARAM_INT);
|
||||
$mform->addElement('hidden', 'ignoremodified', $ignoremodified);
|
||||
$mform->setType('ignoremodified', PARAM_BOOL);
|
||||
$mform->addElement('hidden', 'draftid', $draftid);
|
||||
$mform->setType('draftid', PARAM_INT);
|
||||
if ($update) {
|
||||
$this->add_action_buttons(true, get_string('confirm'));
|
||||
} else {
|
||||
|
@ -59,10 +59,15 @@ class assignfeedback_offline_upload_grades_form extends moodleform {
|
||||
$mform->addHelpButton('ignoremodified', 'ignoremodified', 'assignfeedback_offline');
|
||||
|
||||
$mform->addElement('hidden', 'id', $params['cm']);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$mform->addElement('hidden', 'action', 'viewpluginpage');
|
||||
$mform->setType('action', PARAM_ALPHA);
|
||||
$mform->addElement('hidden', 'pluginaction', 'uploadgrades');
|
||||
$mform->setType('pluginaction', PARAM_ALPHA);
|
||||
$mform->addElement('hidden', 'plugin', 'offline');
|
||||
$mform->setType('plugin', PARAM_PLUGIN);
|
||||
$mform->addElement('hidden', 'pluginsubtype', 'assignfeedback');
|
||||
$mform->setType('pluginsubtype', PARAM_PLUGIN);
|
||||
$this->add_action_buttons(true, get_string('uploadgrades', 'assignfeedback_offline'));
|
||||
|
||||
}
|
||||
|
@ -66,9 +66,13 @@ class mod_assign_grading_batch_operations_form extends moodleform {
|
||||
}
|
||||
|
||||
$mform->addElement('hidden', 'action', 'gradingbatchoperation');
|
||||
$mform->setType('action', PARAM_ALPHA);
|
||||
$mform->addElement('hidden', 'id', $instance['cm']);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$mform->addElement('hidden', 'selectedusers', '', array('class'=>'selectedusers'));
|
||||
$mform->setType('selectedusers', PARAM_SEQUENCE);
|
||||
$mform->addElement('hidden', 'returnaction', 'grading');
|
||||
$mform->setType('returnaction', PARAM_ALPHA);
|
||||
|
||||
$objs = array();
|
||||
$objs[] =& $mform->createElement('select', 'operation', get_string('chooseoperation', 'assign'), $options);
|
||||
|
@ -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);
|
||||
|
@ -117,6 +117,7 @@ class mod_assign_mod_form extends moodleform_mod {
|
||||
} else {
|
||||
$mform->addElement('hidden', 'requiresubmissionstatement', 1);
|
||||
}
|
||||
$mform->setType('requiresubmissionstatement', PARAM_BOOL);
|
||||
|
||||
$options = array(
|
||||
ASSIGN_ATTEMPT_REOPEN_METHOD_NONE => get_string('attemptreopenmethod_none', 'mod_assign'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user