2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002-2008 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/
6 /* Adaptive Technology Resource Centre / University of Toronto */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /************************************************************************/
14 if (!defined('AT_INCLUDE_PATH')) { exit; }
18 $record_limit = 3; // Number of sublinks to display for this module on course home page -> detail view
20 $sql = "SELECT C.member_id, M.login FROM ".TABLE_PREFIX."course_enrollment C, ".TABLE_PREFIX."members M WHERE C.course_id=$_SESSION[course_id] AND C.member_id=M.member_id AND (C.approved='y' OR C.approved='a') limit ".$record_limit;
21 $result = mysql_query($sql, $db);
23 if (mysql_num_rows($result) > 0) {
24 while ($row = mysql_fetch_assoc($result)) {
25 $list[] = '<a href="'.url_rewrite('profile.php?id='.$row['member_id'], AT_PRETTY_URL_IS_HEADER).'"'.
26 (strlen($row['login']) > SUBLINK_TEXT_LEN ? ' title="'.$row['login'].'"' : '') .'>'.
27 validate_length($row['login'], SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY) .'</a>';