survey_report.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. $cidReset = true;
  4. require_once __DIR__.'/../inc/global.inc.php';
  5. $this_section = SECTION_TRACKING;
  6. $csv_content = [];
  7. $nameTools = get_lang('Reporting');
  8. $allowToTrack = api_is_platform_admin(true, true);
  9. if (!$allowToTrack) {
  10. api_not_allowed(true);
  11. }
  12. $form = new FormValidator('survey');
  13. $form->addSelectAjax(
  14. 'user_id',
  15. get_lang('User'),
  16. [],
  17. [
  18. 'url' => api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=get_user_like',
  19. ]
  20. );
  21. $form->addButtonSearch();
  22. $userInfo = [];
  23. if ($form->validate()) {
  24. $userId = $form->exportValue('user_id');
  25. $userInfo = api_get_user_info($userId);
  26. }
  27. Display::display_header($nameTools);
  28. echo '<div class="actions">';
  29. echo MySpace::getTopMenu();
  30. echo '</div>';
  31. echo MySpace::getAdminActions();
  32. $form->display();
  33. if (!empty($userInfo)) {
  34. echo Display::page_subheader($userInfo['complete_name']);
  35. echo SurveyManager::surveyReport($userInfo);
  36. echo SurveyManager::surveyReport($userInfo, 1);
  37. }
  38. Display::display_footer();