2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
8 /* This program is free software. You can redistribute it and/or */
9 /* modify it under the terms of the GNU General Public License */
10 /* as published by the Free Software Foundation. */
11 /************************************************************************/
13 if (!defined('AT_INCLUDE_PATH')) { exit; }
15 $record_limit = 3; // Number of sublinks to display for this module on course home page -> detail view
16 $cnt = 0; // count number of sublinks pushed into $list
18 if ($dir = @opendir(AT_CONTENT_DIR . 'chat/'.$_SESSION['course_id'].'/tran/')) {
19 while (($file = readdir($dir)) !== false) {
20 if ($cnt >= $record_limit) break; // quit the loop when reaching the record limit
22 if (substr($file, -strlen('.html')) == '.html') {
23 $file = str_replace('.html', '', $file);
25 $list[] = '<a href="'.url_rewrite('mods/_standard/chat/view_transcript.php?t='.$file, AT_PRETTY_URL_IS_HEADER).'"'.
26 (strlen($file) > SUBLINK_TEXT_LEN ? ' title="'.$file.'"' : '') .'>'.
27 validate_length($file, SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY) .'</a>';
34 if (count($list) > 0) {