This only occurs if the administrator sets the frame name setting for Moodle to something other than default _top
or if frametarget has been overriden manually
* @return string HTML fragment
*/
public function link($link, $text=null) {
+ global $CFG;
+
$attributes = array();
if (is_a($link, 'html_link')) {
$attributes['href'] = prepare_url($link);
}
+ if (!empty($CFG->frametarget)) {
+ $attributes['target'] = $CFG->framename;
+ }
+
return $this->output_tag('a', $attributes, $text);
}