MDL-34887: Add hyperlinks to names in the Assignment's grading table
authorRaymond Wijaya <raymond.wijaya@netspot.com.au>
Fri, 17 Aug 2012 04:34:16 +0000 (12:34 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 21 Aug 2012 02:58:09 +0000 (10:58 +0800)
mod/assign/gradingtable.php

index be0eb3d..fb5e4ff 100644 (file)
@@ -287,13 +287,15 @@ class assign_grading_table extends table_sql implements renderable {
     }
 
     /**
-     * Format a user record for display (don't link to profile)
+     * Format a user record for display (link to profile)
      *
      * @param stdClass $row
      * @return string
      */
     function col_fullname($row) {
-        return fullname($row);
+        $courseid = $this->assignment->get_course()->id;
+        $link= new moodle_url('/user/view.php', array('id' =>$row->id, 'course'=>$courseid));
+        return $this->output->action_link($link, fullname($row));
     }
 
     /**