mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 21:45:37 +02:00
Merge branch 'MDL-69054-master' of git://github.com/sarjona/moodle
This commit is contained in:
commit
0fe7780c2f
@ -67,11 +67,6 @@ class external_backpacks_page implements \renderable {
|
||||
foreach ($this->backpacks as $backpack) {
|
||||
$exporter = new backpack_exporter($backpack);
|
||||
$backpack = $exporter->export($output);
|
||||
if ($backpack->apiversion == OPEN_BADGES_V2 || $backpack->apiversion == OPEN_BADGES_V2P1) {
|
||||
$backpack->canedit = true;
|
||||
} else {
|
||||
$backpack->canedit = false;
|
||||
}
|
||||
$backpack->cantest = ($backpack->apiversion == OPEN_BADGES_V2);
|
||||
$backpack->iscurrent = ($backpack->id == $CFG->badges_site_backpack);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
Example context (json):
|
||||
{
|
||||
"backpacks": [
|
||||
{"backpackweburl": "http://localhost/", "sitebackpack": true, "canedit": false, "cantest": true}
|
||||
{"backpackweburl": "http://localhost/", "sitebackpack": true, "cantest": true}
|
||||
]
|
||||
}
|
||||
}}
|
||||
@ -50,9 +50,7 @@
|
||||
<td> {{{backpackweburl}}} </td>
|
||||
<td> {{#sitebackpack}}Yes{{/sitebackpack}} </td>
|
||||
<td>
|
||||
{{#canedit}}
|
||||
<a href="{{baseurl}}?id={{id}}&action=edit">{{#pix}}t/edit, core,{{#str}}editsettings{{/str}}{{/pix}}</a>
|
||||
{{/canedit}}
|
||||
{{^iscurrent}}
|
||||
<a href="{{baseurl}}?id={{id}}&action=delete" role="button" data-action="deletebackpack">
|
||||
{{#pix}}t/delete, core,{{#str}}delete{{/str}}{{/pix}}
|
||||
|
@ -107,7 +107,8 @@ Feature: Backpack badges
|
||||
And I set the field "backpackweburl" to "http://backpackweburl.cat"
|
||||
And I press "Save changes"
|
||||
Then I should see "http://backpackweburl.cat"
|
||||
And "Delete" "button" should exist
|
||||
And "Delete" "icon" should exist in the "http://backpackweburl.cat" "table_row"
|
||||
And "Edit settings" "icon" should exist in the "http://backpackweburl.cat" "table_row"
|
||||
|
||||
@javascript
|
||||
Scenario: Remove a site backpack
|
||||
|
Loading…
x
Reference in New Issue
Block a user