From: gustav_delius Date: Sun, 16 Jan 2005 17:27:40 +0000 (+0000) Subject: ugly hack to fix bug 1824 about wrong fullname format in log info. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=181b888e160b38f3a14474bc2a9b77b836e4d0d6;p=moodle.git ugly hack to fix bug 1824 about wrong fullname format in log info. --- diff --git a/course/lib.php b/course/lib.php index 8a055bf85b..36d4ce5267 100644 --- a/course/lib.php +++ b/course/lib.php @@ -607,7 +607,12 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per $ldcache[$log->module][$log->action] = $ld; } if ($ld && !empty($log->info)) { - $log->info = get_field($ld->mtable, $ld->field, 'id', $log->info); + // ugly hack to make sure fullname is shown correctly + if (($ld->mtable == 'user') and ($ld->field == 'CONCAT(firstname," ",lastname)')) { + $log->info = fullname(get_record($ld->mtable, 'id', $log->info), true); + } else { + $log->info = get_field($ld->mtable, $ld->field, 'id', $log->info); + } } $log->url = strip_tags(urldecode($log->url)); // Some XSS protection