Skip to content

Commit

Permalink
Merge branch 'MDL-60031-master' of git://github.com/andrewnicols/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Sep 11, 2017
2 parents dd6e17c + 5ded18d commit 02e10f8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions admin/roles/classes/capability_table_with_risks.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,14 @@ protected function add_row_cells($capability) {
public function get_risk_icon($type) {
global $OUTPUT;

$text = $OUTPUT->pix_icon('i/' . str_replace('risk', 'risk_', $type), get_string($type . 'short', 'admin'));
$alt = get_string("{$type}short", "admin");
$title = get_string($type, "admin");

$text = $OUTPUT->pix_icon('i/' . str_replace('risk', 'risk_', $type), $alt, 'moodle', [
'title' => $title,
]);
$action = new popup_action('click', $this->risksurl, 'docspopup');
$riskicon = $OUTPUT->action_link($this->risksurl, $text, $action, array('title'=>get_string($type, 'admin')));
$riskicon = $OUTPUT->action_link($this->risksurl, $text, $action);

return $riskicon;
}
Expand Down

0 comments on commit 02e10f8

Please sign in to comment.