__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
@core @core_badges
Feature: Delete course badge already awarded
As a teacher
I can delete awarded course badge
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario Outline: Delete course badge already awarded to student
Given the following "core_badges > Badges" exist:
| name | course | description | image | status | type |
| Testing badge 1 | C1 | Testing badge 1 description | badges/tests/behat/badge.png | active | 2 |
And the following "core_badges > Criterias" exist:
| badge | role |
| Testing badge 1 | editingteacher |
And the following "core_badges > Issued badges" exist:
| badge | user |
| Testing badge 1 | student1 |
When I am on the "Course 1" "enrolled users" page logged in as "teacher1"
And I click on "Student 1" "link"
Then I should see "Testing badge 1"
And I am on the "Course 1" course page
# Navigate to Badges page in order to delete the badge
And I navigate to "Badges" in current page administration
# Delete the badge
And I press "Delete" action in the "Testing badge 1" report row
And I press "<deleteoption>"
And the following <shouldtable> exist in the "reportbuilder-table" table:
| Name | Badge status |
| Testing badge 1 | Archived |
And I <shouldmsg> see "There are no matching badges available for users to earn."
# Confirm that badge is retained in the first case as awarded badge but not in the second.
And I am on the "Course 1" "enrolled users" page
And I click on "Student 1" "link"
And I <shouldtable> see "Testing badge 1"
Examples:
| deleteoption | shouldtable | shouldmsg |
| Delete and keep existing issued badges | should | should not |
| Delete and remove existing issued badges | should not | should |
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| add_badge.feature | File | 10.39 KB | 0777 |
|
| award_badge.feature | File | 17.71 KB | 0777 |
|
| award_badge_groups.feature | File | 10.15 KB | 0777 |
|
| backpack.feature | File | 9.76 KB | 0777 |
|
| badge.png | File | 2.07 KB | 0777 |
|
| badge_navigation.feature | File | 5.86 KB | 0777 |
|
| criteria_activity.feature | File | 6.3 KB | 0777 |
|
| criteria_cohort.feature | File | 19.48 KB | 0777 |
|
| criteria_competency.feature | File | 9.17 KB | 0777 |
|
| criteria_profile.feature | File | 1.46 KB | 0777 |
|
| delete_awarded_badge.feature | File | 2.4 KB | 0777 |
|
| manage_badges.feature | File | 7.88 KB | 0777 |
|
| nobadge_navigation.feature | File | 4.1 KB | 0777 |
|
| role_visibility.feature | File | 1.91 KB | 0777 |
|
| view_badge.feature | File | 6.88 KB | 0777 |
|