3 if (!defined('AT_INCLUDE_PATH')) { exit; }
5 global $db, $contentManager;
7 $record_limit = 3; // number of sublinks to display at module home "detail view"
9 $sql = "SELECT content_id FROM ".TABLE_PREFIX."member_track WHERE course_id=$_SESSION[course_id] AND member_id=$_SESSION[member_id] ORDER BY last_accessed DESC limit ".$record_limit;
10 $result = mysql_query($sql, $db);
12 if (mysql_num_rows($result) > 0) {
13 while ($row = mysql_fetch_assoc($result)) {
14 $link_title = $contentManager->_menu_info[$row['content_id']]['title'];
16 $list[] = '<a href="'.url_rewrite('content.php?cid='.$row['content_id'], AT_PRETTY_URL_IS_HEADER).'"'.
17 (strlen($link_title) > SUBLINK_TEXT_LEN ? ' title="'.$link_title.'"' : '') .'>'.
18 validate_length($link_title, SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY) .'</a>';