mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-68905-master' of git://github.com/sarjona/moodle
This commit is contained in:
commit
069ae9134f
@ -100,9 +100,11 @@ if ($form->is_cancelled()) {
|
||||
$badge->imageauthorurl = $data->imageauthorurl;
|
||||
$badge->imagecaption = $data->imagecaption;
|
||||
$badge->usermodified = $USER->id;
|
||||
$badge->issuername = $data->issuername;
|
||||
$badge->issuerurl = $data->issuerurl;
|
||||
$badge->issuercontact = $data->issuercontact;
|
||||
if (badges_open_badges_backpack_api() == OPEN_BADGES_V1) {
|
||||
$badge->issuername = $data->issuername;
|
||||
$badge->issuerurl = $data->issuerurl;
|
||||
$badge->issuercontact = $data->issuercontact;
|
||||
}
|
||||
$badge->expiredate = ($data->expiry == 1) ? $data->expiredate : null;
|
||||
$badge->expireperiod = ($data->expiry == 2) ? $data->expireperiod : null;
|
||||
|
||||
|
@ -166,3 +166,32 @@ Feature: Add badges to the system
|
||||
And I click on "Site badges" "link" in the "Navigation" "block"
|
||||
Then I should see "Manage badges"
|
||||
And I should see "Add a new badge"
|
||||
|
||||
@javascript @_file_upload
|
||||
Scenario: Edit a badge
|
||||
Given I navigate to "Badges > Badges settings" in site administration
|
||||
And I set the field "Badge issuer name" to "Test Badge Site"
|
||||
And I set the field "Badge issuer email address" to "testuser@example.com"
|
||||
And I press "Save changes"
|
||||
And I navigate to "Badges > Add a new badge" in site administration
|
||||
And I set the following fields to these values:
|
||||
| Name | Test badge with 'apostrophe' and other friends (<>&@#) |
|
||||
| Version | firstversion |
|
||||
| Language | English |
|
||||
| Description | Test badge description |
|
||||
| Image author | http://author.example.com |
|
||||
| Image caption | Test caption image |
|
||||
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager
|
||||
And I press "Create badge"
|
||||
When I follow "Edit details"
|
||||
And I should see "Test badge with 'apostrophe' and other friends (&@#)"
|
||||
And I should not see "Issuer details"
|
||||
And I set the following fields to these values:
|
||||
| Name | Test badge renamed |
|
||||
| Version | secondversion |
|
||||
And I press "Save changes"
|
||||
And I follow "Overview"
|
||||
Then I should not see "Test badge with 'apostrophe' and other friends (&@#)"
|
||||
And I should not see "firstversion"
|
||||
And I should see "Test badge renamed"
|
||||
And I should see "secondversion"
|
||||
|
Loading…
x
Reference in New Issue
Block a user