From 0f84b17ecafb20bdcc0fc1317c383557233b8ae8 Mon Sep 17 00:00:00 2001 From: Neill Magill Date: Wed, 9 Aug 2017 15:15:39 +0100 Subject: [PATCH] MDL-58435 behat: Behat section editing step should work on section 0 --- course/tests/behat/behat_course.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/tests/behat/behat_course.php b/course/tests/behat/behat_course.php index 4b20f931a1b..52f4354e367 100644 --- a/course/tests/behat/behat_course.php +++ b/course/tests/behat/behat_course.php @@ -399,7 +399,7 @@ class behat_course extends behat_base { // We need to know the course format as the text strings depends on them. $courseformat = $this->get_course_format(); - if (get_string_manager()->string_exists('editsection', $courseformat)) { + if ($sectionnumber > 0 && get_string_manager()->string_exists('editsection', $courseformat)) { $stredit = get_string('editsection', $courseformat); } else { $stredit = get_string('editsection');