Chat window now opens with no messages inside.
[Assignment-Trapper.git] / workflow_ungraded.php
blob5ef54b525e0a63f6810bb8c4dfb0bf494c763607
1 <?php
3 include_once("auth.php");
4 include_once("header.php");
5 include_once("time.php");
7 if($role != 0) { die("Account \"".$user_name."\" Is Not Authorized To View This Page.<br><br>This Event Will Be Logged And Reported."); }
9 // all assignments who have not been graded complete with class name
10 $sql = "select chapter, section_id, title, schedule.class_id, class.class_name, schedule.assign_type, due_date, sched_id, type_name, due_date from schedule, types, class where (schedule.assign_type = types.assign_type) and (schedule.class_id = class.class_id) and NOW()-due_date > 0 and graded != 1 order by due_date, ava_date desc, title, chapter, section_id, schedule.assign_type";
12 $result = mysql_query($sql);
14 //echo $sql;
16 if (!$result) { die("SQL ERROR: Class Table"); }
17 $class_table = '<table class="gridtable"><th>#</th><th>Class Name</th><th>Title</th><th>Type</th><th>Chapter</th>';
18 $class_table .= '<th>Section</th><th>Due Date</th><th>Human Time</th><th>Edit</th><th>Status</th>';
19 while($row = mysql_fetch_array($result))
21 $class_table .= '<tr><td>'.$row['sched_id'].'</td>';
22 $class_table .= '<td>'.$row['class_name'].'</td>';
23 $class_table .= '<td><a href="detail_root.php?sched='.$row['sched_id'].'">'.$row['title'].'</a></td><td>'.$row['type_name'].'</td><td>'.$row['chapter'].'</td>';
24 $class_table .= '<td>'.$row['section_id'].'</td><td>'.$row['due_date'].'</td>';
25 $class_table .= '<td>'.absHumanTiming($row['due_date']).'</td>';
26 $class_table .= '<td><a href="assignment_add.php?sched='.$row['sched_id'].'&action=edit">Edit</a></td>';
27 $class_table .= '<td><a href="workflow_ungraded.php?sched='.$row['sched_id'].'&action=graded">Graded</a></td>';
28 $class_table .= '</tr>';
31 $class_table .= '</table>';
33 // set assignment to graded if link on page is clicked
34 if(isset($_GET['action']) && isset($_GET['sched']) )
36 //echo "Update schedule";
37 $sql = 'update schedule set graded = 1 where sched_id = '.$_GET['sched'];
39 $result = mysql_query($sql);
42 // list of schedules that are closed and have not been graded.
44 // when all students have been graded, send message to all students letting them know the item has been graded.
46 // flow moving from one ungraded assignment to another showing details for evaluation.
48 // most recent comments that have been posted from students that have not been replied to.
50 echo "<h3>Workflows -> Assignments Ready For Grading</h3>";
52 echo $class_table;