3 include_once("auth.php");
4 include_once("header.php");
5 include_once("time.php");
7 // files that have been line commented by faculty
8 $sql = 'select sched_id, title, type_name, chapter, section_id, ava_date, due_date, graded, NOW()-due_date as due, NOW()-ava_date as ava from schedule, types where (schedule.assign_type = types.assign_type) and sched_id = ANY (select sub_id from comments where fac_id is NOT NULL and user_id = '.$user_id.' group by sub_id) order by due_date desc, ava_date desc, title desc, chapter desc, section_id desc';
12 $result = mysql_query($sql);
14 if (!$result) { die("SQL ERROR"); }
16 while($row = mysql_fetch_array($result))
18 $html .= '<tr><td>'.$row['sched_id'].'</td>';
19 //$html .= '<tr><td>'.$row[10].'</td>';
22 if($row['due'] > 0 ||
$row['ava'] < 0) { $html .= "<td><img src=gfx/bullet_delete.png>"; } else { $html .= "<td><img src=gfx/bullet_add.png>"; }
25 if($row['graded']) { $html .= "<img src=gfx/bullet_disk.png>"; } else { $html .= "<img src=gfx/bullet_wrench.png>"; }
27 $html .= '<img src=gfx/email.png></td>';
29 $html .= '<td><a href="detail_root.php?sched='.$row['sched_id'].'">'.$row['title'].'</a></td><td>'.$row['type_name'].'</td><td>'.$row['chapter'].'</td>';
31 $html .= '<td>'.$row['section_id'].'</td><td>'.$row['ava_date'].'</td><td>'.$row['due_date'].'</td>';
33 $html .= '<td>'.absHumanTiming($row['due_date']).'</td>';
35 //if($role==0) { $html .= '<td><a href="assignment_add.php?sched='.$row[7].'&action=edit">Edit</a></td>'; }
40 // list of assignments with comments by faculty.
44 // list of recently graded assignments - most recent first
45 $sql = "select sched_id, title, chapter, section_id from schedule where graded = 1 and class_id =2 order by due_date, ava_date, title, chapter, section_id;";
49 <h3
>Recent Assignment Comments
</h3
>
51 <table
class="gridtable">
53 <th
>#</th><th>Status</th><th>Title</th><th>Type</th><th>Chapter</th><th>Section</th><th>Avalaible Date</th><th>Due Date</th><th>Human Time</th>
54 <?php
if($role==0) { echo '<th>Update</th>'; } ?
>