From 71092f49c9402a4765e58a5f13896f5d7117fe80 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Thu, 1 Feb 2018 11:47:18 +0800 Subject: [PATCH] MDL-61328 tool_usertours: do not fix tour sortorder after step editing otherwise it breaks when we try to modify the step sortorder --- admin/tool/usertours/classes/step.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/admin/tool/usertours/classes/step.php b/admin/tool/usertours/classes/step.php index 6049e8feba8..4819ac08029 100644 --- a/admin/tool/usertours/classes/step.php +++ b/admin/tool/usertours/classes/step.php @@ -483,10 +483,9 @@ class step { $record = $this->to_record(); unset($record->id); $this->id = $DB->insert_record('tool_usertours_steps', $record); + $this->get_tour()->reset_step_sortorder(); } - $this->get_tour()->reset_step_sortorder(); - $this->reload(); // Notify of a change to the step configuration.