Skip to content

Commit

Permalink
MDL-58435 behat: Behat section editing step should work on section 0
Browse files Browse the repository at this point in the history
  • Loading branch information
NeillM committed Aug 9, 2017
1 parent 8146b1f commit 0f84b17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion course/tests/behat/behat_course.php
Expand Up @@ -399,7 +399,7 @@ public function i_edit_the_section($sectionnumber) {

// 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');
Expand Down

0 comments on commit 0f84b17

Please sign in to comment.