MDL-58435 behat: Behat section editing step should work on section 0

This commit is contained in:
Neill Magill
2017-08-09 15:15:39 +01:00
parent 8146b1f06d
commit 0f84b17eca
+1 -1
View File
@@ -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');