id); $row[] = new tabobject('visualreport', $CFG->wwwroot.'/grade/report/visual/index.php?id='.$courseid, get_string('modulename', 'gradereport_visual')); if (has_capability('moodle/grade:manage',$tabcontext ) || has_capability('moodle/grade:edit', $tabcontext) || has_capability('gradereport/visual:view', $tabcontext)) { $row[] = new tabobject('preferences', $CFG->wwwroot.'/grade/report/visual/preferences.php?id='.$courseid, get_string('myreportpreferences', 'grades')); } /// A bit of a hack to make the printable tab open a new window. $row[] = new tabobject('printable', '#" onClick="javascript:window.open(\'' . $CFG->wwwroot. '/grade/report/visual/print.php?id=' . $courseid . '&visid=' . $visid . '\')', get_string('printable', 'gradereport_visual')); $tabs[] = $row; echo '
'; print_tabs($tabs, $currenttab); echo '
'; ?>