Fix gravatar in main/gradebook/user_stats.php - refs #4507

1.10.x
Imanol Losada 11 years ago
parent b2a70d90b9
commit 421080fb33
  1. 7
      main/gradebook/lib/fe/displaygradebook.php

@ -720,7 +720,12 @@ class DisplayGradebook
//Web path //Web path
$image_path = UserManager::get_user_picture_path_by_id($userid, 'web', false, true); $image_path = UserManager::get_user_picture_path_by_id($userid, 'web', false, true);
$image_file = $image_path['dir'] . $image_path['file']; $image_file = $image_path['dir'] . $image_path['file'];
$img_attributes = 'src="' . $image_file . '?rand=' . time() . '" ' . 'alt="' . $user['complete_name'] . '" ';
if (!api_get_configuration_value('gravatar_enabled')) {
$image_file .= '?rand='.time();
}
$img_attributes = 'src="' . $image_file . '" ' . 'alt="' . $user['complete_name'] . '" ';
if ($image_size[0] > 200) { if ($image_size[0] > 200) {
//limit display width to 200px //limit display width to 200px
$img_attributes .= 'width="200" '; $img_attributes .= 'width="200" ';

Loading…
Cancel
Save