Skip to content
Permalink
Browse files

Merge branch 'MDL-25561_user_report_name_clickable_22' of git://githu…

…b.com/andyjdavis/moodle into MOODLE_22_STABLE
  • Loading branch information...
Aparup Banerjee
Aparup Banerjee committed Dec 20, 2011
2 parents b9c38ef + 1a35796 commit 40b67fca0a31ff92c0a4ec541cb7a3e5a8d62455
Showing with 14 additions and 3 deletions.
  1. +8 −1 grade/lib.php
  2. +6 −2 grade/report/user/index.php
@@ -626,6 +626,7 @@ public function __construct($id, $link, $string, $parent=null) {
* @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 <body> 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);
}
@@ -109,7 +109,9 @@
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 '<br />'.$report->print_table(true);
@@ -119,7 +121,9 @@
$gui->close();
} else { // Only show one user's report
$report = new grade_report_user($courseid, $gpr, $context, $userid);
print_grade_page_head($courseid, 'report', 'user', 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));
print_grade_page_head($courseid, 'report', 'user', get_string('pluginname', 'gradereport_user') . ' - ' . $studentnamelink);
groups_print_course_menu($course, $gpr->get_return_url('index.php?id='.$courseid, array('userid'=>0)));
if ($user_selector) {

0 comments on commit 40b67fc

Please sign in to comment.
You can’t perform that action at this time.