* return string
* @todo Finish documenting this function
*/
-function print_user_picture($userid, $courseid, $picture, $size=0, $returnstring=false, $link=true) {
+function print_user_picture($userid, $courseid, $picture, $size=0, $returnstring=false, $link=true, $target='') {
global $CFG;
if ($link) {
- $output = '<a href="'. $CFG->wwwroot .'/user/view.php?id='. $userid .'&course='. $courseid .'">';
+ if ($target) {
+ $target=' target="_blank"';
+ }
+ $output = '<a '.$target.' href="'. $CFG->wwwroot .'/user/view.php?id='. $userid .'&course='. $courseid .'">';
} else {
$output = '';
}