2 /************************************************************************/
\r
4 /************************************************************************/
\r
5 /* Copyright (c) 2002-2010 */
\r
6 /* Inclusive Design Institute */
\r
7 /* http:/atutor.ca */
\r
9 /* This program is free software. You can redistribute it and/or */
\r
10 /* modify it under the terms of the GNU General Public License */
\r
11 /* as published by the Free Software Foundation. */
\r
12 /************************************************************************/
\r
15 define('AT_INCLUDE_PATH', '../../../../include/');
\r
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
\r
18 authenticate(AT_PRIV_CONTENT);
\r
20 /* Getting content id from page that reffered */
\r
21 $content_id = intval($_GET['content_id']);
\r
23 $_pages['mods/_standard/tracker/tools/page_student_stats.php']['title'] = $contentManager->_menu_info[$content_id]['title'];
\r
24 $_pages['mods/_standard/tracker/tools/page_student_stats.php']['parent'] = 'mods/_standard/tracker/tools/index.php';
\r
26 require(AT_INCLUDE_PATH.'header.inc.php');
\r
28 $sql = "SELECT counter, content_id, member_id, SEC_TO_TIME(duration) AS total, SEC_TO_TIME(duration/counter) AS average FROM ".TABLE_PREFIX."member_track WHERE course_id=$_SESSION[course_id] AND content_id=$content_id ORDER BY total DESC";
\r
29 $result = mysql_query($sql, $db);
\r
32 <table class="data" rules="cols" summary="">
\r
35 <th scope="col"><?php echo _AT('login_name'); ?></th>
\r
36 <th scope="col"><?php echo _AT('visits'); ?></th>
\r
37 <th scope="col"><?php echo _AT('avg_duration'); ?></th>
\r
38 <th scope="col"><?php echo _AT('duration'); ?></th>
\r
42 <?php if ($row = mysql_fetch_assoc($result)) : ?>
\r
44 <tr onmousedown="document.location='<?php echo AT_BASE_HREF; ?>mods/_standard/tracker/tools/student_usage.php?id=<?php echo $row['member_id']; ?>'" title="<?php echo _AT('member_stats'); ?>">
\r
45 <td><a href="<?php echo AT_BASE_HREF; ?>mods/_standard/tracker/tools/student_usage.php?id=<?php echo $row['member_id']; ?>"><?php echo get_display_name($row['member_id']); ?></a></td>
\r
46 <td><?php echo $row['counter']; ?></td>
\r
47 <td><?php echo $row['average']; ?></td>
\r
48 <td><?php echo $row['total']; ?></td>
\r
50 <?php } while ($row = mysql_fetch_assoc($result)); ?>
\r
53 <td colspan="4"><?php echo _AT('none_found'); ?></td>
\r
59 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>