Merge branch 'MDL-74159-311' of https://github.com/sarjona/moodle into MOODLE_311_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2022-03-17 18:08:37 +01:00
+5 -2
View File
@@ -2201,11 +2201,14 @@ class core_renderer extends renderer_base {
$icon = $this->pix_icon('docs', '', 'moodle', array('class'=>'iconhelp icon-pre', 'role'=>'presentation'));
$attributes['href'] = new moodle_url(get_docs_url($path));
$newwindowicon = '';
if (!empty($CFG->doctonewwindow) || $forcepopup) {
$attributes['class'] = 'helplinkpopup';
$attributes['target'] = '_blank';
$newwindowicon = $this->pix_icon('i/externallink', get_string('opensinnewwindow'), 'moodle',
['class' => 'fa fa-externallink fa-fw']);
}
return html_writer::tag('a', $icon.$text, $attributes);
return html_writer::tag('a', $icon . $text . $newwindowicon, $attributes);
}
/**