group_space.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This script shows the group space for one specific group, possibly displaying
  5. * a list of users in the group, subscribe or unsubscribe option, tutors...
  6. *
  7. * @package chamilo.group
  8. * @todo Display error message if no group ID specified
  9. */
  10. require_once '../inc/global.inc.php';
  11. $current_course_tool = TOOL_GROUP;
  12. // Notice for unauthorized people.
  13. api_protect_course_script(true);
  14. /* Libraries & config files */
  15. require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php';
  16. require_once api_get_path(SYS_CODE_PATH).'forum/forumconfig.inc.php';
  17. /* MAIN CODE */
  18. $group_id = api_get_group_id();
  19. $user_id = api_get_user_id();
  20. $current_group = GroupManager::get_group_properties($group_id);
  21. if (empty($current_group)) {
  22. api_not_allowed(true);
  23. }
  24. $this_section = SECTION_COURSES;
  25. $nameTools = get_lang('GroupSpace');
  26. $interbreadcrumb[] = array('url' => 'group.php', 'name' => get_lang('Groups'));
  27. /* Ensure all private groups // Juan Carlos Raña Trabado */
  28. $forums_of_groups = get_forums_of_group($current_group['id']);
  29. /*$forum_state_public = 0;
  30. if (is_array($forums_of_groups)) {
  31. foreach ($forums_of_groups as $key => $value) {
  32. if ($value['forum_group_public_private'] == 'public') {
  33. $forum_state_public = 1;
  34. }
  35. }
  36. }
  37. if ($current_group['doc_state'] != 1 &&
  38. $current_group['calendar_state'] != 1 &&
  39. $current_group['work_state'] != 1 &&
  40. $current_group['announcements_state'] != 1 &&
  41. $current_group['wiki_state'] != 1 &&
  42. $current_group['chat_state'] != 1 &&
  43. $forum_state_public != 1
  44. ) {
  45. }*/
  46. if (!api_is_allowed_to_edit(null, true) &&
  47. (!GroupManager::is_user_in_group($user_id, $group_id) ||
  48. $current_group['status'] == 0
  49. )
  50. ) {
  51. api_not_allowed(true);
  52. }
  53. /* Header */
  54. Display::display_header($nameTools.' '.Security::remove_XSS($current_group['name']), 'Group');
  55. /* Introduction section (editable by course admin) */
  56. Display::display_introduction_section(TOOL_GROUP);
  57. /* Actions and Action links */
  58. /*
  59. * User wants to register in this group
  60. */
  61. if (!empty($_GET['selfReg']) &&
  62. GroupManager :: is_self_registration_allowed($user_id, $current_group['id'])
  63. ) {
  64. GroupManager :: subscribe_users($user_id, $current_group['id']);
  65. Display :: display_normal_message(get_lang('GroupNowMember'));
  66. }
  67. /*
  68. * User wants to unregister from this group
  69. */
  70. if (!empty($_GET['selfUnReg']) &&
  71. GroupManager :: is_self_unregistration_allowed($user_id, $current_group['id'])
  72. ) {
  73. GroupManager :: unsubscribe_users($user_id, $current_group['id']);
  74. Display::display_normal_message(get_lang('StudentDeletesHimself'));
  75. }
  76. echo '<div class="actions">';
  77. echo '<a href="group.php">'.
  78. Display::return_icon('back.png',get_lang('BackToGroupList'),'',ICON_SIZE_MEDIUM).
  79. '</a>';
  80. /*
  81. * Register to group
  82. */
  83. $subscribe_group = '';
  84. if (GroupManager :: is_self_registration_allowed($user_id, $current_group['id'])) {
  85. $subscribe_group = '<a class="btn btn-default" href="'.api_get_self().'?selfReg=1&group_id='.$current_group['id'].'" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."'".')) return false;">'.
  86. get_lang("RegIntoGroup").'</a>';
  87. }
  88. /*
  89. * Unregister from group
  90. */
  91. $unsubscribe_group = '';
  92. if (GroupManager :: is_self_unregistration_allowed($user_id, $current_group['id'])) {
  93. $unsubscribe_group = '<a class="btn btn-default" href="'.api_get_self().'?selfUnReg=1" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."'".')) return false;">'.
  94. get_lang("StudentUnsubscribe").'</a>';
  95. }
  96. echo '&nbsp;</div>';
  97. if (isset($_GET['action'])) {
  98. switch ($_GET['action']) {
  99. case 'show_msg':
  100. Display::display_normal_message(Security::remove_XSS($_GET['msg']));
  101. break;
  102. }
  103. }
  104. /* Main Display Area */
  105. $course_code = api_get_course_id();
  106. $is_course_member = CourseManager::is_user_subscribed_in_real_or_linked_course(
  107. api_get_user_id(),
  108. $course_code
  109. );
  110. // Edit the group.
  111. $edit_url = '';
  112. if (api_is_allowed_to_edit(false, true) or
  113. GroupManager::is_tutor_of_group(api_get_user_id(), api_get_group_id())
  114. ) {
  115. $my_origin = isset($origin) ? $origin : '';
  116. $edit_url = '<a href="'.api_get_path(WEB_CODE_PATH).'group/settings.php?cidReq='.api_get_course_id().'&origin='.$my_origin.'&gidReq='.api_get_group_id().'">'.
  117. Display::return_icon('edit.png', get_lang('EditGroup'),'',ICON_SIZE_SMALL).'</a>';
  118. }
  119. echo Display::page_header(
  120. Security::remove_XSS($current_group['name']).' '.$edit_url.' '.$subscribe_group.' '.$unsubscribe_group
  121. );
  122. if (!empty($current_group['description'])) {
  123. echo '<p>'.Security::remove_XSS($current_group['description']).'</p>';
  124. }
  125. /*
  126. * Group Tools
  127. */
  128. // If the user is subscribed to the group or the user is a tutor of the group then
  129. if (api_is_allowed_to_edit(false, true) OR
  130. GroupManager::is_user_in_group(api_get_user_id(), $current_group['id'])
  131. ) {
  132. $actions_array = array();
  133. // Link to the forum of this group
  134. $forums_of_groups = get_forums_of_group($current_group['id']);
  135. if (is_array($forums_of_groups)) {
  136. if ($current_group['forum_state'] != GroupManager::TOOL_NOT_AVAILABLE ) {
  137. foreach ($forums_of_groups as $key => $value) {
  138. //*!empty($user_subscribe_to_current_group) && */
  139. if ($value['forum_group_public_private'] == 'public' ||
  140. ($value['forum_group_public_private'] == 'private') ||
  141. !empty($user_is_tutor) ||
  142. api_is_allowed_to_edit(false, true)
  143. ) {
  144. $actions_array[] = array(
  145. 'url' => '../forum/viewforum.php?forum='.$value['forum_id'].'&gidReq='.Security::remove_XSS($current_group['id']).'&origin=group',
  146. 'content' => Display::return_icon('forum.png', get_lang('Forum').': '.$value['forum_title'] , array(), 32)
  147. );
  148. }
  149. }
  150. }
  151. }
  152. if ($current_group['doc_state'] != GroupManager::TOOL_NOT_AVAILABLE) {
  153. // Link to the documents area of this group
  154. $actions_array[] = array(
  155. 'url' => '../document/document.php?'.api_get_cidreq(),
  156. 'content' => Display::return_icon('folder.png', get_lang('GroupDocument'), array(), 32)
  157. );
  158. }
  159. if ($current_group['calendar_state'] != GroupManager::TOOL_NOT_AVAILABLE) {
  160. $groupFilter = null;
  161. if (!empty($group_id)) {
  162. $groupFilter = "&type=course&user_id=GROUP:$group_id";
  163. }
  164. // Link to a group-specific part of agenda
  165. $actions_array[] = array(
  166. 'url' => '../calendar/agenda_js.php?'.api_get_cidreq().$groupFilter,
  167. 'content' => Display::return_icon('agenda.png', get_lang('GroupCalendar'), array(), 32)
  168. );
  169. }
  170. if ($current_group['work_state'] != GroupManager::TOOL_NOT_AVAILABLE) {
  171. // Link to the works area of this group
  172. $actions_array[] = array(
  173. 'url' => '../work/work.php?'.api_get_cidreq(),
  174. 'content' => Display::return_icon('work.png', get_lang('GroupWork'), array(), 32)
  175. );
  176. }
  177. if ($current_group['announcements_state'] != GroupManager::TOOL_NOT_AVAILABLE) {
  178. // Link to a group-specific part of announcements
  179. $actions_array[] = array(
  180. 'url' => '../announcements/announcements.php?'.api_get_cidreq(),
  181. 'content' => Display::return_icon('announce.png', get_lang('GroupAnnouncements'), array(), 32)
  182. );
  183. }
  184. if ($current_group['wiki_state'] != GroupManager::TOOL_NOT_AVAILABLE) {
  185. // Link to the wiki area of this group
  186. $actions_array[] = array(
  187. 'url' => '../wiki/index.php?'.api_get_cidreq().'&action=show&title=index&session_id='.api_get_session_id().'&group_id='.$current_group['id'],
  188. 'content' => Display::return_icon('wiki.png', get_lang('GroupWiki'), array(), 32)
  189. );
  190. }
  191. if ($current_group['chat_state'] != GroupManager::TOOL_NOT_AVAILABLE) {
  192. // Link to the chat area of this group
  193. if (api_get_course_setting('allow_open_chat_window')) {
  194. $actions_array[] = array(
  195. 'url' => "javascript: void(0);",
  196. 'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32),
  197. 'url_attributes' => array(
  198. 'onclick' => " window.open('../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id']."','window_chat_group_".api_get_course_id()."_".api_get_group_id()."','height=380, width=625, left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no')"
  199. )
  200. );
  201. } else {
  202. $actions_array[] = array(
  203. 'url' => "../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id'],
  204. 'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32)
  205. );
  206. }
  207. }
  208. if (!empty($actions_array)) {
  209. echo Display::actions($actions_array);
  210. }
  211. } else {
  212. $actions_array = array();
  213. // Link to the forum of this group
  214. $forums_of_groups = get_forums_of_group($current_group['id']);
  215. if (is_array($forums_of_groups)) {
  216. if ( $current_group['forum_state'] == GroupManager::TOOL_PUBLIC ) {
  217. foreach ($forums_of_groups as $key => $value) {
  218. if ($value['forum_group_public_private'] == 'public' ) {
  219. $actions_array[] = array(
  220. 'url' => '../forum/viewforum.php?cidReq='.api_get_course_id().'&forum='.$value['forum_id'].'&gidReq='.Security::remove_XSS($current_group['id']).'&origin=group',
  221. 'content' => Display::return_icon('forum.png', get_lang('GroupForum'), array(), ICON_SIZE_MEDIUM)
  222. );
  223. }
  224. }
  225. }
  226. }
  227. if ($current_group['doc_state'] == GroupManager::TOOL_PUBLIC) {
  228. // Link to the documents area of this group
  229. $actions_array[] = array(
  230. 'url' => '../document/document.php?'.api_get_cidreq().'&origin='.$origin,
  231. 'content' => Display::return_icon('folder.png', get_lang('GroupDocument'), array(), ICON_SIZE_MEDIUM)
  232. );
  233. }
  234. if ($current_group['calendar_state'] == GroupManager::TOOL_PUBLIC) {
  235. // Link to a group-specific part of agenda
  236. $actions_array[] = array(
  237. 'url' => '../calendar/agenda.php?'.api_get_cidreq(),
  238. 'content' => Display::return_icon('agenda.png', get_lang('GroupCalendar'), array(), ICON_SIZE_MEDIUM)
  239. );
  240. }
  241. if ($current_group['work_state'] == GroupManager::TOOL_PUBLIC) {
  242. // Link to the works area of this group
  243. $actions_array[] = array(
  244. 'url' => '../work/work.php?'.api_get_cidreq(),
  245. 'content' => Display::return_icon('work.png', get_lang('GroupWork'), array(), ICON_SIZE_MEDIUM)
  246. );
  247. }
  248. if ($current_group['announcements_state'] == GroupManager::TOOL_PUBLIC) {
  249. // Link to a group-specific part of announcements
  250. $actions_array[] = array(
  251. 'url' => '../announcements/announcements.php?'.api_get_cidreq(),
  252. 'content' => Display::return_icon('announce.png', get_lang('GroupAnnouncements'), array(), ICON_SIZE_MEDIUM)
  253. );
  254. }
  255. if ($current_group['wiki_state'] == GroupManager::TOOL_PUBLIC) {
  256. // Link to the wiki area of this group
  257. $actions_array[] = array(
  258. 'url' => '../wiki/index.php?'.api_get_cidreq().'&action=show&title=index&session_id='.api_get_session_id().'&group_id='.$current_group['id'],
  259. 'content' => Display::return_icon('wiki.png', get_lang('GroupWiki'), array(), 32)
  260. );
  261. }
  262. if ($current_group['chat_state'] == GroupManager::TOOL_PUBLIC ) {
  263. // Link to the chat area of this group
  264. if (api_get_course_setting('allow_open_chat_window')) {
  265. $actions_array[] = array(
  266. 'url' => "javascript: void(0);\" onclick=\"window.open('../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id']."','window_chat_group_".$_SESSION['_cid']."_".$_SESSION['_gid']."','height=380, width=625, left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no') \"",
  267. 'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32)
  268. );
  269. } else {
  270. $actions_array[] = array(
  271. 'url' => "../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id'],
  272. 'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32)
  273. );
  274. }
  275. }
  276. if (!empty($actions_array)) {
  277. echo Display::actions($actions_array);
  278. }
  279. }
  280. /*
  281. * List all the tutors of the current group
  282. */
  283. $tutors = GroupManager::get_subscribed_tutors($current_group['id']);
  284. $tutor_info = '';
  285. if (count($tutors) == 0) {
  286. $tutor_info = get_lang('GroupNoneMasc');
  287. } else {
  288. isset($origin) ? $my_origin = $origin:$my_origin='';
  289. $tutor_info .= '<ul class="thumbnails">';
  290. foreach ($tutors as $index => $tutor) {
  291. $tab_user_info = api_get_user_info($tutor['user_id']);
  292. $username = api_htmlentities(sprintf(get_lang('LoginX'), $tab_user_info['username']), ENT_QUOTES);
  293. $image_path = UserManager::get_user_picture_path_by_id($tutor['user_id'], 'web', false, true);
  294. $image_repository = $image_path['dir'];
  295. $existing_image = $image_path['file'];
  296. $completeName = $tab_user_info['complete_name'];
  297. $photo = '<img src="'.$image_repository.$existing_image.'" alt="'.$completeName.'" width="32" height="32" title="'.$completeName.'" />';
  298. $tutor_info .= '<li>';
  299. $tutor_info .= Display::url(
  300. $tab_user_info['complete_name'],
  301. $tab_user_info['profile_url']
  302. );
  303. $tutor_info .= '</li>';
  304. }
  305. $tutor_info .= '</ul>';
  306. }
  307. echo Display::page_subheader(get_lang('GroupTutors'));
  308. if (!empty($tutor_info)) {
  309. echo $tutor_info;
  310. }
  311. echo '<br />';
  312. /*
  313. * List all the members of the current group
  314. */
  315. echo Display::page_subheader(get_lang('GroupMembers'));
  316. $table = new SortableTable('group_users', 'get_number_of_group_users', 'get_group_user_data', (api_is_western_name_order() xor api_sort_by_first_name()) ? 2 : 1);
  317. $my_cidreq = isset($_GET['cidReq']) ? Security::remove_XSS($_GET['cidReq']) : '';
  318. $my_origin = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : '';
  319. $my_gidreq = isset($_GET['gidReq']) ? Security::remove_XSS($_GET['gidReq']) : '';
  320. $parameters = array('cidReq' => $my_cidreq, 'origin'=> $my_origin, 'gidReq' => $my_gidreq);
  321. $table->set_additional_parameters($parameters);
  322. $table->set_header(0, '');
  323. if (api_is_western_name_order()) {
  324. $table->set_header(1, get_lang('FirstName'));
  325. $table->set_header(2, get_lang('LastName'));
  326. } else {
  327. $table->set_header(1, get_lang('LastName'));
  328. $table->set_header(2, get_lang('FirstName'));
  329. }
  330. if (api_get_setting('show_email_addresses') == 'true') {
  331. $table->set_header(3, get_lang('Email'));
  332. $table->set_column_filter(3, 'email_filter');
  333. } else {
  334. if (api_is_allowed_to_edit() == 'true') {
  335. $table->set_header(3, get_lang('Email'));
  336. $table->set_column_filter(3, 'email_filter');
  337. }
  338. }
  339. //the order of these calls is important
  340. $table->set_column_filter(1, 'user_name_filter');
  341. $table->set_column_filter(2, 'user_name_filter');
  342. $table->set_column_filter(0, 'user_icon_filter');
  343. $table->display();
  344. /**
  345. * Get the number of subscribed users to the group
  346. *
  347. * @return integer
  348. *
  349. * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
  350. * @version April 2008
  351. */
  352. function get_number_of_group_users()
  353. {
  354. global $current_group;
  355. $course_id = api_get_course_int_id();
  356. // Database table definition
  357. $table_group_user = Database :: get_course_table(TABLE_GROUP_USER);
  358. // Query
  359. $sql = "SELECT count(id) AS number_of_users
  360. FROM ".$table_group_user."
  361. WHERE c_id = $course_id AND group_id='".Database::escape_string($current_group['id'])."'";
  362. $result = Database::query($sql);
  363. $return = Database::fetch_array($result,'ASSOC');
  364. return $return['number_of_users'];
  365. }
  366. /**
  367. * Get the details of the users in a group
  368. *
  369. * @param integer $from starting row
  370. * @param integer $number_of_items number of items to be displayed
  371. * @param integer $column sorting colum
  372. * @param integer $direction sorting direction
  373. * @return array
  374. *
  375. * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
  376. * @version April 2008
  377. */
  378. function get_group_user_data($from, $number_of_items, $column, $direction)
  379. {
  380. global $current_group;
  381. // Database table definition
  382. $table_group_user = Database :: get_course_table(TABLE_GROUP_USER);
  383. $table_user = Database :: get_main_table(TABLE_MAIN_USER);
  384. $course_id = api_get_course_int_id();
  385. // Query
  386. if (api_get_setting('show_email_addresses') == 'true') {
  387. $sql = "SELECT user.user_id AS col0,
  388. ".(api_is_western_name_order() ?
  389. "user.firstname AS col1,
  390. user.lastname AS col2,"
  391. :
  392. "user.lastname AS col1,
  393. user.firstname AS col2,"
  394. )."
  395. user.email AS col3
  396. FROM ".$table_user." user, ".$table_group_user." group_rel_user
  397. WHERE group_rel_user.c_id = $course_id AND group_rel_user.user_id = user.user_id
  398. AND group_rel_user.group_id = '".Database::escape_string($current_group['id'])."'";
  399. $sql .= " ORDER BY col$column $direction ";
  400. $sql .= " LIMIT $from,$number_of_items";
  401. } else {
  402. if (api_is_allowed_to_edit()) {
  403. $sql = "SELECT DISTINCT
  404. u.user_id AS col0,
  405. ".(api_is_western_name_order() ?
  406. "u.firstname AS col1,
  407. u.lastname AS col2,"
  408. :
  409. "u.lastname AS col1,
  410. u.firstname AS col2,"
  411. )."
  412. u.email AS col3
  413. FROM ".$table_user." u INNER JOIN ".$table_group_user." gu ON (gu.user_id = u.user_id) AND gu.c_id = $course_id
  414. WHERE gu.group_id = '".Database::escape_string($current_group['id'])."'";
  415. $sql .= " ORDER BY col$column $direction ";
  416. $sql .= " LIMIT $from,$number_of_items";
  417. } else {
  418. $sql = "SELECT DISTINCT
  419. user.user_id AS col0,
  420. ". (api_is_western_name_order() ?
  421. "user.firstname AS col1,
  422. user.lastname AS col2 "
  423. :
  424. "user.lastname AS col1,
  425. user.firstname AS col2 "
  426. )."
  427. FROM ".$table_user." user, ".$table_group_user." group_rel_user
  428. WHERE group_rel_user.c_id = $course_id AND group_rel_user.user_id = user.user_id
  429. AND group_rel_user.group_id = '".Database::escape_string($current_group['id'])."'";
  430. $sql .= " ORDER BY col$column $direction ";
  431. $sql .= " LIMIT $from,$number_of_items";
  432. }
  433. }
  434. $return = array();
  435. $result = Database::query($sql);
  436. while ($row = Database::fetch_row($result)) {
  437. $return[] = $row;
  438. }
  439. return $return;
  440. }
  441. /**
  442. * Returns a mailto-link
  443. * @param string $email An email-address
  444. * @return string HTML-code with a mailto-link
  445. */
  446. function email_filter($email)
  447. {
  448. return Display :: encrypted_mailto_link($email, $email);
  449. }
  450. /**
  451. * Display a user icon that links to the user page
  452. *
  453. * @param integer $user_id the id of the user
  454. * @return html code
  455. *
  456. * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
  457. * @version April 2008
  458. */
  459. function user_icon_filter($user_id)
  460. {
  461. $userInfo = api_get_user_info($user_id);
  462. $image_path = UserManager::get_user_picture_path_by_id($user_id, 'web', false, true);
  463. $image_repository = $image_path['dir'];
  464. $existing_image = $image_path['file'];
  465. $photo = '<center><img src="'.$image_repository.$existing_image.'" alt="'.$userInfo['complete_name'].'" width="22" height="22" title="'.$userInfo['complete_name'].'" /></center>';
  466. return Display::url($photo, $userInfo['profile_url']);
  467. }
  468. /**
  469. * Return user profile link around the given user name.
  470. *
  471. * The parameters use a trick of the sorteable table, where the first param is
  472. * the original value of the column
  473. * @param string User name (value of the column at the time of calling)
  474. * @param string URL parameters
  475. * @param array Row of the "sortable table" as it is at the time of function call - we extract the user ID from there
  476. * @return string HTML link
  477. */
  478. function user_name_filter($name, $url_params, $row)
  479. {
  480. $userInfo = api_get_user_info($row[0]);
  481. return UserManager::getUserProfileLink($userInfo);
  482. }
  483. // Footer
  484. $orig = isset($origin) ? $origin : '';
  485. if ($orig != 'learnpath') {
  486. Display::display_footer();
  487. }