|
@@ -80,7 +80,8 @@ $mform = new mod_gradeimporter_submission_form(null, array('submission' => $entr
|
|
|
|
|
|
if ($mform->is_cancelled()) {
|
|
if ($mform->is_cancelled()) {
|
|
// Handle form cancel operation, if cancel button is present on form
|
|
// Handle form cancel operation, if cancel button is present on form
|
|
- redirect("view.php?id=$cm->id&edit=1");
|
|
|
|
|
|
+ $viewurl = new moodle_url('/mod/gradeimporter/view.php', ['id' => $cm->id, 'edit' => 1]);
|
|
|
|
+ redirect($viewurl);
|
|
} else if ($formdata = $mform->get_data()) {
|
|
} else if ($formdata = $mform->get_data()) {
|
|
|
|
|
|
validate_formdata($formdata);
|
|
validate_formdata($formdata);
|
|
@@ -94,7 +95,8 @@ if ($mform->is_cancelled()) {
|
|
|
|
|
|
store_files($context, $cm, $entry);
|
|
store_files($context, $cm, $entry);
|
|
// When complete redirect to view.php
|
|
// When complete redirect to view.php
|
|
- redirect("view.php?id=$cm->id&edit=1");
|
|
|
|
|
|
+ $viewurl = new moodle_url('/mod/gradeimporter/view.php', ['id' => $cm->id, 'edit' => 1]);
|
|
|
|
+ redirect($viewurl);
|
|
|
|
|
|
} else {
|
|
} else {
|
|
// This branch is executed if the form is submitted but the data doesn't validate and the form should be redisplayed
|
|
// This branch is executed if the form is submitted but the data doesn't validate and the form should be redisplayed
|