MDL-79020 core_courseformat: hide completion edit link in bulk edit

This commit is contained in:
ferranrecio
2024-09-06 11:10:57 +02:00
parent d14f5eaa6c
commit 0fadf1ed19
2 changed files with 17 additions and 1 deletions
@@ -110,7 +110,7 @@
{{! Show edit link to editing teachers. }}
{{#editing}}
{{#editurl}}
<div class="editcompletion border-top mt-3 pt-3">
<div class="editcompletion bulk-hidden border-top mt-3 pt-3">
<a href="{{editurl}}" class="btn btn-sm px-2 py-0">
{{#hasconditions}}{{#pix}} i/edit, core {{/pix}}{{#str}}editconditions, completion{{/str}}{{/hasconditions}}
{{^hasconditions}}{{#pix}} t/add, core {{/pix}}{{#str}}addconditions, completion{{/str}}{{/hasconditions}}
@@ -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