2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
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 /****************************************************************/
15 // NOTE: this script should not be altered. its use will soon be deprecated.
17 if (!defined('AT_INCLUDE_PATH')) { exit; }
19 //how many content pages are in this course
20 $sql25 = "SELECT content_id from ".TABLE_PREFIX."content where course_id = $_SESSION[course_id]";
21 $result29 = mysql_query($sql25, $db);
22 $num_rows_total = @mysql_num_rows($result29);
24 //get the title for each content_id
30 ".TABLE_PREFIX."content C
32 course_id='$_SESSION[course_id]'";
34 if(!$result7 = mysql_query($sql7, $db)){
36 require(AT_INCLUDE_PATH.'footer.inc.php');
39 $title_refs = array();
40 while ($row= mysql_fetch_array($result7)) {
41 $title_refs[$row['content_id']] = $row['title'];
45 $sql2 = "SELECT * FROM ".TABLE_PREFIX."g_click_data WHERE member_id = $_GET[member_id] AND course_id = $_SESSION[course_id]";
46 $result28 = mysql_query($sql2, $db);
48 echo '<br /><h3>'._AT('tracker_summary_read', $this_user[$_GET['member_id']]).'</h3>';
50 echo '<table class="data static" rules="cols" summary="">';
53 echo '<th>' . _AT('page') . '</th>';
54 echo '<th>' . _AT('visits') . '</th>';
55 echo '<th>' . _AT('duration_sec') . '</th>';
59 while ($row2= @mysql_fetch_assoc($result28)){
60 $duration[$row2['to_cid']] = ($duration[$row2['to_cid']] + $row2['duration']);
61 $visits[$row2['to_cid']] = ($visits[$row2['to_cid']] +1);
64 $sql= "SELECT DISTINCT to_cid FROM ".TABLE_PREFIX."g_click_data WHERE member_id = $_GET[member_id] AND course_id = $_SESSION[course_id]";
65 $result27 = mysql_query($sql, $db);
68 while ($row= @mysql_fetch_array($result27)) {
70 $num_rows_read = ($num_rows_read +1);
72 echo '<td>' . $title_refs[$row['to_cid']] . '</td>';
73 echo '<td>' . $visits[$row['to_cid']] . '</td>';
74 echo '<td>' . number_format($duration[$row['to_cid']]) . '</td>';
80 echo '<td>' . _AT('tracker_pages_total', $num_rows_total, $num_rows_read).'</td>';
81 echo '<td>' . _AT('tracker_percent_read',@number_format((($num_rows_read/$num_rows_total)*100),1)) . '%</td>';