2 /****************************************************************/
\r
4 /****************************************************************/
\r
5 /* Copyright (c) 2002-2008 */
\r
6 /* Written by Greg Gay & Joel Kronenberg & Chris Ridpath */
\r
7 /* Inclusive Design Institute */
\r
8 /* http://atutor.ca */
\r
10 /* This program is free software. You can redistribute it and/or*/
\r
11 /* modify it under the terms of the GNU General Public License */
\r
12 /* as published by the Free Software Foundation. */
\r
13 /****************************************************************/
\r
15 define('AT_INCLUDE_PATH', '../../../include/');
\r
16 require (AT_INCLUDE_PATH.'vitals.inc.php');
\r
18 require (AT_INCLUDE_PATH.'header.inc.php');
\r
20 $sql = "SELECT * FROM ".TABLE_PREFIX."reading_list WHERE course_id=$_SESSION[course_id] ORDER BY date_start";
\r
21 $result = mysql_query($sql, $db);
\r
24 <table class="data" style="width: 95%;">
\r
27 <th><?php echo _AT('rl_start'); ?></th>
\r
28 <th><?php echo _AT('rl_end'); ?></th>
\r
29 <th><?php echo _AT('title'); ?></th>
\r
30 <th><?php echo _AT('required'); ?></th>
\r
31 <th><?php echo _AT('comment'); ?></th>
\r
35 <?php if ($row = mysql_fetch_assoc($result)): ?>
\r
38 <?php // get the external resource using the resource ID from the reading
\r
39 $id = $row['resource_id'];
\r
40 $row['date_start'] = htmlentities_utf8($row['date_start']);
\r
41 $row['date_end'] = htmlentities_utf8($row['date_end']);
\r
42 $row['comment'] = AT_print($row['comment'], 'reading_list.comment');
\r
44 $sql = "SELECT title, type, url FROM ".TABLE_PREFIX."external_resources WHERE course_id=$_SESSION[course_id] AND resource_id=$id";
\r
45 $resource_result = mysql_query($sql, $db);
\r
46 if ($resource_row = mysql_fetch_assoc($resource_result)){
\r
48 <tr onclick="document.location='mods/_standard/reading_list/display_resource.php?id=<?php echo $id ?>'">
\r
50 <?php if ($row['date_start'] == '0000-00-00'){
\r
53 echo AT_Date(_AT('rl_date_format'), $row['date_start'], AT_DATE_MYSQL_DATETIME);
\r
58 <?php if ($row['date_end'] == '0000-00-00'){
\r
61 echo AT_Date(_AT('rl_date_format'), $row['date_end'], AT_DATE_MYSQL_DATETIME);
\r
65 <td><a href="<?php echo url_rewrite('mods/_standard/reading_list/display_resource.php?id='.$id); ?>" title="<?php echo _AT('rl_view_resource_details')?>" ><?php echo AT_print($resource_row['title'], 'reading_list.title'); ?></a>
\r
67 <td><?php echo _AT ($row['required']); ?></td>
\r
68 <td><?php echo $row['comment']; ?></td>
\r
72 <?php } while($row = mysql_fetch_assoc($result)); ?>
\r
75 <td colspan="3"><strong><?php echo _AT('none_found'); ?></strong></td>
\r
81 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>