group_space.php 20 KB

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