Skip to content

Commit

Permalink
Merge branch 'MDL-29717-master' of https://github.com/marinaglancy/mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Jun 28, 2022
2 parents 34d5589 + e3bd0f7 commit a60a2ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions lang/en/webservice.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
$string['deleteserviceconfirm'] = 'Deleting a service will also delete the tokens related to this service. Do you really want to delete external service "{$a}"?';
$string['deletetoken'] = 'Delete token';
$string['deletetokenconfirm'] = 'Do you really want to delete this web service token for <strong>{$a->user}</strong> on the service <strong>{$a->service}</strong>?';
$string['deprecated'] = 'Deprecated';
$string['disabledwarning'] = 'All web service protocols are disabled. The "Enable web services" setting can be found in Advanced features.';
$string['doc'] = 'Documentation';
$string['docaccessrefused'] = 'You are not allowed to see the documentation for this token';
Expand Down
9 changes: 7 additions & 2 deletions webservice/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -658,16 +658,21 @@ public function documentation_html($functions, $printableformat, $activatedproto
//(opened if printableformat = true)
foreach ($functions as $functionname => $description) {

$tags = '';
if (!empty($description->deprecated)) {
$tags .= ' ' . html_writer::span(get_string('deprecated', 'core_webservice'), 'badge badge-warning');
}

if (empty($printableformat)) {
$documentationhtml .= print_collapsible_region_start('',
'aera_' . $functionname,
html_writer::start_tag('strong', array())
. $functionname . html_writer::end_tag('strong'),
. $functionname . html_writer::end_tag('strong') . $tags,
false,
!$printableformat,
true);
} else {
$documentationhtml .= html_writer::tag('strong', $functionname);
$documentationhtml .= html_writer::tag('strong', $functionname) . $tags;
$documentationhtml .= $br;
}

Expand Down

0 comments on commit a60a2ad

Please sign in to comment.