user_info.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. // test
  3. // $Id: gradebook_view_result.php 479 2007-04-12 11:50:58Z stijn $
  4. /*
  5. ==============================================================================
  6. Dokeos - elearning and course management software
  7. Copyright (c) 2006 Dokeos S.A.
  8. Copyright (c) 2006 Ghent University (UGent)
  9. Copyright (c) various contributors
  10. For a full list of contributors, see "credits.txt".
  11. The full license can be read in "license.txt".
  12. This program is free software; you can redistribute it and/or
  13. modify it under the terms of the GNU General Public License
  14. as published by the Free Software Foundation; either version 2
  15. of the License, or (at your option) any later version.
  16. See the GNU General Public License for more details.
  17. Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  18. Mail: info@dokeos.com
  19. ==============================================================================
  20. */
  21. $language_file = 'gradebook';
  22. $cidReset = true;
  23. include_once ('../inc/global.inc.php');
  24. include_once ('lib/be.inc.php');
  25. include_once ('lib/gradebook_functions.inc.php');
  26. include_once ('lib/fe/userform.class.php');
  27. include_once (api_get_path(LIBRARY_PATH) . 'fileManage.lib.php');
  28. include_once (api_get_path(LIBRARY_PATH) . 'export.lib.inc.php');
  29. include_once (api_get_path(LIBRARY_PATH) . 'import.lib.php');
  30. api_block_anonymous_users();
  31. block_students();
  32. $user = get_user_info_from_id($_GET['userid']);
  33. $form = new UserForm(UserForm :: TYPE_USER_INFO, $user, 'user_info_form', null, api_get_self() . '?userid=' . $_GET['userid'] . '&selecteval=' . $_GET['selecteval']);
  34. if ($form->validate()) {
  35. header('Location: user_stats.php?selecteval=' . $_GET['selecteval'].'&userid=' . $_GET['userid']);
  36. exit;
  37. }
  38. $interbreadcrumb[] = array (
  39. 'url' => 'gradebook.php',
  40. 'name' => get_lang('Gradebook'
  41. ));
  42. Display :: display_header(get_lang('UserInfo'));
  43. $image = $user['picture_uri'];
  44. $image_file = ($image != '' ? api_get_path(WEB_CODE_PATH)."upload/users/$image" : api_get_path(WEB_CODE_PATH).'img/unknown.jpg');
  45. $image_size = @getimagesize($image_file);
  46. $img_attributes = 'src="'.$image_file.'?rand='.time().'" '
  47. .'alt="'.$user_data['lastname'].' '.$user_data['firstname'].'" '
  48. .'style="float:'.($text_dir == 'rtl' ? 'left' : 'right').'; padding:5px;" ';
  49. if ($image_size[0] > 300) //limit display width to 300px
  50. $img_attributes .= 'width="300" ';
  51. echo '<img '.$img_attributes.'/>';
  52. $form->display();
  53. Display :: display_footer();
  54. ?>