mirror of
https://github.com/moodle/moodle.git
synced 2025-01-16 21:18:33 +01:00
MDL-64708 cohort: Return url is not used anywhere in core.
This commit is contained in:
parent
2904a7f851
commit
c509d10821
@ -28,7 +28,6 @@ require_once($CFG->dirroot.'/cohort/upload_form.php');
|
||||
require_once($CFG->libdir . '/csvlib.class.php');
|
||||
|
||||
$contextid = optional_param('contextid', 0, PARAM_INT);
|
||||
$returnurl = optional_param('returnurl', '', PARAM_URL);
|
||||
|
||||
require_login();
|
||||
|
||||
@ -56,13 +55,9 @@ if ($context->contextlevel == CONTEXT_COURSECAT) {
|
||||
navigation_node::override_active_url(new moodle_url('/cohort/index.php', array()));
|
||||
}
|
||||
|
||||
$uploadform = new cohort_upload_form(null, array('contextid' => $context->id, 'returnurl' => $returnurl));
|
||||
$uploadform = new cohort_upload_form(null, array('contextid' => $context->id));
|
||||
|
||||
if ($returnurl) {
|
||||
$returnurl = new moodle_url($returnurl);
|
||||
} else {
|
||||
$returnurl = new moodle_url('/cohort/index.php', array('contextid' => $context->id));
|
||||
}
|
||||
$returnurl = new moodle_url('/cohort/index.php', array('contextid' => $context->id));
|
||||
|
||||
if ($uploadform->is_cancelled()) {
|
||||
redirect($returnurl);
|
||||
|
@ -48,9 +48,6 @@ class cohort_upload_form extends moodleform {
|
||||
$mform = $this->_form;
|
||||
$data = (object)$this->_customdata;
|
||||
|
||||
$mform->addElement('hidden', 'returnurl');
|
||||
$mform->setType('returnurl', PARAM_URL);
|
||||
|
||||
$mform->addElement('header', 'cohortfileuploadform', get_string('uploadafile'));
|
||||
|
||||
$filepickeroptions = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user