Merge branch 'MDL-86454-main' of https://github.com/sh-csg/moodle into main

This commit is contained in:
Paul Holden
2025-09-17 16:04:33 +01:00
+8 -3
View File
@@ -151,12 +151,17 @@ class core_badges_renderer extends plugin_renderer_base {
'value' => $this->output->larrow() . ' ' . get_string('award', 'badges'),
'class' => 'actionbutton btn btn-secondary')
);
$actioncell->text .= html_writer::empty_tag('input', array(
if (has_capability('moodle/badges:revokebadge', $this->page->context)) {
$actioncell->text .= html_writer::empty_tag(
'input',
[
'type' => 'submit',
'name' => 'revoke',
'value' => get_string('revoke', 'badges') . ' ' . $this->output->rarrow(),
'class' => 'actionbutton btn btn-secondary')
);
'class' => 'actionbutton btn btn-secondary',
]
);
}
$actioncell->text .= html_writer::end_tag('div', array());
$actioncell->attributes['class'] = 'actions';
$potentialcell = new html_table_cell();