diff --git a/grade/lib.php b/grade/lib.php index 593a250a16f..ed655c5eec4 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -626,6 +626,7 @@ class grade_plugin_info { * @param boolean $return Whether to return (true) or echo (false) the HTML generated by this function * @param string $bodytags Additional attributes that will be added to the
tag * @param string $buttons Additional buttons to display on the page + * @param boolean $shownavigation should the gradebook navigation drop down (or tabs) be shown? * * @return string HTML code or nothing if $return == false */ @@ -673,7 +674,13 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null, if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_DROPDOWN) { $returnval .= print_grade_plugin_selector($plugin_info, $active_type, $active_plugin, $return); } - $returnval .= $OUTPUT->heading($heading); + + if ($return) { + $returnval .= $OUTPUT->heading($heading); + } else { + echo $OUTPUT->heading($heading); + } + if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_TABS) { $returnval .= grade_print_tabs($active_type, $active_plugin, $plugin_info, $return); } diff --git a/grade/report/user/index.php b/grade/report/user/index.php index 2802c9d59ca..1a8436e7d0f 100644 --- a/grade/report/user/index.php +++ b/grade/report/user/index.php @@ -109,7 +109,9 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all while ($userdata = $gui->next_user()) { $user = $userdata->user; $report = new grade_report_user($courseid, $gpr, $context, $user->id); - echo $OUTPUT->heading(get_string('pluginname', 'gradereport_user'). ' - '.fullname($report->user)); + + $studentnamelink = html_writer::link(new moodle_url('/user/view.php', array('id' => $report->user->id, 'course' => $courseid)), fullname($report->user)); + echo $OUTPUT->heading(get_string('pluginname', 'gradereport_user') . ' - ' . $studentnamelink); if ($report->fill_table()) { echo '