1817ff0cde31bfc4afbac5cb4df023967322b344
[atutor.git] / docs / themes / default / instructor / statistics / tracker / my_stats.tmpl.php
1 <?php global $contentManager;?>
2 <table class="data static" rules="cols" summary="">
3 <thead>
4 <tr>
5         <th scope="col"><?php echo _AT('page'); ?></th>
6         <th scope="col"><?php echo _AT('visits'); ?></th>
7         <th scope="col"><?php echo _AT('duration'); ?></th>
8         <th scope="col"><?php echo _AT('last_accessed'); ?></th>
9 </tr>
10 </thead>
11 <tbody>
12 <?php
13         
14
15         if (mysql_num_rows($this->result) > 0) {
16                 while ($row = mysql_fetch_assoc($this->result)) {
17                         if ($row['total'] == '') {
18                                 $row['total'] = _AT('na');
19                         }
20
21                         echo '<tr>';
22                         echo '<td><a href='.AT_BASE_HREF.url_rewrite('content.php?cid='.$row['content_id']). '>' . $contentManager->_menu_info[$row['content_id']]['title'] . '</a></td>';
23                         echo '<td>' . $row['total_hits'] . '</td>';
24                         echo '<td>' . $row['total_duration'] . '</td>';
25                         if ($row['last_accessed'] == '') {
26                                 echo '<td>' . _AT('na') . '</td>';
27                         } else {
28                                 echo '<td>' . AT_date(_AT('forum_date_format'), $row['last_accessed'], AT_DATE_MYSQL_DATETIME) . '</td>';
29                         }
30                         echo '</tr>';
31                 } //end while
32
33                 echo '</tbody>';
34
35         } else {
36                 echo '<tr><td colspan="4">' . _AT('none_found') . '</td></tr>';
37                 echo '</tbody>';
38         }
39         ?>
40 </tbody>
41 </table>
42