From bdead9b5c76f6d2b9ccfa4b5f36bd240e0e139ec Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Wed, 12 Aug 2015 14:12:09 +0800 Subject: [PATCH] MDL-51084 tool_customlang: return to the same page after submit --- admin/tool/customlang/edit.php | 2 +- admin/tool/customlang/renderer.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/tool/customlang/edit.php b/admin/tool/customlang/edit.php index 71c54fe26ce..8ad4536715b 100644 --- a/admin/tool/customlang/edit.php +++ b/admin/tool/customlang/edit.php @@ -63,7 +63,7 @@ if ($translatorsubmitted) { $checkin = optional_param('savecheckin', false, PARAM_RAW); if ($checkin === false) { - $nexturl = $PAGE->url; + $nexturl = new moodle_url($PAGE->url, array('p' => $currentpage)); } else { $nexturl = new moodle_url('/admin/tool/customlang/index.php', array('action'=>'checkin', 'lng' => $lng, 'sesskey'=>sesskey())); } diff --git a/admin/tool/customlang/renderer.php b/admin/tool/customlang/renderer.php index c733ddacb26..224e76b0bf4 100644 --- a/admin/tool/customlang/renderer.php +++ b/admin/tool/customlang/renderer.php @@ -133,6 +133,7 @@ class tool_customlang_renderer extends plugin_renderer_base { $output .= html_writer::start_tag('div'); $output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'translatorsubmitted', 'value'=>1)); $output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'sesskey', 'value'=>sesskey())); + $output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'p', 'value'=>$translator->currentpage)); $save1 = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'savecontinue', 'value'=>get_string('savecontinue', 'tool_customlang'))); $save2 = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'savecheckin', 'value'=>get_string('savecheckin', 'tool_customlang'))); $output .= html_writer::tag('fieldset', $save1.$save2, array('class'=>'buttonsbar'));