Skip to content

Commit

Permalink
MDL-64708 cohort: Return url is not used anywhere in core.
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden authored and Jenkins committed May 8, 2019
1 parent 2904a7f commit c509d10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
9 changes: 2 additions & 7 deletions cohort/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
require_once($CFG->libdir . '/csvlib.class.php');

$contextid = optional_param('contextid', 0, PARAM_INT);
$returnurl = optional_param('returnurl', '', PARAM_URL);

require_login();

Expand Down Expand Up @@ -56,13 +55,9 @@
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);
Expand Down
3 changes: 0 additions & 3 deletions cohort/upload_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public function definition() {
$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();
Expand Down

0 comments on commit c509d10

Please sign in to comment.