diff --git a/course/format/templates/local/content/cm/completion_dialog.mustache b/course/format/templates/local/content/cm/completion_dialog.mustache index fcc2bbbdf78..9204fe7a818 100644 --- a/course/format/templates/local/content/cm/completion_dialog.mustache +++ b/course/format/templates/local/content/cm/completion_dialog.mustache @@ -110,7 +110,7 @@ {{! Show edit link to editing teachers. }} {{#editing}} {{#editurl}} -
+
{{#hasconditions}}{{#pix}} i/edit, core {{/pix}}{{#str}}editconditions, completion{{/str}}{{/hasconditions}} {{^hasconditions}}{{#pix}} t/add, core {{/pix}}{{#str}}addconditions, completion{{/str}}{{/hasconditions}} diff --git a/course/format/tests/behat/coursepage_completion.feature b/course/format/tests/behat/coursepage_completion.feature index c5b3e728b71..88cbc0e007e 100644 --- a/course/format/tests/behat/coursepage_completion.feature +++ b/course/format/tests/behat/coursepage_completion.feature @@ -174,3 +174,19 @@ Feature: Course page activities completion # Student view. And I am on the "C1" "Course" page logged in as "student1" And "There are no completion conditions set for this activity." "text" should exist in the "Activity sample" "core_courseformat > Activity completion" + + @javascript + Scenario: Completion edit button should be hidden in bulk editing + Given the following "activity" exists: + | activity | assign | + | name | Activity sample | + | course | C1 | + | completion | 2 | + | completionview | 1 | + And I log in as "teacher1" + And I am on "C1" course homepage with editing mode on + And I click on "Completion" "button" + And "Edit conditions" "link" in the "Activity sample" "activity" should be visible + When I click on "Bulk actions" "button" + And I click on "Completion" "button" + Then "Edit conditions" "link" in the "Activity sample" "activity" should not be visible