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
17 authenticate(AT_PRIV_CONTENT);
\r
19 require(AT_INCLUDE_PATH.'header.inc.php');
\r
21 $sql = "SELECT M.member_id, M.login, CONCAT(M.first_name, ' ', M.second_name, ' ', M.last_name) AS full_name
\r
22 FROM ".TABLE_PREFIX."members M, ".TABLE_PREFIX."course_enrollment C
\r
23 WHERE M.member_id=C.member_id AND C.course_id=$_SESSION[course_id]";
\r
24 $result = mysql_query($sql, $db);
\r
26 $_GET['id'] = intval($_GET['id']);
\r
29 <form name="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
\r
30 <div class="input-form">
\r
32 <label for="id"><?php echo _AT('select_member'); ?></label><br />
\r
33 <select name="id" id="id">
\r
35 while ($row = mysql_fetch_assoc($result)) {
\r
36 $sender = get_display_name($row['member_id']);
\r
37 echo '<option value="'.$row['member_id'].'"';
\r
38 if ($row['member_id'] == $_GET['id']) {
\r
39 echo ' selected="selected"';
\r
41 echo '>'.$sender.'</option>';
\r
47 <div class="row buttons">
\r
48 <input type="submit" name="submit" value="<?php echo _AT('view'); ?>" />
\r
53 <?php if ($_GET['id']) : ?>
\r
55 $sql = "SELECT counter, content_id, SEC_TO_TIME(duration) AS total FROM ".TABLE_PREFIX."member_track WHERE member_id=$_GET[id] AND course_id=$_SESSION[course_id] ORDER BY counter DESC";
\r
56 $result = mysql_query($sql, $db);
\r
58 <table class="data static" rules="cols" summary="">
\r
61 <th scope="col"><?php echo _AT('page'); ?></th>
\r
62 <th scope="col"><?php echo _AT('visits'); ?></th>
\r
63 <th scope="col"><?php echo _AT('duration'); ?></th>
\r
67 <?php if ($row = mysql_fetch_assoc($result)): ?>
\r
70 <td><?php echo $contentManager->_menu_info[$row['content_id']]['title']; ?></td>
\r
71 <td><?php echo $row['counter']; ?></td>
\r
72 <td><?php echo $row['total']; ?></td>
\r
74 <?php } while ($row = mysql_fetch_assoc($result)); ?>
\r
77 <td colspan="3"><?php echo _AT('none_found'); ?></td>
\r
84 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>